Bug 985321 - iscsi-initiator-utils Python 3 compatibility
iscsi-initiator-utils Python 3 compatibility
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: iscsi-initiator-utils (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Chris Leech
Fedora Extras Quality Assurance
:
Depends On:
Blocks: PY3ANACONDA
  Show dependency treegraph
 
Reported: 2013-07-17 05:50 EDT by Bohuslav "Slavek" Kabrda
Modified: 2015-07-15 13:19 EDT (History)
6 users (show)

See Also:
Fixed In Version: iscsi-initiator-utils-6.2.0.873-25.gitc9d830b.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-15 13:19:24 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)
iscsi-initiator-utils Python 3 compat patch (7.38 KB, patch)
2015-01-21 12:09 EST, Bohuslav "Slavek" Kabrda
no flags Details | Diff

  None (edit)
Description Bohuslav "Slavek" Kabrda 2013-07-17 05:50:46 EDT
Hi,
is there any plan/estimate of making iscsi-initiator-utils compatible with Python 3? I'm currently trying to figure out what it'd take to move Fedora to Python 3 and since iscsi-initiator-utils is one of Anaconda's deps, it'd need to be converted as one of the first.
Thanks.
Comment 1 Fedora End Of Life 2013-09-16 10:34:34 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 Miro Hrončok 2013-10-01 10:27:51 EDT
If you need any extra hand with this, feel free to use me :)
Comment 3 Miro Hrončok 2013-10-02 07:34:16 EDT
Hi, 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.

The goal here is, that this package uses Python 3 as default in Fedora 22.

Please, help use update to Python 3 flawlessly.

Check if upstream already support Python 3, if yes, use it and add te support to the package.

If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help.

When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option.

Chances are, that you ARE the upstream. In that case, everything is easier, just do it yourself.

Once Python 3 is supported, check your package, if it works with it. Don't switch to Python 3 yet as a default (that's still against the guidelines). I recommend to prepare your spec and conditionalize the thing with something like %global default_python 2/3.

There is a table on wiki, that should list your package. Chances are, that you can see an upstream link that covers the problem. Anyway, please update the table with information you know.

https://fedoraproject.org/wiki/User:Churchyard/python3

I offer my help with this task, so if you have no idea, how to work on this, or it is just not your priority, don't hesitate to ask for help.

(As you've already realized, this is a bulk text, so if something is not quite exact about your package, sorry for that, just ask)
Comment 4 Toshio Ernie Kuratomi 2013-10-02 18:02:21 EDT
Note: do not follow this advice as it is against the Packaging Guidelines: "When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option."

If you are in this situation, you'll essentially be forking upstream in order to produce a python3 port.  In that situation, the proper thing to do is to create a new package with the python3 port.  It would be even better to create the proper upstream infrastructure as well (new upstream scm and issue tracker) but that isn't 100% required by the guidelines.
Comment 5 Bohuslav "Slavek" Kabrda 2015-01-21 12:09:42 EST
Created attachment 982455 [details]
iscsi-initiator-utils Python 3 compat patch

I'm attaching a patch that makes iscsi-initiator-utils Python bindings compatible with Python 3, while maintaining Python >= 2.6 compatibility.
Note that it renames the Python bindings file libiscscimodule.so to libiscsi.so, since in Python 3, the "module" suffix is no longer recognized (but "import libiscsi" still works even in Python >= 2.6).
Comment 6 Bohuslav "Slavek" Kabrda 2015-01-21 12:13:27 EST
Chris, can you please review the patch and possibly accept it? This is now blocking Anaconda's migration to Python 3.

Note: I think it'd be best to create python-libiscsi and python3-libiscsi subpackages that would ship bindings for the respective Python interpreters (so not shipping the Python extension files in the main package). This way the main package won't depend on Python and depending packages will be able to port easily, since they'll have both bindings installable in parallel (and will be able to choose.

Let me know if you need help.
Thanks!
Comment 7 Chris Leech 2015-01-28 16:22:53 EST
(In reply to Bohuslav "Slavek" Kabrda from comment #6)
> Chris, can you please review the patch and possibly accept it? This is now
> blocking Anaconda's migration to Python 3.
> 
> Note: I think it'd be best to create python-libiscsi and python3-libiscsi
> subpackages that would ship bindings for the respective Python interpreters
> (so not shipping the Python extension files in the main package). This way
> the main package won't depend on Python and depending packages will be able
> to port easily, since they'll have both bindings installable in parallel
> (and will be able to choose.
> 
> Let me know if you need help.
> Thanks!

Thanks for the patch, I have this built in rawhide.

As for splitting out python2/3 bindings into subpackages, I like the idea but didn't do it for this build.  Although it looks like blivet might be the only thing using these directly now, so fixing dependencies if they get split out shouldn't be too bad.
Comment 8 Jaroslav Reznik 2015-03-03 12:09:45 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 9 Robert Kuska 2015-07-03 03:27:36 EDT
There is an python3 subpackage in the lastest build of the iscsi-initiator-utils.

Can this be closed?
Comment 10 Miro Hrončok 2015-07-14 07:31:09 EDT
Chris?

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