Bug 1320653 - shiboken: Provide a Python 3 subpackage
Summary: shiboken: Provide a Python 3 subpackage
Alias: None
Product: Fedora
Classification: Fedora
Component: shiboken
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Felix Schwarz
QA Contact: Fedora Extras Quality Assurance
Keywords: FutureFeature
Depends On: 1308126 1352326 1424433
Blocks: PYTHON3-UPSTREAM 1045780
TreeView+ depends on / blocked
Reported: 2016-03-23 17:19 UTC by Tomas Orsava
Modified: 2018-02-13 10:07 UTC (History)
8 users (show)

Clone Of:
Last Closed: 2018-02-13 09:18:19 UTC

Attachments (Terms of Use)
proposed changes to add Python 3 subpackage + 1.2.4 version bump (6.38 KB, patch)
2016-08-08 10:22 UTC, Felix Schwarz
no flags Details | Diff
support Python 3.5 + egg_info for PySide (70.95 KB, patch)
2016-08-08 10:29 UTC, Felix Schwarz
no flags Details | Diff

Description Tomas Orsava 2016-03-23 17:19:53 UTC
Upstream, this software supports Python 3. Please provide a Python 3
package for Fedora.

According to the Python packaging guidelines [0], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [1].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 24 as well.

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

[0] https://fedoraproject.org/wiki/Packaging:Python
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Comment 1 Rex Dieter 2016-03-23 17:25:20 UTC
Depends on your definition of "if upstream supports it".

In this case, yes, there is a build option for python3, but it is not enabled by default... maybe for good reason(s).  I'd rather get an answer for that first.

Comment 2 Rex Dieter 2016-03-23 17:26:35 UTC
(not that I'm authoritative, I'm not the primary maintainer)

Comment 3 Tomas Orsava 2016-04-06 15:32:30 UTC
Would you check with upstream then? Fedora is slowly but inevitably moving towards Python 3, so your efforts are greatly appreciated!

Comment 4 Jan Kurik 2016-07-26 04:27:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 5 Felix Schwarz 2016-08-08 10:11:33 UTC
(In reply to Rex Dieter from comment #1)
> In this case, yes, there is a build option for python3, but it is not
> enabled by default... maybe for good reason(s).  I'd rather get an answer
> for that first.

I'm using PySide with Python 3.3-3.5 on a daily basis in production. Even though our app is not too complicated we did not see big problems. PySide (or shiboken) contains a few bugs but so far all these bugs were also present in the Python 2 version.

(In reply to Tomas Orsava from comment #3)
> Would you check with upstream then?

Well, upstream is somewhat "dormant": The QT company is supposedly working on PySide 2 which should support QT 5 (only) but there is not much public activity visible. Anyhow I can attest that PySide works for me with Python 3. I applied for co-maintainership in the package db so hopefully I can push Python patches soon.

Comment 6 Felix Schwarz 2016-08-08 10:22 UTC
Created attachment 1188602 [details]
proposed changes to add Python 3 subpackage + 1.2.4 version bump

This patch does a couple of things and I don't have enough time right now to untangle them:
 - resolve the FTBS failures (bug 1240001, bug 1308126)
 - update to latest upstream version 1.2.4 (no bug in rhbz currently)
 - provide a Python 3 subpackage

If my request for co-maintainership for shiboken is granted I plan to commit this patch for F25+ (not sure about F24 - I'm using it on F24 so it should be pretty low risk but I'd only do so if there are specific requests from users).

Comment 7 Felix Schwarz 2016-08-08 10:29 UTC
Created attachment 1188609 [details]
support Python 3.5 + egg_info for PySide

Comment 8 Felix Schwarz 2016-08-08 10:37:12 UTC
Ok, sorry for the noise: I intended to add attachment 1188609 [details] to bug 1045780 (PySide). Previous attachment 1188602 [details] applies to this bug.

Comment 9 Felix Schwarz 2016-09-17 09:24:42 UTC
I'm still working on getting Python 3 to build but there is a failing test on ARM (and I don't have an ARMv7 system for testing). I have to check more closely what other distros are doing with that situation (OpenSuse just disables all tests which I don't like, I think Debian's solution is a bit more sophisticated).

Comment 10 Charalampos Stratakis 2016-09-22 14:11:02 UTC
Maybe someone at #fedora-arm would be able to test/debug it?

Also: https://fedoraproject.org/wiki/Test_Machine_Resources_For_Package_Maintainers

Comment 11 Felix Schwarz 2016-10-04 12:32:38 UTC
(In reply to Charalampos Stratakis from comment #10)
> Also:
> https://fedoraproject.org/wiki/Test_Machine_Resources_For_Package_Maintainers

That's helpful - I'll definitively use this to debug the issue in the next days.

Comment 12 Felix Schwarz 2016-12-26 21:09:45 UTC
Ok, that was more than a few days but I have access to Fedora's ARM machines so hopefully I can figure out something.

Comment 13 Felix Schwarz 2017-01-01 14:19:37 UTC
as I resolved the FTBS bug in F25+rawhide (bug 1308126), I'll try to get a Python 3 package working. I guess this will require additional work in F26 because of Python 3.6.

Comment 15 Felix Schwarz 2018-02-10 11:21:31 UTC
(In reply to Orion Poplawski from comment #14)
> I've put together a pull request for this:
> https://src.fedoraproject.org/rpms/shiboken/pull-request/2

Thank you very much for this. Incidentally I also updated my patches for shiboken+pyside for Python 3 two weeks ago but wanted to test it locally with some of my in-house apps for a while. Then I caught the flu last week so I could not push these.

I'll to merge your changes tomorrow or latest Monday. Probably I'll add some changes of mine on top (or modify some or yours, e.g. I'd like to have the Python 3 patches split up) but that's fine.

Btw: Do you have some Python 3 (or Python 2) PySide apps which you could test with some of my (to be published) patches? I only have a few Python 3 apps and I guess it is pretty easy for me to miss some bugs.

Comment 16 Orion Poplawski 2018-02-10 20:15:40 UTC
I'm hoping to test with yubikey-piv-manager which is what is driving this for me.

Comment 17 Felix Schwarz 2018-02-13 09:18:19 UTC
Thanks to Orion Poplawski we got this over the finish line.

shiboken for F28+ now has a Python 3 package. I plan to push my Python 3 patches this week so we'll finally have a Python 3-ready PySide. See bug 1045780 for the PySide work.

Comment 18 Petr Viktorin 2018-02-13 10:07:06 UTC
That is amazing news! Thank you Felix and Orion!

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