pip 8.1.1 (xenial) tries to access properties that were dropped from the Requirement class and when pip's code tries to access Requirement.project_name fails, this was fixed in 8.1.2.
Any user trying to install a package that triggers the pkg_resources.VersionConflict exception during will get the error "AttributeError: 'Requirement' object has no attribute 'project_name'"
root@pip-x:/home/ubuntu# pip install requests-2.11.1.tar.gz
Processing ./requests-2.11.1.tar.gz
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 600, in _prepare_file
req_to_install.check_if_exists()
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
self.req.project_name
AttributeError: 'Requirement' object has no attribute 'project_name'
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[Regression Potential]
* Low. Users consuming pip private API may see a difference in the behavior, but this is a private api and upstream already discourages its use. And this change is already part of 8.1.2
[impact]
pip 8.1.1 (xenial) tries to access properties that were dropped from the Requirement class and when pip's code tries to access Requirement. project_ name fails, this was fixed in 8.1.2.
Any user trying to install a package that triggers the pkg_resources. VersionConflict exception during will get the error "AttributeError: 'Requirement' object has no attribute 'project_name'"
[Test Case]
# wget https:/ /pypi.python. org/packages/ 49/6f/183063f01 aae1e025cf01307 72b55848750a2f3 a89bfa11b385b35 d7329d/ requests- 2.10.0. tar.gz /pypi.python. org/packages/ 2e/ad/e62744649 2cc374c284e8238 1215dcd9a0a87c4 f6e90e9789afefe 6da0ad/ requests- 2.11.1. tar.gz 2.10.0. tar.gz 2.11.1. tar.gz
# wget https:/
# pip install requests-
# pip install requests-
Expected result:
pip installs requests 2.11.1
Actual result:
pip fails with the following exception
root@pip- x:/home/ ubuntu# pip install requests- 2.11.1. tar.gz 2.11.1. tar.gz python2. 7/dist- packages/ pip/basecommand .py", line 209, in main python2. 7/dist- packages/ pip/commands/ install. py", line 328, in run build(autobuild ing=True) python2. 7/dist- packages/ pip/wheel. py", line 748, in build requirement_ set.prepare_ files(self. finder) python2. 7/dist- packages/ pip/req/ req_set. py", line 360, in prepare_files dependencies= self.ignore_ dependencies) ) python2. 7/dist- packages/ pip/req/ req_set. py", line 600, in _prepare_file to_install. check_if_ exists( ) python2. 7/dist- packages/ pip/req/ req_install. py", line 1011, in check_if_exists req.project_ name
Processing ./requests-
Exception:
Traceback (most recent call last):
File "/usr/lib/
status = self.run(options, args)
File "/usr/lib/
wb.
File "/usr/lib/
self.
File "/usr/lib/
ignore_
File "/usr/lib/
req_
File "/usr/lib/
self.
AttributeError: 'Requirement' object has no attribute 'project_name'
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[Regression Potential]
* Low. Users consuming pip private API may see a difference in the behavior, but this is a private api and upstream already discourages its use. And this change is already part of 8.1.2
[Other info]
From 8e236dd6a09bd2f 70f9d4fc886da8c 354d4c58f2 Mon Sep 17 00:00:00 2001 /github. com/pypa/ pip/commit/ 8e236dd6a09bd2f 70f9d4fc886da8c 354d4c58f2
From: Donald Stufft <email address hidden>
Date: Wed, 11 Nov 2015 18:51:46 -0500
Subject: [PATCH] Update to use the Requirement class from packaging
https:/