[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
New submission from Ross Lagerwall: [1/1] test_curses beginning 6 repetitions 123456 . test_curses leaked [1, 1, 1] references, sum=3 1 test failed: test_curses [154814 refs] -- assignee: rosslagerwall messages: 169973 nosy: rosslagerwall priority: low severity: normal status: open

[issue15877] xml.dom.minidom cannot parse ISO-2022-JP

2012-09-07 Thread Dan Callaghan
New submission from Dan Callaghan: Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type help, copyright, credits or license for more information. c = u'\u65e5\u672c\u8a9e' import xml.dom.minidom Encoded as UTF-8, everything is fine:

[issue15876] test_curses refleak

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset c82e3a6553fc by Ross Lagerwall in branch 'default': Issue #15876: Fix a refleak in the curses module http://hg.python.org/cpython/rev/c82e3a6553fc -- nosy: +python-dev ___ Python tracker

[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
Ross Lagerwall added the comment: This didn't get picked up by Antoine's daily refleak test run because test curses only runs when stdout is a TTY. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15876

[issue15870] PyType_FromSpec should take metaclass as an argument

2012-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: If filling out a type with all slots one-by-one is considered too tedious, and patching ob_type too hacky - here is another approach: Use FromSpec to create a type with all slots filled out, then call the metatype to create a subtype of that. I.e. the type

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2012-09-07 Thread Steven Bethard
Steven Bethard added the comment: Interesting idea! The regex would need a little extra care to interoperate properly with prefix_chars, but the approach doesn't seem crazy. I'd probably call the constructor option something like args_default_to_positional (the current behavior is essentially

[issue15874] argparse cannot parse shell variable arguments in file-given arguments

2012-09-07 Thread Steven Bethard
Steven Bethard added the comment: You could try declaring a type converter and using the type= parameter of add_argument. Your type converter could look something like: def expanded_path(arg): return os.path.expandvars(arg) Would that work? --

[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15876 ___

[issue15878] struct long type size

2012-09-07 Thread Сергей Ковба
New submission from Сергей Ковба: Such code PackageFile.write(struct.pack( l, PkgHdrSize)) have different behaviour on 32-bit and 64-bit systems. In case 32-bit system it writes to file 4 bytes. and 8 bytes in case 64-bit system, but in http://docs.python.org/library/struct.html p.7.3.2.2 long

[issue15878] struct long type size

2012-09-07 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected behaviour. By default, struct.pack and struct.unpack use the *native* size and alignment. Use l if you want platform-independent behaviour. Relevant docs: http://docs.python.org/library/struct.html#byte-order-size-and-alignment --

[issue15877] xml.dom.minidom cannot parse ISO-2022-JP

2012-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is similar to issue13612: pyexpat does not support multibytes encodings. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15877

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Arne Babenhauserheide
Arne Babenhauserheide added the comment: What would be the best way to get this patch reviewed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'll take a look next week if nobody else do it before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I think I have a way to fix this that will actually *reduce* the level of special casing needed in the compiler. Specifically, I think we may be able to make the class statement emit *two* scopes, rather than the current one. The outer scope would be

[issue15867] make importlib documentation easier to use

2012-09-07 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- title: It's hard to decypher how to build off of the provided objects from the importlib docs - make importlib documentation easier to use ___ Python tracker rep...@bugs.python.org

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Jon Obermark
New submission from Jon Obermark: If they are not going to call the __metaclass__ or the class __new__, then they should return `set` objects instead of subclass objects, so that it is clear what is going on. As it is, the results of set operations receive some subclass information but not

[issue15867] make importlib documentation easier to use

2012-09-07 Thread Julian Berman
Julian Berman added the comment: Eric: Yeah I've seen that, it's the one thing that I kept open as I was turning back and forth through the various parts of importlib. So yeah I like that document certainly at least a bit :). Also thanks to both you and Brett for linking that issue, that's

[issue15874] argparse cannot parse shell variable arguments in file-given arguments

2012-09-07 Thread R. David Murray
R. David Murray added the comment: I had forgotten all about os.path.expandvars. Note, however, that that function is very naive: os.path.expandvars('$HOME') '/home/rdmurray' That is, it is doing unconditional substitution, not parsing shell syntax. It should work well for simple

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread R. David Murray
R. David Murray added the comment: It is probably true that this is a bug, but subclasses of mutable classes do not normally override __new__. (I'm curious what your use case is for doing so.) -- nosy: +benjamin.peterson, r.david.murray ___ Python

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
New submission from Kalle Rutanen: On Windows, long-UNC paths are needed to inspect and modify paths with more than 260 characters. The os.path.split() function behaves incorrectly in the presence of a long-UNC prefix //?/ or \\?\. Consider iterating d = os.path.split(d)[0] with d =

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This was already fixed (in the 3.x releases) by issue1721812. -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed superseder: - A subclass of set doesn't always have __init__ called.

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: By inspecting the code for os.path.split() in ntpath.py, one sees that the problem is actually in os.path.splitdrive(), which does not handle long-UNC paths. -- ___ Python tracker rep...@bugs.python.org

[issue12067] Doc: remove errors about mixed-type comparisons.

2012-09-07 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12067 ___ ___ Python-bugs-list mailing list

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Wouldn't the following also start working (currently a NameError)? class X: def f(self): print(f.__qualname__) def g(self): f(None) X().f() X().g() How about this[1] (also currently a NameError): class Outer: class

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Actually, that second would still not work (it would have to pass through the non-lexical inner scope that Nick mentioned). Is that also the case for the first one? -- ___ Python tracker rep...@bugs.python.org

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: It seems to me that this problem can be fixed by replacing splitdrive with splitunc at line 170 in ntpath.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15880

[issue6178] Core error in Py_EvalFrameEx 2.6.2

2012-09-07 Thread Chris Kaynor
Chris Kaynor added the comment: Was any resolution found for this? I am debugging some intermittent crashes now which have the same visible callstack as Tim reported. tstate-frame is NULL on line 2717 of ceval.c I am using an in-house compiled Python 2.6.4, compiled with Visual Studio 2008,

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Jon Obermark
Jon Obermark added the comment: The closing author is correct, the use case is adequately covered by __init__, and that has been fixed in 3. It makes sense this will not be backported. -- ___ Python tracker rep...@bugs.python.org

[issue6178] Core error in Py_EvalFrameEx 2.6.2

2012-09-07 Thread Tim Savannah
Tim Savannah added the comment: As an update (since someone else has this problem) this issue stopped once we converted from centos to archlinux (www.archlinux.org). May be an underlying issue with something in the centos environment. We used the same modules same configuration basically same

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the patch for issue 15645 was incorrect. Instead of generating the pickles in the source tree and copying them, it should have arranged lib2to3 to generate them in the target directory instead (just as all the compileall invocations also generate

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: I disagree that the regression is critical. IIUC, it fails on systems without urandom, such as Tru64 and HPUX. However, failure to support such systems is *not* critical, IMO; I think that OS-specific failures should be considered critical only if they occur

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: An interesting question is whether the patch should be applied to 2.6 and 3.1. It is not a security fix in itself, which suggests that it shouldn't apply. OTOH, it's a follow-up to an earlier security fix. -- ___

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Ian Wienand
Ian Wienand added the comment: I'm not sure what systems are defined as critical or not. Although python is not really installable/configurable by end-users on ESXi, I noticed during development because we use python very early in the boot, before /dev/urandom appears for us (it comes from a

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
New submission from Chris McDonough: The symptom is an exact duplicate of the symptom reported in the following (closed) issue: http://bugs.python.org/issue9775 The issue is also related to the following other issues: http://bugs.python.org/issue4106 http://bugs.python.org/issue9205

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread The Written Word
The Written Word added the comment: We're running Tru64 UNIX 5.1A, not 5.1B which definitely doesn't have /dev/urandom. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15340 ___

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread The Written Word
The Written Word added the comment: We do not have KRNG11i installed. It did not ship with the original installation of HP-UX 11.11. It needs to be loaded after-the-fact and we cannot be ensured that our customers will have this module installed nor do we wish to make it a requirement.

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Enhancements can only be targeted at 3.4, where robotparser is now urllib.robotparser I wonder if documenting the simple solution would be sufficient. -- nosy: +orsenthil, terry.reedy versions: +Python 3.4 -Python 2.7

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: In any case, a doc change *could* go in 2.7 and 3.3/2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15851 ___

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___ ___ Python-bugs-list mailing

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
Chris McDonough added the comment: Patch for tip. -- keywords: +patch Added file: http://bugs.python.org/file27142/shutdown_typeerror-tip.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
Chris McDonough added the comment: 2.7 branch patch. -- Added file: http://bugs.python.org/file27143/shutdown_typeerror-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - patch review versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___

[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not think there should be references between the Python 2 docs and Python 3 docs. But within each, I think it ok to have exceptional multiple references for what is, I believe, a unique situation: a security fix that required a new feature. Do it however

[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2012-09-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well, the patch is welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15863 ___ ___ Python-bugs-list

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: By looking at x.py, I confirmed that the added stars are correct. Also, the correction of 'header' to 'hdr' is correct. However, for threading.py in 3.3.0, I see class Thread: ... def __init__(self, group=None, target=None, name=None,

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Terry. If anyone is curious, it looks like the verbose keyword argument was added to the docs (and to threading.py) in revision f71acc4b2341, and then subsequently removed (but not from the docs) in revision 8ec51b2e57c2. (The fact that we found 2

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e8b01583839 by Antoine Pitrou in branch '3.2': Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. http://hg.python.org/cpython/rev/2e8b01583839 New changeset a53fc9982e2a by Antoine Pitrou in branch 'default': Issue

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset edbf37ace03c by Antoine Pitrou in branch '2.7': Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. http://hg.python.org/cpython/rev/edbf37ace03c -- ___ Python tracker

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is now fixed in 3.2/3.3/2.7. I'll leave it to Martin and Benjamin whether this should be backported to 2.6 and 3.1. (Georg, this changeset should probably be ported to 3.3.0 too) -- priority: release blocker - high versions: -Python 2.7,

[issue15882] _decimal.Decimal constructed from tuple

2012-09-07 Thread Aaron
New submission from Aaron: I think I may have found a problem with the code that constructs Infinity from tuples in the C _decimal module. # pure python (3.x or 2.x) decimal.Decimal( (0, (0, ), 'F')) Decimal('Infinity') # _decimal decimal.Decimal( (0, (0, ), 'F')) Traceback (most recent

[issue15882] _decimal.Decimal constructed from tuple

2012-09-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Arne Babenhauserheide
Arne Babenhauserheide added the comment: Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___ ___ Python-bugs-list mailing list

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: Yep. The only name in the new scope would be __class__. Everything else, including method names, should remain invisible from method bodies. I'm not 100% sure it will work as we want, but that's because I'm not sure if we can avoid causing a semantic change for

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is an updated patch that incorporates Terry's suggestion. -- Added file: http://bugs.python.org/file27145/issue-15865-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15865

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: sounds like it would be worth a shot -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch makes sense. I'll take another look over the weekend, but it seems to be ready to be applied. -- assignee: - belopolsky nosy: +belopolsky stage: patch review - commit review ___ Python tracker

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: +# NB: we hold on to references to functions in the arglist due to the This is a nit, but I think adding NB:, Note:, etc. to the beginning of a comment is redundant because by being a comment it is already implicit that it should be noted. --

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: See als Issue15838. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15822 ___ ___ Python-bugs-list mailing

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: See also Issue15838 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15645 ___ ___ Python-bugs-list mailing

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: The other alternative to fix this is to revert the patch in issue 15645 and then remove the -E flag from PYTHON_FOR_BUILD. PYTHON_FOR_BUILD was introduced by a, possibly incomplete, attempt to introduce support for cross compiling. In particular, the

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Now picked into the 3.3.0 release clone as 6a782496f90a. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15340 ___

[issue15781] test_threaded_import fails with -j4

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Now picked into 3.3.0 release clone as 85070f284fd2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15781 ___

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Done in 4e941113e4fa. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Now picked into 3.3.0 release clone in 23377e88487b. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue15828] imp.load_module doesn't support C_EXTENSION type

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Picked as 4f6f59303146 and a4a9c5717204. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15828 ___

[issue14223] curses addch broken on Python3.3a1

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Done in d6d632f254ee. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14223 ___

[issue15847] parse_args stopped accepting tuples

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Committed in release clone as 8c2e87aeb707. Please apply to the main branches as usual. -- priority: release blocker - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15847