[Python-modules-team] Bug#770284: requests: should not use system modules during build process

Edward Betts edward at 4angle.com
Thu Nov 20 08:38:04 UTC 2014

Source: requests
Version: 2.4.3
Severity: normal

I downloaded the source package for requests and I'm rebuilding it with the
patch from #770172. The build process fails because setup.py pulls in the
system version of the urllib3 library, which is currently broken.

I assume I will be able to build requests if I uninstall python-requests.

The requests package should not be using the system installed requests
library during build.

Here is the build log:

edward at x230:~/src/debian/requests-2.4.3$ debuild -uc -us -b
 dpkg-buildpackage -rfakeroot -D -us -uc -b
dpkg-buildpackage: source package requests
dpkg-buildpackage: source version 2.4.3-5
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Barry Warsaw <barry at debian.org>
 dpkg-source --before-build requests-2.4.3
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
dh clean --with python2,python3 --buildsystem=pybuild
   dh_testdir -O--buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:170: python2.7 setup.py clean 
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    import requests
  File "/home/edward/src/debian/requests-2.4.3/requests/__init__.py", line 68, in <module>
    _attach_namespace(urllib3, 'requests.packages')
  File "/home/edward/src/debian/requests-2.4.3/requests/__init__.py", line 63, in _attach_namespace
    module = __import__(name)
  File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 73, in <module>
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
E: pybuild pybuild:256: clean: plugin distutils failed with: exit code=1: python2.7 setup.py clean 
dh_auto_clean: pybuild --clean -i python{version} -p 2.7 --dir . returned exit code 13
debian/rules:6: recipe for target 'clean' failed
make: *** [clean] Error 13
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1373:
dpkg-buildpackage -rfakeroot -D -us -uc -b failed
edward at x230:~/src/debian/requests-2.4.3$ 

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

More information about the Python-modules-team mailing list