[SRU] python3-lxc breaks pip3 freeze in Xenial

Bug #1611503 reported by Barry Warsaw
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)
Fix Released
High
Unassigned
Xenial
Fix Released
High
Barry Warsaw

Bug Description

[Impact]

As reported here: https://github.com/pypa/pip/issues/3681

$ apt install python3-pip python3-lxc
$ pip freeze
--crash with traceback--

However, this happens in Xenial *not* in Yakkety. I forgot to cherry pick the fix for this in the last 16.04 python-pip SRU, so this is the bug to track that. Specifically, this cherry picks skip-bad-requirements.patch from Yakkety to Xenial.

[Test Case]
$ sudo apt install python3-pip python3-lxc
$ pip3 freeze

[Regression Potential]
Highly unlikely. This patch was blessed by upstream and has been in the Debian unstable and Yakkety series for quite a while, with no bugs reported.

Barry Warsaw (barry)
summary: - python3-lxc breaks pip3 freeze in Xenial
+ [SRU] python3-lxc breaks pip3 freeze in Xenial
Changed in python-pip (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Barry Warsaw (barry)
Barry Warsaw (barry)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Barry, or anyone else affected,

Accepted python-pip into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-pip/8.1.1-2ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-pip (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in python-pip (Ubuntu):
importance: Undecided → High
status: New → Fix Released
Revision history for this message
ttosttos (ttosttos) wrote :
Download full text (4.2 KiB)

Will this fix also be available for Trutsy? It also impacts that release:

user@host:~$ pip3 list
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/packaging/requirements.py", line 90, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1137, in parseString
    raise exc
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1127, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1001, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 2412, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1001, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 2669, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1001, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 2395, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1005, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1785, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py", line 2818, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/_vendor/packaging/requirements.py", line 94, in __init__
    requirement_string[e.loc:e.loc + 8]))
pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'-lxc==0.'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 151, in output_packag...

Read more...

Revision history for this message
Stuart Bishop (stub) wrote :

The fix in python-pip and python3-pip 8.1.1-2ubuntu0.2 fix the problem for me.

tox still explodes with sitepackages=True, until you add pip<8.1.2 to your dependencies. This is a separate issue.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for python-pip has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package python-pip - 8.1.1-2ubuntu0.2

---------------
python-pip (8.1.1-2ubuntu0.2) xenial; urgency=medium

  * d/patches/skip-bad-requirements.patch: Cherry pick from Yakkety to fix
    crash in `pip3 freeze` when `python3-lxc` is installed. (LP: #1611503)

 -- Barry Warsaw <email address hidden> Tue, 09 Aug 2016 16:22:49 -0400

Changed in python-pip (Ubuntu Xenial):
status: Fix Committed → 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.