python-configparser 3.5.0-1 breaks the python backports namespace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
configparser (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Installing python-configparser 3.5.0-1 breaks other python modules in the backports namespace.
https:/
The problem was fixed upstream in June 2018
https:/
and the current verison (3.7.3) is ok.
To see the bug in action:
# apt update
# apt install python-pip
# su ubuntu
$ pip install --user backports.os
$ python -c "from backports import os" && echo ok
ok
$ sudo apt install python-configparser
$ Setting up python-configparser (3.5.0-1) ...
$ python -c "from backports import os" && echo ok
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name os
$ sudo apt remove python-configparser
$ pip install configparser
https:/
$ pip list | grep configparser
configparser (3.7.3)
$ python -c "from backports import os" && echo ok
ok
Please pull a fix for this configparser problem into Ubuntu 18.04. Thanks!
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: python-configparser 3.5.0-1
ProcVersionSign
Uname: Linux 4.15.0-46-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Mar 21 13:57:17 2019
PackageArchitec
SourcePackage: configparser
UpgradeStatus: Upgraded to bionic on 2018-04-30 (325 days ago)
See also https:/ /github. com/jaraco/ configparser/ issues/ 17
I also verified that rebuilding the package python-configparser with the following patch, and installing that, fixes the problem here:
--- configparser- 3.5.0.orig/ setup.py 3.5.0/setup. py modules= modules, dir={'' : 'src'}, find_packages( 'src'), packages= ['backports' ], package_ data=True, safe=False, requires= requirements, 3.5.0.orig/ src/backports/ __init_ _.py 3.5.0/src/ backports/ __init_ _.py
+++ configparser-
@@ -42,7 +42,6 @@ setup(
py_
package_
packages=
- namespace_
include_
zip_
install_
--- configparser-
+++ configparser-
@@ -3,9 +3,3 @@
from pkgutil import extend_path path(__ path__, __name__) declare_ namespace( __name_ _)
__path__ = extend_
-
-try:
- import pkg_resources
- pkg_resources.
-except ImportError:
- pass