-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry should not prepend sys.path
with __vendor_site__
#8157
Comments
That would not be enough: eg the reason for vendoring Arguably fwiw the |
I agree this is not particularly fun to fix, but mangling sys.path the way it is done right now is practically guaranteed to break other poetry plugins in the future. :/ |
I suspect plugin authors will find it more efficient in the rare cases where this happens to submit an MR that simply updates the packages that poetry-core vendors. Or: to sit and wait for someone else to do that! I guess you will be the testcase for this theory... |
My (hopefully constructive) feedback is that pip has a different approach1, which seems to work reasonably well. I appreciate y'all's work on poetry, I just don't particularly appreciate poetry fiddling with my Footnotes |
Not arguing with your feedback, rather trying to be realistic about what's likely to result from it. We agree that the solution you are suggesting is likely to be tedious / not fun to fix: therefore the only way it happens is if someone who is motivated to make it happen shows up. At the moment you are the leading candidate, and you seem to be counting yourself out. Agree that this is a legit report but - like most of the backlog - I wouldn't expect that simply reporting it is likely to lead to action. |
Perfectly fine, no expectations. I'm doing enough FOSS myself. :)
More importantly, tedious to maintain. Doing a one-pass to fix it is releatively easy. But I can't commit to any long-term help, and it arguably makes all vendored dependency updates more time-consuming going forward. And I don't want to put that burden onto anyone without an explicit "yes, that's a tradeoff we want" from the maintainers. |
It took a good moment but I finally got to changing it. python-poetry/poetry-core#753 |
Problem Description
poetry-core currently prepends its
_vendor
directory (__vendor_site__
) tosys.path
here. This causes poetry plugins to pick up whatever dependency version poetry has vendored, which may not be compatible with what the plugin requires / states in its dependencies.For example, here's what we get after trying to update our poetry plugin to pydantic 2.0, which imports
TypeAliasType
fromtyping_extensions
. Poetry's 1.6.1 vendored copy does not includeTypeAliasType
, so every poetry command crashes immediately:This could be fixed by vendoring similar to how pip does it, i.e. without modifying
sys.path
but by explictly importing frompoetry.core._vendor
.The text was updated successfully, but these errors were encountered: