-
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 forgetting some dependencies (mix of extras, groups and version markers) #9634
Comments
this is a variation on "recording in this case it is the Right Way to fix this IMO is not to put I expect that sorting that out will be quite the tangle for someone. |
Might be fixed in the main branch. 1.8.3:
main:
|
Pretty sure it isn't, maybe the luck of which |
Apparently I knew about this at #6372 (comment) |
I am going to consider this a solved issue. |
This is not a solved issue |
Description
I am the maintainer of a package, procrastinate. Procrastinate is compatible with py3.8+
This package provides an optional Sphinx extension, so the package has sphinx as an extra dependency.
Procrastinate, independently, also has a doc that is built with sphinx.
Building procrastinate's own doc needs Sphinx v8 (but the Sphinx extension provided by Procrastinate does not)
Sphinx v8 only supports py3.10+
Consequently, Procrastinate has an optional dependency group that includes sphinx with v8+ (only for py3.10+) (the doc is built with a modern python, so all is well)
On Sphinx v7, Sphinx has a dependency to
importlib-metadata
but only for py < 3.10On v8, they dropped this dependency, given py < 3.10 isn't required anymore.
https://github.com/sphinx-doc/sphinx/blob/v7.4.7/pyproject.toml#L74C6-L74C24
When installing my env with py3.8,
poetry
says that importlib-metadata isSkipped for the following reason: Not required
, and so it's not installed, but it IS required (and it fails at runtime because it's not there)(below is a simple reproducer
pyproject.toml
that showcases the issue)Interestingly: here we have the issue without the
docs
group. If I remove thedocs
group from pyproject.toml, then it works normally.importlib-metadata
is a part of poetry.lock, andsphinx
appears twice inpoetry.lock
(once with v7 and once with v8), as expected.Workarounds
None identified
Poetry Installation Method
pipx
Operating System
Mac OS 14.2.1 (23C71) (Sonoma)
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: