Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 462326 - dev-util/setconf uses Python 3 open() syntax without requiring dev-lang/python:3
Summary: dev-util/setconf uses Python 3 open() syntax without requiring dev-lang/python:3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Samuli Suominen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-19 15:43 UTC by James Rowe
Modified: 2014-03-29 14:55 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Rowe 2013-03-19 15:43:57 UTC
setconf uses the encoding kwarg to open(), which isn't supported in Python 2. 
It should probably depend on dev-lang/python:3 and have the #! line fixed  for those with python 2 as their system default.

There is a quick workaround if you wish to support 2 & 3, as codecs.open does 
support the encoding kwarg.  [Perhaps there are other Python 3 things that 
would need patching, I didn't look beyond that.]

Thanks,

James

Reproducible: Always
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-03-29 09:25:30 UTC
bumped to 0.6.2 and made it use /usr/bin/python3

and if eg. Python 3.5 gets released in future that breaks this, then I'll deal with it again, but for now, allow all 3.x
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-29 09:29:44 UTC
Python team officially condemns you for using 'python3'. This is completely disallowed in ways involving the Spanish Inquisition.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-03-29 09:34:01 UTC
(In reply to Michał Górny from comment #2)
> Python team officially condemns you for using 'python3'. This is completely
> disallowed in ways involving the Spanish Inquisition.

why?
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-03-29 09:34:41 UTC
what should I be calling for 'any python 3.x', the future, and the present?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-29 09:37:57 UTC
(In reply to Samuli Suominen from comment #4)
> what should I be calling for 'any python 3.x', the future, and the present?

You are not. You are likely looking for python-single-r1.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-03-29 10:33:49 UTC
(In reply to Michał Górny from comment #5)
> (In reply to Samuli Suominen from comment #4)
> > what should I be calling for 'any python 3.x', the future, and the present?
> 
> You are not. You are likely looking for python-single-r1.

I don't like it, but it's done...

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/setconf/setconf-0.6.2.ebuild?r1=1.1&r2=1.2
Comment 7 Mike Gilbert gentoo-dev 2014-03-29 14:55:43 UTC
It seems that upstream has adjusted it for python2/3 compatibility in the 0.6.2 release.

https://github.com/xyproto/setconf/commit/fc6ec960aeaa9c1f246016728f3f7cd7ae999cfc