Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1546794

Summary: python-editor: python3-editor requires both Python 2 and Python 3
Product: [Fedora] Fedora Reporter: Iryna Shcherbina <ishcherb>
Component: python-editorAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: apevec, infra-sig, jberan, rbean, social
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-editor-1.0.3-7.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 22:54:59 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:
Bug Depends On:    
Bug Blocks: 1285816, 1312032, 1340802    

Description Iryna Shcherbina 2018-02-19 15:52:32 UTC
The python3-editor (1.0.3-5.fc28) RPM requires both Python 2 and Python 3:

$  dnf --disablerepo=* --enablerepo=rawhide repoquery --requires python3-editor
/usr/bin/python2
python(abi) = 3.6

This happened due to recently introduced shebangs mangling [0], and you might see the warnings in the build log:

> + /usr/lib/rpm/redhat/brp-mangle-shebangs
> *** WARNING: mangling shebang in ./usr/lib/python3.6/site-packages/editor.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

The executable contains `#!/usr/bin/env python` shebang, which is forbidden by the guidelines and is automatically mangled to `#!/usr/bin/python2` during build. Please fix the shebang to be `#!/usr/bin/python3` explicitly [1] or remove the executable bit from the above file if not needed.

If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

[0] https://pagure.io/packaging-committee/issue/738#comment-490366
[1] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#fixing-shebangs

Comment 1 Fedora End Of Life 2018-02-20 15:35:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Jan Beran 2018-03-22 16:26:18 UTC
Hi,

I have created a PR that fixes the issue:

https://src.fedoraproject.org/rpms/python-editor/pull-request/2

May I ask to review the PR and rebuild the package?

Comment 3 Jan Beran 2018-03-22 16:39:48 UTC
Corrected PR: 
https://src.fedoraproject.org/rpms/python-editor/pull-request/3

Comment 4 Fedora Update System 2018-03-22 19:49:15 UTC
python-editor-1.0.3-7.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0a3b5dcfc9

Comment 5 Fedora Update System 2018-03-23 14:44:41 UTC
python-editor-1.0.3-7.fc28 has been pushed to the Fedora 28 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-2018-0a3b5dcfc9

Comment 6 Fedora Update System 2018-04-10 22:54:59 UTC
python-editor-1.0.3-7.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.