Closed PJ-Schulz closed 2 years ago
Hello, thank you for raising the issue.
There seems to be no easy solution ― the problem is in a transitive dependency that we have no control over (we depend on docker-compose
which depends on pyyaml<6.0
). One possible solution would be to submit an issue or PR to the docker-compose
repository, though there is a new version of docker-compose
which is not written in Python and I don't know how willing the devs will be to change the old version.
Another solution would be to use pyyaml<6.0
in your project, which of course might not be feasible if you depend on fixes from version 6 (from the changelog it seems that the main breaking change is removing support for Python2.7).
Finally, it might be possible to change pytest-docker
in such a way to allow users to provide their own docker-compose
installation instead of installing it directly. This will require a greater discussion as well as a major version bump.
Thank for the detailed answer.
The easiest way is to use a version of pyyaml<6.0
at the moment. But if there will be new features in pyyaml
in the future, they cannot be used together with pytest-docker
. So this is not the best solution.
Using a pre-installed docker-compose has the same dependency on pyyaml<6.0
, unless someone uses their own version of docker-compose or a version >2.
I have opened an issue on docker/compose to update the dependency to 6.0 : https://github.com/docker/compose/issues/9114
An attempt to not strictly depend on Docker Compose (and not on PyYAML either) is provided in this PR: #72.
Fixed by #72, would you please close the issue @PJ-Schulz ?
Hello
I would like to use pytest-docker in my library. However, I also need PyYAML with version 6.0. poetry is used as package manager. When I now install pytest-docker and PyYAML, I get a poetry SolverProblemError:
Does anyone know how to use pytest-docker with PyYAML 6.0, or how to fix this bug?