Bug 1519147

Summary: /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc gets changed in runtime
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: python-urllib3Assignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: aurelien, cheimes, infra-sig, jeremy, orion, slaznick, TicoTimo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-urllib3-1.22-3.fc27 python-urllib3-1.20-2.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-10 05:08:28 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 Jan Pazdziora (Red Hat) 2017-11-30 09:40:48 UTC
Description of problem:

Running

  python3 -c 'import urllib3'

seems to recreate /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc.

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

python3-urllib3-1.20-1.fc26.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf install -y python3-urllib3
2. rpm -Vf /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc
3. Still as root: python3 -c 'import urllib3'
4. rpm -Vf /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc

Actual results:

The first rpm -Vf passes, the second outputs

# rpm -Vf /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc
S.5....T.    /usr/lib/python3.6/site-packages/urllib3/packages/__pycache__/six.cpython-36.pyc

Expected results:

Neither rpm -Vf outputs anything because nothing should get changed in /usr in runtime.

Additional info:

This blocks our docker automation of FreeIPA because changes are reported with docker diff checks.

Comment 1 Christian Heimes 2017-11-30 09:50:07 UTC
The Fedora package unbundles the vendored copy of six by symlinking six.py. For Python 2 it also symlinks the pyc file. However the Python 3 package does NOT symlink the pyc file. I assume that is the reason for the issue.

https://src.fedoraproject.org/rpms/python-urllib3/blob/master/f/python-urllib3.spec#_96-112

Comment 2 Orion Poplawski 2017-11-30 15:39:20 UTC
Fixing component (python3-urllib3 is EPEL only)

Comment 3 Fedora Update System 2017-12-01 17:58:57 UTC
python-urllib3-1.22-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-126d567dd4

Comment 4 Fedora Update System 2017-12-01 17:59:08 UTC
python-urllib3-1.20-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-389efa1ad9

Comment 5 Fedora Update System 2017-12-02 19:55:44 UTC
python-urllib3-1.22-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-126d567dd4

Comment 6 Fedora Update System 2017-12-02 22:40:09 UTC
python-urllib3-1.20-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-389efa1ad9

Comment 7 Fedora Update System 2017-12-10 05:08:28 UTC
python-urllib3-1.22-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2017-12-12 13:43:01 UTC
python-urllib3-1.20-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.