Red Hat Bugzilla – Bug 985308
Please add Python 3 subpackage to pyparted
Last modified: 2014-09-24 16:42:42 EDT
since pyparted upstream has already added Python 3 support, could you possibly create python3 subpackage in Fedora?
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.
More information and reason for this action is here:
Created attachment 800379 [details]
Add python3 subpackage and update to 3.10
I'm attaching a patch that updates pyparted package to 3.10 and adds python3-pyparted subpackage. Would you please accept?
pyparted-3.10 is broken, there's a reason I'm not using it. I cannot take a release back, but you'll notice I've made further releases on the 3.9.x series (check the timestamps). Right now, 3.9.x is stable and 3.10 should not be used. We still have work to do on the Python 3 support in pyparted. Patches welcome there, but all of the work there needs to ensure that Python 2 support does not break and that it can be a drop-in replacement on a current system for an existing pyparted.
Why close the bug? Will you never upgrade to 3.10? Wouldn't it be better to leave it open until you can use the patch?
What sorts of problems are there with 3.10? Do you have any bug reports/failing tests? Where do I start with that?
Background: The I did most of the Python 3 port; I started with someone else's Py3-only work and made the test suite pass in both Pythons. Somewhere along the way Python 2 was changed to use Unicode strings, and it broke anaconda in various ways.
----- quoting an email reply to David -----
> The core issue is the use of Unicode strings. I am trying to understand why
> you did this with the Python 3 port of the code. Can you explain? If it's
> not necessary, I am going to remove it because libparted cannot deal with
> Unicode strings correctly (and really doesn't need to).
It was probably the path of least resistance.
I'm sorry I didn't notice some of the Python 2 api had switched to Unicode;
I have relied only on my own app and the pyparted testsuite when ironing out
Byte strings would make sense for anything that's serialised from the disk.
The rest should be native strings, which are Unicode only on Python 3.
The PyUnicode_AsUTF8 macro might still be useful, if misnamed (I defined it to
return native strings on Python 2), but the PyUnicode_FromString references are
mostly incorrect in Python 2.
So, what's left is to add a few tests that check that both Pythons are using their default string types, and to pass these tests by using appropriately #ifdefined macros instead of PyUnicode_AsUTF8 and PyUnicode_FromString.
(In reply to Bohuslav "Slavek" Kabrda from comment #4)
> Why close the bug? Will you never upgrade to 3.10? Wouldn't it be better to
> leave it open until you can use the patch?
I will never use the 3.10 release of pyparted that I made. Remember, I'm the upstream pyparted developer. I don't need this patch.
> What sorts of problems are there with 3.10? Do you have any bug
> reports/failing tests? Where do I start with that?
See comment #5. I rushed 3.10 in to Fedora and as Nimimo explains, the Unicode string stuff caused us a lot of problems in anaconda. So there's work to do on that front. But we already know about that, it's just that this is low priority for us right now. That's why I haven't made a 3.11 release yet.
Rather than CLOSED NOTABUG, I would rather pick CLOSED I_ALREADY_KNOW_ABOUT_THIS.
Guys, this bug exists also for tracking how many packages need fixes for Python3.
Now I have to assume that we shouldn't think about pyparted at all and it will be fixed in time without Python SIG interaction. Right or did I misunderstand the last statement?
You can leave this open to track things for Fedora. I don't use Bugzilla to track bugs in upstream development of pyparted. Sorry for the confusion.
I was just wanting everyone to understand that upstream pyparted is *me*. I know I made a 3.10 release and there was the idea of Python 3 support in it. But it still needs work. This is why I have a 3.9.x stable branch I'm maintaining and that's why you'll find it in Fedora right now because there is still ongoing work on the Python 3 work in pyparted. I don't need people to file bugs to tell me that I've made a release and I should upgrade to it (except in this case I'm not because I should have never pushed that release out).
Opening to track things for Fedora.
We would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.
From that perspective, your package is considered as IMPORTANT - that means, is has to be updated to Python 3, for our intention come true.
is there any update on pyparted py3 support?
I haven't worked on Python 3 support in pyparted since I last pushed out the 3.10 release. It's still on the to do list and once RHEL 7.0 is out, I will have some time to work on it. It's definitely something I'm going to do, but not really critical at the moment because there are so many other things that the installer depends on that are restricted to Python 2 right now.