Public bug reported:

Can be reproduced with:

docker run --rm -it ubuntu:20.04 bash -c 'apt update && apt install
python2 apport curl -y && update-alternatives --install /usr/bin/python
python /usr/bin/python2 20 && update-alternatives --set python
/usr/bin/python2 && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py |
python2 /dev/stdin && pip install "magic-wormhole<0.14.0"

Pip output:
Collecting magic-wormhole<0.14.0
  Downloading magic-wormhole-0.13.0.tar.gz (274 kB)
     |################################| 274 kB 6.2 MB/s 
ERROR: Exception:
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/base_command.py", 
line 223, in _main
    status = self.run(options, args)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/req_command.py", line 
180, in wrapper
    return func(self, options, args)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/install.py", 
line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py",
 line 180, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py",
 line 385, in _resolve_one
    dist = self._get_dist_for(req_to_install)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py",
 line 337, in _get_dist_for
    dist = self.preparer.prepare_linked_requirement(req)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", 
line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", 
line 505, in _prepare_linked_requirement
    self.download_dir, hashes,
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", 
line 263, in unpack_url
    unpack_file(file.path, location, file.content_type)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/utils/unpacking.py", line 
270, in unpack_file
    untar_file(filename, location)
  File 
"/usr/local/lib/python2.7/dist-packages/pip/_internal/utils/unpacking.py", line 
187, in untar_file
    tar = tarfile.open(filename, mode)
  File "/usr/lib/python2.7/tarfile.py", line 1708, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1762, in gzopen
    t = cls.taropen(name, mode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1738, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1602, in __init__
    self.firstmember = self.next()
  File "/usr/lib/python2.7/tarfile.py", line 2385, in next
    raise ReadError(str(e))
ReadError: invalid header

magic-wormhole is just an example, lot's of pip downloads are no longer
working with this stacktrace.

This did work with python2.7 (2.7.18-1~20.04.4) yesterday.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python2 2.7.17-2ubuntu4
ProcVersionSignature: Ubuntu 6.8.0-49.49-generic 6.8.12
Uname: Linux 6.8.0-49-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Nov 20 08:49:59 2024
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
SourcePackage: python-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

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


** Tags: amd64 apport-bug focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089136

Title:
  python2.7 (2.7.18-1~20.04.5) breaks pip tar downloads

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to