Removing six.py from package breaks other packages

Bug #1897633 reported by Joshua Kugler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-urllib3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

There is this patch added to the python3-urllib3 package:
```
From: Daniele Tricoli <email address hidden>
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)

Revision history for this message
Joshua Kugler (jkugler) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-urllib3 - 2.0.7-1

---------------
python-urllib3 (2.0.7-1) experimental; urgency=medium

  [ Stefano Rivera ]
  * New upstream release.
  * Drop six patch and dependency on python3-six, superseded upstream.
    (Closes: #1025218, LP: #1897633)
  * Drop bundled backports.makefile from copyright, removed upstream.
  * Build with pybuild pyproject plugin.
  * Mark Build-Depends with nocheck.
  * Re-enable the full test suite.
  * Patch: Handle ConnectionRefusedError in test.requires_network()
  * Patch: Mark tests that require network
  * Patch: Don't make requests to evil.com in tests.
  * Export CI=1 in tests, to increase timeouts.
  * Allow stderr in the autopkgtest.
  * Patch: Skip expensive integration tests, that often cause timeouts.

 -- Daniele Tricoli <email address hidden> Sun, 12 Nov 2023 23:57:09 +0100

Changed in python-urllib3 (Ubuntu):
status: New → Fix Released
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.