Operational Defect Database

BugZero found this defect 131 days ago.

MongoDB | 2540713

some pip modules do not define correct requirements

Last update date:

3/10/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0.0-rc0

Description:

Info

Poetry installs packages assuming the underlying packages correctly list all of there dependencies, however in some cases these packages assume things about the installation tools being used to install and do not list them as a dependency. This means poetry will not consider the underlying install tools in is dependency graph resolver and will install things out of order. This can be worked around on our side by update the installation tools before installing poetry. This is mostly an issue on windows environments. python3 -m pip install -U pip setuptools wheel virtualenv python3 -m pip install poetry==1.5.1 export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring python3 -m poetry install --no-root --sync

Top User Comments

max.hirschhorn@10gen.com commented on Fri, 16 Feb 2024 18:30:32 +0000: I was discussing this issue with spencer.jackson@mongodb.com and he had a good idea for the root cause. Poetry is not meant to be installed and run from the same virtual environment as the virtual environment it is managing yet that is exactly how we're using it. In particular, python -m pip install poetry==1.5.1 would cause distlib==0.3.8 to be installed into the virtual environment and prior to the changes from SERVER-86089 distlib==0.3.7 was specified in the poetry.lock file for poetry to later install. Any dependencies shared between poetry and our poetry.lock file are at risk of being uninstalled while poetry is attempting to update the dependencies and cause this type of problem. $ /opt/mongodbtoolchain/v4/bin/python3 -m virtualenv --verbose python3-venv $ source ./python3-venv/bin/activate $ python -m pip install 'poetry==1.5.1' $ python -m pip list | grep distlib distlib 0.3.8 $ PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring python -m poetry install --no-root --sync ... • Updating distlib (0.3.8 -> 0.3.7)

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...