Bug 1522684

Summary: python3-pip-9.0.1-10 breaks ensurepip
Product: [Fedora] Fedora Reporter: Daniele Viganò <dennyvatwork>
Component: python-pipAssignee: Tomas Orsava <torsava>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: bkabrda, cstratak, extras-orphan, jaruga, metherid, mhroncok, ncoghlan, python-sig, tflink, TicoTimo, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 19:04:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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