Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413773 - dev-python/mimeparse support for Python 3
Summary: dev-python/mimeparse support for Python 3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Ian Delaney (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 18:25 UTC by James Rowe
Modified: 2012-05-03 15:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Python 3 support for mimeparse (0001-mimeparse-Support-Python-3.patch,1.03 KB, patch)
2012-04-27 18:26 UTC, James Rowe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Rowe 2012-04-27 18:25:39 UTC
The mimeparse module doesn't fully support Python 3, and installation
also fails with FEATURES=test.  Although there is a comment saying the
tests are broken on Python 3 that isn't really the case, as it is 
mimeparse.py itself that needs changes for Python 3 support.

Luckily it is only a functools.reduce import and dict.has_key fix, so
2to3 can do the work quite easily.

The attached patch fixes this.  Maybe it is simpler to just disable
Python 3 support entirely, but I thought I'd offer the patch anyway ;)

Thanks,

James

Reproducible: Always
Comment 1 James Rowe 2012-04-27 18:26:35 UTC
Created attachment 310291 [details, diff]
Python 3 support for mimeparse
Comment 2 Mike Gilbert gentoo-dev 2012-05-03 15:28:06 UTC
Thanks James.

I have restricted python 3. If you would like to see it supported, please submit a patch upstream. It should be a fairly simple change to setup.py.