Bug 1522684 - python3-pip-9.0.1-10 breaks ensurepip
Summary: python3-pip-9.0.1-10 breaks ensurepip
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1524564 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-06 09:27 UTC by Daniele Viganò
Modified: 2017-12-14 03:13 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 19:04:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniele Viganò 2017-12-06 09:27:21 UTC
Description of problem:

/usr/lib/python3.6/site-packages/pip/_vendor/ipaddress.py is missing in python3-pip-9.0.1-10.fc26.noarch

This prevents ensurepip (and venv) from working properly:

$ python3.6 -Im ensurepip
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.6/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 212, in _main
    default_pip=args.default_pip,
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 91, in bootstrap
    new_whl = rewheel.rewheel_from_record(dr, rewheel_dir.name)
  File "/usr/lib64/python3.6/ensurepip/rewheel/__init__.py", line 75, in rewheel_from_record
    new_wheel.write(os.path.join(site_dir, f), arcname=f)
  File "/usr/lib64/python3.6/zipfile.py", line 1594, in write
    zinfo = ZipInfo.from_file(filename, arcname)
  File "/usr/lib64/python3.6/zipfile.py", line 484, in from_file
    st = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/pip/_vendor/ipaddress.py'

$ python3.6 -m venv venv
Error: Command '['/home/daniele/venv/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Everything is working fine after downgrading to python3-pip-9.0.1-9.fc26.noarch:
$ python3.6 -Im ensurepip
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages
Requirement already satisfied: pip in /usr/lib/python3.6/site-packages


Version-Release number of selected component (if applicable):

python3-pip-9.0.1-10.fc26.noarch

How reproducible:

Always


Steps to Reproduce:
1. Upgrade to python3-pip-9.0.1-10.fc26.noarch
2. python3.6 -Im ensurepip

Actual results:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.6/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 212, in _main
    default_pip=args.default_pip,
  File "/usr/lib64/python3.6/ensurepip/__init__.py", line 91, in bootstrap
    new_whl = rewheel.rewheel_from_record(dr, rewheel_dir.name)
  File "/usr/lib64/python3.6/ensurepip/rewheel/__init__.py", line 75, in rewheel_from_record
    new_wheel.write(os.path.join(site_dir, f), arcname=f)
  File "/usr/lib64/python3.6/zipfile.py", line 1594, in write
    zinfo = ZipInfo.from_file(filename, arcname)
  File "/usr/lib64/python3.6/zipfile.py", line 484, in from_file
    st = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/pip/_vendor/ipaddress.py'

Expected results:

Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages
Requirement already satisfied: pip in /usr/lib/python3.6/site-packages


Additional info:

Comment 1 Charalampos Stratakis 2017-12-06 12:29:48 UTC
Hello and thanks for the bug report.

There is already an update [0] on its way to updates-testing to address this issue.

Could you test it and provide karma if it solves the problem?

You can install it directly through koji [1][2] as it still hasn't landed on the repos.

[0] https://bodhi.fedoraproject.org/updates/FEDORA-2017-eac4d90de1
[1] https://kojipkgs.fedoraproject.org//packages/python-pip/9.0.1/11.fc26/noarch/python2-pip-9.0.1-11.fc26.noarch.rpm
[2] https://kojipkgs.fedoraproject.org//packages/python-pip/9.0.1/11.fc26/noarch/python3-pip-9.0.1-11.fc26.noarch.rpm

Comment 2 Daniele Viganò 2017-12-06 20:05:55 UTC
Thanks Charalampos,

just test it and update works fine. Karma +1 given.

Comment 3 Daniele Viganò 2017-12-06 20:06:46 UTC
s/test/tested/

Comment 4 Charalampos Stratakis 2017-12-11 17:01:16 UTC
*** Bug 1524564 has been marked as a duplicate of this bug. ***

Comment 5 Kahlil Hodgson 2017-12-11 23:44:40 UTC
Seeing the same issue in F27. Downgrading to the above koji package fixes the problem though. Will this fix make its way into F27 automatically or does something else have to happen?

Comment 6 Miro Hrončok 2017-12-12 09:18:46 UTC
See [0] from comment #c1

"This update has been pushed to stable 14 hours ago"

Give it a couple more hours to sync into the mirrors.

Comment 7 Miro Hrončok 2017-12-12 09:20:17 UTC
Oh,t hat is Fedora 26. Fedora 27 is https://bodhi.fedoraproject.org/updates/FEDORA-2017-5932c4f594 - I'll push it ASAP.

Comment 8 Miro Hrončok 2017-12-12 09:22:27 UTC
(In reply to Miro Hrončok from comment #7)
> Oh,t hat is Fedora 26. Fedora 27 is
> https://bodhi.fedoraproject.org/updates/FEDORA-2017-5932c4f594 - I'll push
> it ASAP.

Says: This update has been submitted for stable by bodhi 5 hours ago.

So all wee need is to wait, or use updates-testing:

   sudo dnf update --enablerepo=updates-testing python3-pip


Note You need to log in before you can comment on or make changes to this bug.