Bug 1024806 - python-decoratortools: Support Python 3
python-decoratortools: Support Python 3
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: python-decoratortools (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Luke Macken
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1024805
  Show dependency treegraph
 
Reported: 2013-10-30 09:17 EDT by Miro Hrončok
Modified: 2016-09-19 22:45 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-30 18:06:17 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)

  None (edit)
Description Miro Hrončok 2013-10-30 09:17:21 EDT
Hi, we would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.

https://fedoraproject.org/wiki/Changes/Python_3_as_Default

While this package is not in minimal buildroot, it belongs to fedora-packager stack. We would like to switch to Python 3 there as well.

The goal here is, that at least for F22 you should provide python3- prefixed subpackage.

Please, help us update to Python 3 flawlessly.

Check if upstream already support Python 3, if yes, use it and add the 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, say so and we can solve the problem together.

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

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#fedora-packager

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 1 Toshio Ernie Kuratomi 2013-10-30 17:36:19 EDT
Researched this a little this morning:

Strategy: Porting to Python3:

* Upstream does not support python3 at the moment.
* There's a thread in March from a person who was attempting to port peak-rules (whose dependency chain included decoratortools) to python3.
  : http://www.eby-sarna.com/pipermail/peak/2013-March/thread.html
  * They got hung up on unittests (peak-rules unittests) not passing
  * Their approach was to run 2to3 on the code and then manually fix remaining errors.  Their approach doesn't look like it will run on both python2 and python3.
  : https://bitbucket.org/Alzakath/peak-py3/src/56f051cad0eebfacb226f28d80195c65c21d44da/DecoratorTools-1.8?at=default
  * Upstream's stated goal is to bring decorators to python-2.3 so that will almost certainly make it harder to write python3 code that is also compatible with the range of supported python releases.

Strategy: Port mock to not use decoratortools:

* mock uses python-decoratortools in five locations in one file.
  : py/mockbuild/trace_decorator.py

Four of those are in unittests.  Those uses could likely be replaced with python-decorator which does have an upstream python3 version: http://micheles.googlecode.com/hg/decorator/documentation3.html
http://pypi.python.org/pypi/decorator

Shifting to python-decorator will change the minimum required  python version from python2.3 to python2.4 and require some minor changes to the code.

I would recommend porting mock as the better path here.
Comment 2 Miro Hrončok 2013-10-30 18:03:35 EDT
Seems reasonable.

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