This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients jaraco, kkirsche, kkirsche-github
Date 2022-03-13.18:50:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647197442.82.0.570940857763.issue46774@roundup.psfhosted.org>
In-reply-to
Content
Aha. I learned how to run commands in the poetry environment... and how to locate files in that environment. With that, I figured out where the environment is and where the package metadata is coming from:

```
$ docker run -it @$(docker build -q .) bash -c 'ls $(poetry env info -p)/lib/python3.10/site-packages/poetry*'
/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked.pth

/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked-0.1.0.dist-info:
INSTALLER  METADATA  RECORD

/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked-0.2.0.dist-info:
INSTALLER  METADATA  RECORD
```

In this case, it's clear there is metadata for the `poetry-remove-untracked` package in duplicate, and importlib.metadata loads that metadata in whatever order the operating system provides it (lexicographic alphabetic sort usually). `importlib.metadata` doesn't have any means to determine which of those metadata are appropriate and doesn't support multiple versions of the same distribution being installed into the same path.

Since poetry has acknowledged this issue is a bug, I suspect there's nothing more for importlib.metadata to do here, but do please report back if you have different expectations.
History
Date User Action Args
2022-03-13 18:50:42jaracosetrecipients: + jaraco, kkirsche, kkirsche-github
2022-03-13 18:50:42jaracosetmessageid: <1647197442.82.0.570940857763.issue46774@roundup.psfhosted.org>
2022-03-13 18:50:42jaracolinkissue46774 messages
2022-03-13 18:50:42jaracocreate