[all] extra requirement does not install all extras

Bug #1672874 reported by Sorin Sbarnea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Won't Fix
Undecided
Unassigned
python-novaclient
New
Undecided
Unassigned

Bug Description

PBR documentations states at https://docs.openstack.org/developer/pbr/#extra-requirements that is follows PEP-426 from https://www.python.org/dev/peps/pep-0426/#extras-optional-dependencies

Still, it seems that the implementation is incomplete as I was able to spot at least two bugs:

* Special "all" does not install all defines extras
* Special "alldev" extra does not install: test , build , doc , and dev extras.
* The documentation example is using "testing" extra name but the pep specifies "test" as the name. Use of standard names should be encouraged.

How to replicate? Edit setup.cfg and add one extras like:
```
[extras]
zzzz =
    aaaaaa
test =
    bbbbbb
```

Now you can test the behaviour by running commands like:
```
pip install -e '.[all]'
# supposed to pick both zzzz and test extras

pip install -e '.[alldev]'
# supposed to include test extra but it does not

pip install -e '.[zzzz]'
# this is the only one that works correctly
```

Note: you are free not skip using `-e` param because it does not change the behaviour.

Why is this bug so important? Is this bug would be solved we could all use the `pip install -e '.[all]'` as replacement for a full install that includes testing, a general interface that would work for any package even if they have test-requirements.txt files or not. This would be a great simplification.

Revision history for this message
Charles (cblegare-atl) wrote :

Good to know:

- PEP 426 has been withdrawn

- This may break PEP 508 compatibility with some packages: 'all' and 'alldev' are valid extra identifiers

- There is a pip issue about this for globbing extras like so

  pip install -e '.[*]'

  at https://github.com/pypa/pip/issues/5039

Revision history for this message
Ben Nemec (bnemec) wrote :

Since the pep was withdrawn, I don't think it makes sense to implement this. If the pip feature is ipmlemented and doesn't work in PBR, please feel free to open a new bug for adding support.

Changed in pbr:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.