Bug 985294 - python-meh Python 3 compatibility
Summary: python-meh Python 3 compatibility
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-meh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1014684
Blocks: PY3ANACONDA
TreeView+ depends on / blocked
 
Reported: 2013-07-17 09:14 UTC by Bohuslav "Slavek" Kabrda
Modified: 2015-01-21 14:26 UTC (History)
3 users (show)

Fixed In Version: python-meh-0.34-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 14:26:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for upstream git to allow python3 subpackages (4.03 KB, patch)
2014-12-03 13:33 UTC, Miro Hrončok
no flags Details | Diff
Patch for Python 3 subpackages (4.50 KB, patch)
2014-12-03 13:40 UTC, Miro Hrončok
no flags Details | Diff

Description Bohuslav "Slavek" Kabrda 2013-07-17 09:14:55 UTC
Hi,
is there any plan/estimate of making python-meh compatible with Python 3? I'm currently trying to figure out what it'd take to move Fedora to Python 3 and since python-meh is one of Anaconda's deps, it'd need to be converted as one of the first.
Thanks.

Comment 1 Vratislav Podzimek 2013-07-18 14:16:29 UTC
(In reply to Bohuslav "Slavek" Kabrda from comment #0)
> Hi,
> is there any plan/estimate of making python-meh compatible with Python 3?
> I'm currently trying to figure out what it'd take to move Fedora to Python 3
> and since python-meh is one of Anaconda's deps, it'd need to be converted as
> one of the first.
> Thanks.
I think it shouldn't be a big problem, I believe vast majority of work could by done by 2to3 or something like that. My brief testing shows it's mainly about changing print statements to function calls etc.

Comment 2 Fedora End Of Life 2013-09-16 14:33:32 UTC
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 3 Miro Hrončok 2013-10-01 14:33:24 UTC
How are we standing with this?

If you need any extra hand with this, feel free to use me :)

Comment 4 Vratislav Podzimek 2013-10-01 14:46:23 UTC
(In reply to Miro Hrončok from comment #3)
> How are we standing with this?
> 
> If you need any extra hand with this, feel free to use me :)
Sorry, but this is not a priority now. Feel free to send patches. Either to me or (preferably) to anaconda-patches.org (use git send-email and prefix the cover letter with [python-meh]).

The sources are available at:
http://git.fedorahosted.org/cgit/python-meh.git/

Comment 5 Miro Hrončok 2013-10-01 14:50:15 UTC
OK

Comment 6 Miro Hrončok 2013-10-16 16:17:04 UTC
Sent a patch to Anaconda Patches List.

Comment 7 Vratislav Podzimek 2013-11-05 08:45:42 UTC
Python 3 compatible python-meh built for rawhide.

http://koji.fedoraproject.org/koji/buildinfo?buildID=476242

Comment 8 Miro Hrončok 2014-06-25 10:33:18 UTC
Actually, I see no python3-meh subpackage in koji/rawhide, could you explain why this is closed?

Comment 9 Vratislav Podzimek 2014-12-03 11:17:50 UTC
(In reply to Miro Hrončok from comment #8)
> Actually, I see no python3-meh subpackage in koji/rawhide, could you explain
> why this is closed?
I had no idea we need two packages with the same content.

Comment 10 Miro Hrončok 2014-12-03 11:24:27 UTC
Based on our IRC talk, I'll prepare the Python 3 subpackage.

Comment 11 Miro Hrončok 2014-12-03 13:33:38 UTC
Created attachment 964135 [details]
Patch for upstream git to allow python3 subpackages

Patch attached for spec and Makefile in the upstream repo (i.e. not fedpkg).

It should work, but apparently, there is still something not Python3 compatible.

Bytecompiling .py files below /home/churchyard/rpmbuild/BUILDROOT/python-meh-0.32-2.fc22.x86_64/usr/lib/python3.3 using /usr/bin/python3.3
*** Error compiling '/home/churchyard/rpmbuild/BUILDROOT/python-meh-0.32-2.fc22.x86_64/usr/lib/python3.3/site-packages/meh/ui/gui.py'...
  File "/usr/lib/python3.3/site-packages/meh/ui/gui.py", line 34
    raise RuntimeError, "Unable to find glade file %s" % file
                      ^
SyntaxError: invalid syntax


I'll look into this as well.

Comment 12 Matej Stuchlik 2014-12-03 13:39:07 UTC
(In reply to Miro Hrončok from comment #11)
> Created attachment 964135 [details]
> Patch for upstream git to allow python3 subpackages
> 
> Patch attached for spec and Makefile in the upstream repo (i.e. not fedpkg).
> 
> It should work, but apparently, there is still something not Python3
> compatible.
> 
> Bytecompiling .py files below
> /home/churchyard/rpmbuild/BUILDROOT/python-meh-0.32-2.fc22.x86_64/usr/lib/
> python3.3 using /usr/bin/python3.3
> *** Error compiling
> '/home/churchyard/rpmbuild/BUILDROOT/python-meh-0.32-2.fc22.x86_64/usr/lib/
> python3.3/site-packages/meh/ui/gui.py'...
>   File "/usr/lib/python3.3/site-packages/meh/ui/gui.py", line 34
>     raise RuntimeError, "Unable to find glade file %s" % file
>                       ^
> SyntaxError: invalid syntax
> 
> 
> I'll look into this as well.

FYI [0] will prolly help.

[0] http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions

Comment 13 Miro Hrončok 2014-12-03 13:40:38 UTC
Created attachment 964137 [details]
Patch for Python 3 subpackages

Upstream patch for Python 3 subpackages.

Comment 14 Miro Hrončok 2014-12-03 13:41:57 UTC
Matej Stuchlik:(In reply to Matej Stuchlik from comment #12)
> FYI [0] will prolly help.

I knew, I was just afraid more errors will follow. But it seems this was the only one.

Comment 15 Miro Hrončok 2014-12-03 13:46:14 UTC
I would built a Fedora package, but it seems silly to patch Makefile and gui.py in the Fedora spec. So please merge this and let me know if the resulting packages are weird/broken.

Comment 16 Vratislav Podzimek 2014-12-08 09:38:15 UTC
Thanks for the patch! I've applied it and identified some more Python3-related issues that needed fixing. Patches with them are now ready for a review on the anaconda-patches list. Once reviewed, they will all be pushed and built as python-meh-0.34-1 that will have the python3 subpackage(s).

Comment 17 Bohuslav "Slavek" Kabrda 2015-01-21 14:26:17 UTC
I'm closing this with resolution "rawhide", since it seems there is nothing more to do here.


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