-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The .pth mechanism breaks subprocess
#84
Comments
I think you should consider reporting this to Poetry as an issue for anyone using non-isolated installs of Poetry, although since they probably expect it to be used as a CLI only, they may not consider it a problem. Still, I think they should try to make their monkey patch compatible with the standard function or at least gracefully fall back to it when necessary. As far as poetry-dynamic-versioning goes, it may be able to skip patching Poetry if it was able to patch Poetry Core. We'd just need to make sure that that wouldn't lose any functionality. That could also run into a similar issue if Poetry Core ever introduced its own monkey patching, but that seems less likely. |
I noticed this comment from a Poetry maintainer:
Also, the latest Poetry installation instructions no longer suggest Based on that, I think this kind of |
I've gone a step further and replaced the import hacks entirely in v0.18.0. The README has the new install instructions. This prevents the plugin from inadvertently activating any of Poetry's monkey patches on a global basis. |
Thanks a lot for the effort :) |
My current
poetry
version (1.1.14) has thispoetry.utils._compat.py
:The problem is that when
poetry-dynamic-versioning
gets injected into the environment, it importspoetry
:That means now that in my virtual environment,
subprocess.run
is monkey patched with thepoetry.utils._compat.run
version, and in particular it doesn't support thecapture_output
kwarg.To reproduce:
poetry
andpoetry-dynamic-versioning
I guess the problem here is that
poetry
andpoetry-dynamic-versioning
should not be installed in the development environment, but...The text was updated successfully, but these errors were encountered: