Public bug reported:

After installing the latest Python2.7 (2.7.18-1~20.04.5) there is a
problem installing packages with PIP.

2.7.18-1~20.04.5 contains security updates to tarfile.py, and the below
error is in tarfile.py, there might be a regression in tarfile.py.


testuser@test-focal:~$ mkdir ve; cd ve; virtualenv -v --python /usr/bin/python2 
--always-copy --no-wheel --no-setuptools .
find interpreter for spec PythonSpec(path=/usr/bin/python2)
proposed PythonInfo(spec=CPython2.7.18.final.0-64, exe=/usr/bin/python2, 
platform=linux2, version='2.7.18 (default, Nov 13 2024, 05:12:32) \n[GCC 
9.4.0]', encoding_fs_io=UTF-8-None)
create virtual environment via CPython2Posix(dest=/home/testuser/ve, 
clear=False, global=False)
add seed packages via FromAppData(download=False, pip=latest, 
pkg_resources=latest, via=copy, 
app_data_dir=/home/testuser/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
changing mode of /home/testuser/ve/bin/pip to 775
changing mode of /home/testuser/ve/bin/pip-2.7 to 775
changing mode of /home/testuser/ve/bin/pip2.7 to 775
changing mode of /home/testuser/ve/bin/pip2 to 775
add activators for Bash, CShell, Fish, PowerShell, Python
created virtual environment CPython2.7.18.final.0-64 in 167ms
  creator CPython2Posix(dest=/home/testuser/ve, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, pkg_resources=latest, 
via=copy, 
app_data_dir=/home/testuser/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  activators 
BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator

testuser@test-focal:~/ve$ source bin/activate

(ve) testuser@test-focal:~/ve$ python -m pip install future
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 is no longer maintained. A future 
version of pip will drop support for Python 2.7. More details about Python 2 
support in pip, can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting future
  Using cached future-1.0.0.tar.gz (1.2 MB)
ERROR: Exception:
Traceback (most recent call last):
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/cli/base_command.py",
 line 186, in _main
    status = self.run(options, args)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/commands/install.py",
 line 357, in run
    resolver.resolve(requirement_set)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 282, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 482, in prepare_linked_requirement
    hashes=hashes,
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 287, in unpack_url
    hashes=hashes,
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 164, in unpack_http_url
    unpack_file(from_path, location, content_type)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/utils/unpacking.py",
 line 261, in unpack_file
    untar_file(filename, location)
  File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/utils/unpacking.py",
 line 177, 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
---cut---


Also happens with "dpkt".

** Affects: python2.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/2089071

Title:
  tarfile.py regression: "ReadError: invalid header"

Status in python2.7 package in Ubuntu:
  New

Bug description:
  After installing the latest Python2.7 (2.7.18-1~20.04.5) there is a
  problem installing packages with PIP.

  2.7.18-1~20.04.5 contains security updates to tarfile.py, and the
  below error is in tarfile.py, there might be a regression in
  tarfile.py.

  
  testuser@test-focal:~$ mkdir ve; cd ve; virtualenv -v --python 
/usr/bin/python2 --always-copy --no-wheel --no-setuptools .
  find interpreter for spec PythonSpec(path=/usr/bin/python2)
  proposed PythonInfo(spec=CPython2.7.18.final.0-64, exe=/usr/bin/python2, 
platform=linux2, version='2.7.18 (default, Nov 13 2024, 05:12:32) \n[GCC 
9.4.0]', encoding_fs_io=UTF-8-None)
  create virtual environment via CPython2Posix(dest=/home/testuser/ve, 
clear=False, global=False)
  add seed packages via FromAppData(download=False, pip=latest, 
pkg_resources=latest, via=copy, 
app_data_dir=/home/testuser/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  changing mode of /home/testuser/ve/bin/pip to 775
  changing mode of /home/testuser/ve/bin/pip-2.7 to 775
  changing mode of /home/testuser/ve/bin/pip2.7 to 775
  changing mode of /home/testuser/ve/bin/pip2 to 775
  add activators for Bash, CShell, Fish, PowerShell, Python
  created virtual environment CPython2.7.18.final.0-64 in 167ms
    creator CPython2Posix(dest=/home/testuser/ve, clear=False, global=False)
    seeder FromAppData(download=False, pip=latest, pkg_resources=latest, 
via=copy, 
app_data_dir=/home/testuser/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
    activators 
BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator

  testuser@test-focal:~/ve$ source bin/activate

  (ve) testuser@test-focal:~/ve$ python -m pip install future
  DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. 
Please upgrade your Python as Python 2.7 is no longer maintained. A future 
version of pip will drop support for Python 2.7. More details about Python 2 
support in pip, can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Collecting future
    Using cached future-1.0.0.tar.gz (1.2 MB)
  ERROR: Exception:
  Traceback (most recent call last):
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/cli/base_command.py",
 line 186, in _main
      status = self.run(options, args)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/commands/install.py",
 line 357, in run
      resolver.resolve(requirement_set)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 177, in resolve
      discovered_reqs.extend(self._resolve_one(requirement_set, req))
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 333, in _resolve_one
      abstract_dist = self._get_abstract_dist_for(req_to_install)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py",
 line 282, in _get_abstract_dist_for
      abstract_dist = self.preparer.prepare_linked_requirement(req)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 482, in prepare_linked_requirement
      hashes=hashes,
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 287, in unpack_url
      hashes=hashes,
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/operations/prepare.py",
 line 164, in unpack_http_url
      unpack_file(from_path, location, content_type)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/utils/unpacking.py",
 line 261, in unpack_file
      untar_file(filename, location)
    File 
"/home/testuser/ve/lib/python2.7/site-packages/pip/_internal/utils/unpacking.py",
 line 177, 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
  ---cut---

  
  Also happens with "dpkt".

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/2089071/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to