[Bug 1897633] [NEW] Removing six.py from package breaks other packages

Joshua Kugler 1897633 at bugs.launchpad.net
Mon Sep 28 22:11:15 UTC 2020


Public bug reported:

There is this patch added to the python3-urllib3 package:
```
From: Daniele Tricoli <eriol at mornie.org>
Date: Thu, 8 Oct 2015 13:19:46 -0700
Subject: Do not use embedded copy of python-six.

Forwarded: not-needed

Patch-Name: 01_do-not-use-embedded-python-six.patch
```
This removes six.py from /usr/lib/python3/dist-packages/urllib3/packages/. However, other packages reply on six.py being there, such as https://github.com/dopstar/requests-ntlm2/. Removing six.py breaks those packages, resulting in tracebacks like:

```
$ python3 -c 'from requests_ntlm2 import HttpNtlmAuth'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/__init__.py", line 1, in <module>
    from .adapters import HttpNtlmAdapter, HttpProxyAdapter
  File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/adapters.py", line 10, in <module>
    from .connection import HTTPConnection as _HTTPConnection
  File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/connection.py", line 9, in <module>
    from requests.packages.urllib3.packages.six.moves.http_client import (
ModuleNotFoundError: No module named 'requests.packages.urllib3.packages.six
```

If the file is not put back, at least having a symlink there would be
nice.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python3-urllib3 1.25.8-2
Uname: Linux 5.7.0-050700-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Mon Sep 28 13:57:21 2020
InstallationDate: Installed on 2018-04-20 (892 days ago)
InstallationMedia: Kubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-urllib3
UpgradeStatus: Upgraded to focal on 2020-09-04 (23 days ago)

** Affects: python-urllib3 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-urllib3 in Ubuntu.
https://bugs.launchpad.net/bugs/1897633

Title:
  Removing six.py from package breaks other packages

Status in python-urllib3 package in Ubuntu:
  New

Bug description:
  There is this patch added to the python3-urllib3 package:
  ```
  From: Daniele Tricoli <eriol at mornie.org>
  Date: Thu, 8 Oct 2015 13:19:46 -0700
  Subject: Do not use embedded copy of python-six.

  Forwarded: not-needed

  Patch-Name: 01_do-not-use-embedded-python-six.patch
  ```
  This removes six.py from /usr/lib/python3/dist-packages/urllib3/packages/. However, other packages reply on six.py being there, such as https://github.com/dopstar/requests-ntlm2/. Removing six.py breaks those packages, resulting in tracebacks like:

  ```
  $ python3 -c 'from requests_ntlm2 import HttpNtlmAuth'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/__init__.py", line 1, in <module>
      from .adapters import HttpNtlmAdapter, HttpProxyAdapter
    File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/adapters.py", line 10, in <module>
      from .connection import HTTPConnection as _HTTPConnection
    File "/usr/local/lib/python3.8/dist-packages/requests_ntlm2/connection.py", line 9, in <module>
      from requests.packages.urllib3.packages.six.moves.http_client import (
  ModuleNotFoundError: No module named 'requests.packages.urllib3.packages.six
  ```

  If the file is not put back, at least having a symlink there would be
  nice.

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: python3-urllib3 1.25.8-2
  Uname: Linux 5.7.0-050700-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.9
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: KDE
  Date: Mon Sep 28 13:57:21 2020
  InstallationDate: Installed on 2018-04-20 (892 days ago)
  InstallationMedia: Kubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215)
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python-urllib3
  UpgradeStatus: Upgraded to focal on 2020-09-04 (23 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-urllib3/+bug/1897633/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list