You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a package's extras contains an underscore pip will warn that the package "does not provide the extra" when in fact it does.
Expected behavior
I expected that whether a package specifies an extra named foo-bar or foo_bar that anyone should be able to pip install the extra dependency foo-bar or foo_bar without any warnings.
pip version
23.3.1
Python version
3.10.1
OS
Ubuntu 20.04.6 LTS
How to Reproduce
Create a setup.cfg file with the following contents:
[metadata]name = hello_hello
version = 0.0.0
[options.extras_require]bye_bye =
typing-extensions
Create a setup.py file with the following contents:
fromsetuptoolsimportsetupsetup()
Then run pip install -e '.[bye_bye]'.
Note:
A warning is emitted: "WARNING: hello-hello 0.0.0 does not provide the extra 'bye-bye'".
The bye-bye extras is used, and (in this case) typing-extensions is installed as desired.
Known Workaround
If I instead specify the extras with a hyphen, by making the following change to my setup.cfg:
Description
If a package's
extras
contains an underscorepip
will warn that the package "does not provide the extra" when in fact it does.Expected behavior
I expected that whether a package specifies an extra named
foo-bar
orfoo_bar
that anyone should be able to pip install the extra dependencyfoo-bar
orfoo_bar
without any warnings.pip version
23.3.1
Python version
3.10.1
OS
Ubuntu 20.04.6 LTS
How to Reproduce
setup.cfg
file with the following contents:setup.py
file with the following contents:pip install -e '.[bye_bye]'
.Note:
bye-bye
extras is used, and (in this case)typing-extensions
is installed as desired.Known Workaround
If I instead specify the extras with a hyphen, by making the following change to my setup.cfg:
The above command
pip install -e '.[bye_bye]'
runs successfully without any warning.Also note that in both situations, the behavior does not change if I specify
pip install -e '.[bye-bye]'
from the command line.Output
Code of Conduct
The text was updated successfully, but these errors were encountered: