[Bug 1812589] [NEW] pip's configparser dependency breaks backports namespace conventions

Launchpad Bug Tracker 1812589 at bugs.launchpad.net
Sun Aug 30 08:11:31 UTC 2020


You have been subscribed to a public bug:

This is specifically a problem with the debundling of the pip package,
see https://github.com/pypa/pip/issues/6149 for further discussion.

Environment
pip version: python-pip (9.0.1-2.3)
Python version: Python 2.7.15+
OS: Ubuntu 18.10

Description
The python-pip package (at least on Ubuntu 18.10) depends on the python-configparser package, which dumps a blank __init__.py into the /usr/lib/python2.7/dist-packages/backports directory. However, backports should instead be defined as a namespace package (see PEP 420 and https://pypi.org/project/backports/). While this is not good in general, this is particularly problematic for pip because the some of packages it installs do not work as a result!

Expected behavior
pip should be able to install backports packages, which can then be imported without error.

How to Reproduce
After installing python-pip, run command pip install backports.shutil_which (the specific backports package does not particularly matter)
Then run from backports.shutil_which import which inside a python shell
An error occurs.

Output
>>> from backports.shutil_which import which
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named shutil_which```

** Affects: configparser (Ubuntu)
     Importance: Undecided
         Status: Confirmed

-- 
pip's configparser dependency breaks backports namespace conventions
https://bugs.launchpad.net/bugs/1812589
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to configparser in Ubuntu.



More information about the foundations-bugs mailing list