-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
python-poetry/poetry-core
#753Labels
area/coreRelated to the poetry-core libraryRelated to the poetry-core libraryarea/depsRelated to representing and locking dependenciesRelated to representing and locking dependencieskind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged
Description
Problem Description
poetry-core currently prepends its _vendor
directory (__vendor_site__
) to sys.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
from typing_extensions
. Poetry's 1.6.1 vendored copy does not include TypeAliasType
, so every poetry command crashes immediately:
$ poetry help
cannot import name 'TypeAliasType' from 'typing_extensions' (/home/user/venv/lib/python3.11/site-packages/poetry/core/_vendor/typing_extensions.py)
This could be fixed by vendoring similar to how pip does it, i.e. without modifying sys.path
but by explictly importing from poetry.core._vendor
.
heitorlessa and pythrick
Metadata
Metadata
Assignees
Labels
area/coreRelated to the poetry-core libraryRelated to the poetry-core libraryarea/depsRelated to representing and locking dependenciesRelated to representing and locking dependencieskind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged