Bug 985294 - python-meh Python 3 compatibility
python-meh Python 3 compatibility
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python-meh (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miro Hrončok
Fedora Extras Quality Assurance
: Reopened
Depends On: 1014684
Blocks: PY3ANACONDA
  Show dependency treegraph
 
Reported: 2013-07-17 05:14 EDT by Bohuslav "Slavek" Kabrda
Modified: 2015-01-21 09:26 EST (History)
3 users (show)

See Also:
Fixed In Version: python-meh-0.34-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-21 09:26:17 EST
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)
Patch for upstream git to allow python3 subpackages (4.03 KB, patch)
2014-12-03 08:33 EST, Miro Hrončok
no flags Details | Diff
Patch for Python 3 subpackages (4.50 KB, patch)
2014-12-03 08:40 EST, Miro Hrončok
no flags Details | Diff

  None (edit)
Description Bohuslav "Slavek" Kabrda 2013-07-17 05:14:55 EDT
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 10:16:29 EDT
(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 10:33:32 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 3 Miro Hrončok 2013-10-01 10:33:24 EDT
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 10:46:23 EDT
(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@lists.fedorahosted.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 10:50:15 EDT
OK
Comment 6 Miro Hrončok 2013-10-16 12:17:04 EDT
Sent a patch to Anaconda Patches List.
Comment 7 Vratislav Podzimek 2013-11-05 03:45:42 EST
Python 3 compatible python-meh built for rawhide.

http://koji.fedoraproject.org/koji/buildinfo?buildID=476242
Comment 8 Miro Hrončok 2014-06-25 06:33:18 EDT
Actually, I see no python3-meh subpackage in koji/rawhide, could you explain why this is closed?
Comment 9 Vratislav Podzimek 2014-12-03 06:17:50 EST
(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 06:24:27 EST
Based on our IRC talk, I'll prepare the Python 3 subpackage.
Comment 11 Miro Hrončok 2014-12-03 08:33:38 EST
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 08:39:07 EST
(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 08:40:38 EST
Created attachment 964137 [details]
Patch for Python 3 subpackages

Upstream patch for Python 3 subpackages.
Comment 14 Miro Hrončok 2014-12-03 08:41:57 EST
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 08:46:14 EST
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 04:38:15 EST
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 09:26:17 EST
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.