Bug 985308 - Please add Python 3 subpackage to pyparted
Please add Python 3 subpackage to pyparted
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pyparted (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: PY3ANACONDA
  Show dependency treegraph
 
Reported: 2013-07-17 05:36 EDT by Bohuslav "Slavek" Kabrda
Modified: 2014-09-24 16:42 EDT (History)
5 users (show)

See Also:
Fixed In Version: pyparted-3.10.0-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-24 16:42:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add python3 subpackage and update to 3.10 (2.42 KB, patch)
2013-09-20 05:36 EDT, Bohuslav "Slavek" Kabrda
no flags Details | Diff

  None (edit)
Description Bohuslav "Slavek" Kabrda 2013-07-17 05:36:32 EDT
Hi,
since pyparted upstream has already added Python 3 support, could you possibly create python3 subpackage in Fedora?
Thanks.
Comment 1 Fedora End Of Life 2013-09-16 10:34:11 EDT
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:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 2 Bohuslav "Slavek" Kabrda 2013-09-20 05:36:52 EDT
Created attachment 800379 [details]
Add python3 subpackage and update to 3.10

Hi,
I'm attaching a patch that updates pyparted package to 3.10 and adds python3-pyparted subpackage. Would you please accept?
Thanks.
Comment 3 David Cantrell 2013-09-23 08:44:48 EDT
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.
Comment 4 Bohuslav "Slavek" Kabrda 2013-09-23 08:49:47 EDT
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?
Comment 5 Nimimo 2013-09-23 09:01:38 EDT
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
the bugs.

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.
Comment 6 David Cantrell 2013-09-23 09:05:51 EDT
(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.
Comment 7 Marcela Mašláňová 2013-09-23 09:13:08 EDT
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?

Thanks.
Comment 8 David Cantrell 2013-09-30 13:53:03 EDT
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).

Thanks.
Comment 9 Miro Hrončok 2013-10-02 07:37:00 EDT
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.
Comment 10 Robert Kuska 2014-05-27 02:42:38 EDT
Hi David,

is there any update on pyparted py3 support?
Comment 11 David Cantrell 2014-05-29 15:30:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.