Bug 1314047
Summary: | doclifter: Switch to Python 3 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomas Orsava <torsava> |
Component: | doclifter | Assignee: | Mario Blättermann <mario.blaettermann> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | mario.blaettermann, mhroncok, pviktori |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-12-12 11:00:45 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 |
Description
Tomas Orsava
2016-03-02 19:30:03 UTC
The latest version 2.17 has been built for Rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=13401553 A build for f24 is also done, but I'm not sure if I should switch to the Python 3 version right now. After some tests with a locally built package under f23, I don't see any peculiarities so far in doclifter itself. The batch script "manlifter" included in the package doesn't work either: $ manlifter File "/usr/bin/manlifter", line 181 except OSError, e: ^ SyntaxError: invalid syntax This is the appropriate part of the Python file: def deploy(source, target): try: os.rename(source, target) except OSError, e: return(3, "Rename of %s to %s failed, errno = %d" % (source, target, e.errno,)) return (0, "") Unfortunately, I don't have any Python skills. Any help is very appreciated. Indeed, the manlifter script is not ported, despite the NEWS entry for 2.16 saying otherwise. Can you bring this up with the upstream? I can try writing a patch but I'd need to get familiar with the code first. I've contacted the upstream developer Eric S. Raymond, waiting for the answer. I've got an answer from Eric: 1. I ported doclifter to run under 2 or 3, but somehow forgot to do the same to manlifter. Your error is Python 3 tripping over Python 2 exception syntax. Sorry. 2. When I rectified that error, I tripped over this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764848 It seems that in some Python 3 versions, including 3.4.2~rc1-1 and the 3.4.3 version I'm running, the subprocess.getstatusoutput() function has a bug that can confuse manlifter into thinking the called doclifter process received signal 2 (SIGINT) when it was actually trying to return termination status 2. The head version in the repository is now fully ported to run under 2 or 3, but because of this bug I have set the shebang line to call "python2". Is this a satisfactory workaround under Red Hat? If it is, I'll ship a 2.18 point release for you to package. At some future date, when it is esrablished that the bug has been fixed, you can change the shebang line to call "python" and it should work. Any idea how to fix it ? I think it's satisfactory; as Eric says, changing the shebang could be done in Fedora's specfile. I can't reproduce the error on Pyhon 3.4.3 in Fedora 24. (I tried with subprocess.getstatusoutput("exit 2") and subprocess.getstatusoutput("sleep 500") and killing the sleep with SIGINT, and I got (2, '') and (-2, '') respectively.) err, I meant Fedora 23 Strange, with the same python version 3.4.3 I still get the same syntax error. That's why I won't switch back to a Py2/py3 mix to get it running for me in f23; I will keep the current v2.16 there. I'll do a test installation of f24 next days. If it works there for me, then I will push the built package to testing. Just tested on a fresh f24 alpha, I get the same error message from manlifter. It is strange that the error message is not always reproducible, see comment #5. I've set the shebang in manlifter explicitely to /usr/bin/python3 because /usr/bin/python still links to the Python2 interpreter. Changing it to the latter would lead to a mix of Py2 and Py3 in the package. What to do? BTW, I don't have a Rawhide to test whether it would work there. But I'm afraid it would also fail, Rawhide has the same Python3 version (3.5.1). It works fine with Python2 so far. But it needs root permissions to create the subdirectory "xmlman" for the xml'ed man pages. I haven't used manlifter for some time, don't know anymore if this is the default behavior. This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. This was switched already: Sat Feb 27 2016 Mario Blättermann <mario.blaettermann> - 2.16-1 - New upstream version - Switch to Python 3 Thanks, Mario. |