Description of problem: While Fedora is moving to Python 3, there's no python3-cpio package that would provide the Python 3 compatible version of the module. Version-Release number of selected component (if applicable): python-cpio-0.1-18.fc23 Actual results: no python3-cpio package available Expected results: python3-cpio package available Additional info: This blocks the oscap-anaconda-addon to be built for F23 because it requires both anaconda (which is python 3) and python-cpio.
I'll fork the python-cpio project and port it to Python 3. Secondly, package it for Fedora as a new package called python3-cpio. Regards!
If your code supports both python 2.7 and python 3 (3.3+ being a nice/achievable goal) from a single source code I will use it to replace the present code. :-)
Jose, thank you for your quick response :-) . Please review the source code I propose. Here is the link: https://github.com/ampotty/python3-cpio
Created attachment 1063070 [details] Patch to support simultaneously python 2 and 3
I have several comments to your changes: * I would only import from __future__ after the license text, there is no need to change the order, I can understand that as a personal style * why do you import object from builtins? That does not work in python 2, and as it is the class derived from object works both for python 2 and 3. * There is no need to replace the next method, in order to support both version 2 and 3 it should be enough to to create another method __next__ that calls the next method. I have attached the patch with my proposed changes.
python-cpio-0.1-19.fc23 has been submitted as an update for Fedora 23. https://admin.fedoraproject.org/updates/python-cpio-0.1-19.fc23
Package python-cpio-0.1-19.fc23: * should fix your issue, * was pushed to the Fedora 23 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-cpio-0.1-19.fc23' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-13538/python-cpio-0.1-19.fc23 then log in and leave karma (feedback).
(In reply to Fedora Update System from comment #6) > python-cpio-0.1-19.fc23 has been submitted as an update for Fedora 23. > https://admin.fedoraproject.org/updates/python-cpio-0.1-19.fc23 Doesn't work for me. Simple testing results in a traceback: $ python -c 'import cpioarchive; archive = cpioarchive.CpioArchive("python3-cpio.cpio"); print([entry.name for entry in archive])' ['./usr/lib/python3.4/site-packages/cpioarchive.py', './usr/lib/python3.4/site-packages/python_cpio-0.1-py3.4.egg-info', './usr/share/doc/python3-cpio', './usr/share/doc/python3-cpio/AUTHORS', './usr/share/doc/python3-cpio/ChangeLog', './usr/share/doc/python3-cpio/README', './usr/share/doc/python3-cpio/TODO', './usr/share/licenses/python3-cpio', './usr/share/licenses/python3-cpio/COPYING.lib', './usr/lib/python3.4/site-packages/__pycache__/cpioarchive.cpython-34.pyc', './usr/lib/python3.4/site-packages/__pycache__/cpioarchive.cpython-34.pyo'] $ python3 -c 'import cpioarchive; archive = cpioarchive.CpioArchive("python3-cpio.cpio"); print([entry.name for entry in archive])' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.4/site-packages/cpioarchive.py", line 125, in __init__ self._readfile(name) File "/usr/lib/python3.4/site-packages/cpioarchive.py", line 162, in _readfile self._readobj(open(name, 'rb')) File "/usr/lib/python3.4/site-packages/cpioarchive.py", line 172, in _readobj ce=CpioEntry(text, self, istart) File "/usr/lib/python3.4/site-packages/cpioarchive.py", line 29, in __init__ if not hdr.startswith('070701'): TypeError: startswith first arg must be bytes or a tuple of bytes, not str
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. 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 '23'. 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 23 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.
Still doesn't work, even in F24.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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.