[issue13582] IDLE and pythonw.exe stderr problem

2011-12-13 Thread Ned Deily
Ned Deily added the comment: IDLE.app on OS X also has the issue of stderr messages not being presented to users unless you know to look in the system log where they get written. So writing to stderr is not fatal but displaying them in a popup would be an improvement. -- nosy: +ned.

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-13 Thread maniram maniram
Changes by maniram maniram : Removed file: http://bugs.python.org/file23950/issue13598.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-13 Thread maniram maniram
maniram maniram added the comment: Sorry, the patch has an mistake. ValueErro should be ValueError. -- Added file: http://bugs.python.org/file23952/issue13598.diff ___ Python tracker __

[issue13591] import_module potentially imports a module twice

2011-12-13 Thread Meador Inge
Meador Inge added the comment: Updated patch with tests. -- Added file: http://bugs.python.org/file23951/issue13591-2.patch ___ Python tracker ___ __

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-13 Thread maniram maniram
Changes by maniram maniram : -- components: +Library (Lib) versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-li

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-13 Thread maniram maniram
maniram maniram added the comment: Attached is patch to fix this issue. -- keywords: +patch type: -> behavior Added file: http://bugs.python.org/file23950/issue13598.diff ___ Python tracker __

[issue13540] Document the Action API in argparse

2011-12-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: My guess from the way the docs are written now is that subclassing from Action and over-riding just the __call__ method is the intended way, not just the recommended. If so, Action is a quasi-private class, only exposed so it could be subclassed with one meth

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- keywords: +patch Added file: http://bugs.python.org/file23949/956c6d33a57d.diff ___ Python tracker ___ ___

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've attached a repository and patch with the recommended changes. I created an additional section that includes the documentation for the Action class (specifically the __init__ and __call__ signatures). I believe this addresses the issues I raised. Any obj

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: +95 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13591] import_module potentially imports a module twice

2011-12-13 Thread Ryan Twitchell
Ryan Twitchell added the comment: Confirmed that this patch fixes the behavior shown in my original example, with 3.2. -- ___ Python tracker ___ ___

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-13 Thread maniram maniram
New submission from maniram maniram : string.Formatter doesn't support empty curly braces "{}" unlike str.format . >>> import string >>> a = string.Formatter() >>> a.format("{}","test") Traceback (most recent call last): File "", line 1, in a.format("{}","hello") File "/usr/lib/python3.

[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x

2011-12-13 Thread Philip Jenvey
Philip Jenvey added the comment: I'm surprised to hear that stderr is line buffered by default. Historically stderr is never buffered (at least on POSIX) and for good reason: errors should be seen immediately Was this an oversight in migrating stdin/out/err to the new io module? -- n

[issue9404] IDLE won't launch on XP

2011-12-13 Thread Roger Serwy
Roger Serwy added the comment: This is a duplicate of #4625. -- nosy: +serwy ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2011-12-13 Thread maniram maniram
Changes by maniram maniram : -- title: In IDLE, sys.stdout.write and sys.stderr can write any pickleable object -> In IDLE, sys.stdout and sys.stderr can write any pickleable object ___ Python tracker

[issue4625] IDLE won't open anymore, .idlerc unaccessible

2011-12-13 Thread Roger Serwy
Roger Serwy added the comment: A quick test on Linux would be: chmod -w ~/.idlerc/recent-files.lst IDLE will give a traceback and not start. This should not be a fatal error. The provided patch will present an error dialog if the recent files list can not be written. -- keywords:

[issue13595] Weird behavior with generators with self-referencing output.

2011-12-13 Thread Pyry Pakkanen
Pyry Pakkanen added the comment: Oh, I was sure it had to do with binding issues. I just couldn't put my finger on it because the behavior seemed so counterintuitive. Thanks for clearing things up. I can now work around this feature. -- ___ Python t

[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x

2011-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: We could force sys.stderr to be always line-buffered if that's better than the current settings. -- components: +IO nosy: +benjamin.peterson, pitrou, stutzbach versions: -Python 3.1, Python 3.4 ___ Python tracker

[issue13582] IDLE and pythonw.exe stderr problem

2011-12-13 Thread Roger Serwy
Roger Serwy added the comment: Here is a list of open issues that describe IDLE suddenly crashing, which can be traced back to pythonw.exe: #4765, #5707, #6257, #6739, #9404, #9925, #10365, #11437, #12274, #12988, #13052, #13071, #13078, #13153 This patch does not fix these errors, but at le

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2011-12-13 Thread Stefan Krah
Stefan Krah added the comment: I just tried out http://www.bitvise.com/winsshd , which is free for personal and noncommercial use. If you run the tests via an ssh connection, WinSSHD automatically translates pop-ups into error messages: C:\Users\stefan\cdecimal\PCbuild>python.exe -m test -uall

[issue13595] Weird behavior with generators with self-referencing output.

2011-12-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is expected, and is due to the late binding of the "label" variable in the "item+label" expression. Look at the example below: >>> l = [lambda item: item + label for label in "ab"] >>> f1, f2 = l >>> print f1(''), f2('') b b For the lambda functio

[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2011-12-13 Thread Irmen de Jong
Irmen de Jong added the comment: Alexandre: the existing test_bytes already performs byte array pickle tests. -- ___ Python tracker ___ _

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-12-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: The bug in the 'gcc' command is still present when using Xcode 4.2.1 (that is, the attached unicode.c miscompiles with "gcc -O3"). Clang (again from Xcode 4.2.1) compiles the file correctly, but fails to do a proper build the last few lines of the build log:

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Matthew Barnett
Matthew Barnett added the comment: Actually, one possibility that occurs to me is to provide the flags within the pattern. The .pattern attribute gives the original pattern, but repr could give the flags in-line at the start of the pattern: >>> # Assuming Python 3. >>> r = re.compile("a", re.

[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x

2011-12-13 Thread Geoffrey Bache
New submission from Geoffrey Bache : The default buffering of standard output and standard error has changed in Python 3.x with respect to Python 2.x, and I have been unable to find decent documentation of either the current behaviour, or the change. (See also http://groups.google.com/group/c

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you change the repr, it should at least eval-able, so be sure to capture the flags and whatnot. -- ___ Python tracker ___ __

[issue13588] Change name of internal closure functions in importlib

2011-12-13 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +patch Added file: http://bugs.python.org/file23947/issue13588_v1.diff ___ Python tracker ___

[issue13596] Only recompile Lib/_sysconfigdata.py when needed

2011-12-13 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Build ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13596] Only recompile Lib/_sysconfigdata.py when needed

2011-12-13 Thread STINNER Victor
New submission from STINNER Victor : Attached patch fixes Makefile.pre.in to only recompile Lib/_sysconfigdata.py when needed. -- files: sysconfigdata.patch keywords: patch messages: 149406 nosy: haypo, pitrou priority: normal severity: normal status: open title: Only recompile Lib/_sys

[issue13394] Patch to increase aifc lib test coverage

2011-12-13 Thread Oleg Plakhotnyuk
Oleg Plakhotnyuk added the comment: Third patch goes to issue 13594 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue13394] Patch to increase aifc lib test coverage

2011-12-13 Thread Oleg Plakhotnyuk
Oleg Plakhotnyuk added the comment: The split is in progress. There will be at least two more patches. Regarding your comments: 1) Sorry for my english :-) It is fully determined by the input. With this particular test input the assertNotEqual will always pass. So I've removed it. 2) These were

[issue13394] Patch to increase aifc lib test coverage

2011-12-13 Thread Oleg Plakhotnyuk
Changes by Oleg Plakhotnyuk : Removed file: http://bugs.python.org/file23934/test_aifc.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue13595] Weird behavior with generators with self-referencing output.

2011-12-13 Thread Pyry Pakkanen
New submission from Pyry Pakkanen : The following self-referencing generator has incorrect output: def ab_combinations(): #'', 'a', 'b', 'aa', 'ab', 'ba', 'bb', 'aaa', ... def _deferred_output(): yield "" tees = tee(output) #This definition works fine: '', 'a', '

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-12-13 Thread Nam Nguyen
Changes by Nam Nguyen : -- nosy: +Nam.Nguyen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13594] Aifc markers write fix

2011-12-13 Thread Oleg Plakhotnyuk
New submission from Oleg Plakhotnyuk : 1. Markers serialization test coverage improved. 2. Marker name changed from string to bytes, because _write_string function uses bytes. 3. Check for closed file handle moved to 'close' method, because otherwise I caught 'attempt to write to closed file'

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-12-13 Thread Craig Foster
Craig Foster added the comment: I can confirm that the compile completes with a multiprocessing module where it hasn't before--at least in SunOS 5.9. -- nosy: +fosterremy ___ Python tracker ___

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed. Thanks for the patch! -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 14695b4825dc by Alexandre Vassalotti in branch '3.2': Issue #13505: Make pickling of bytes object compatible with Python 2. http://hg.python.org/cpython/rev/14695b4825dc -- nosy: +python-dev ___ Python t

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > ISTM that .pattern is the one way to do it. To me this is like saying the repr() of functions should not show their name since .__name__ is the one way to do it. repr() is useful for debugging and logging, why not make it more useful? -- ___

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM that .pattern is the one way to do it. -- nosy: +rhettinger ___ Python tracker ___ ___ Pyth

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Matthew Barnett
Matthew Barnett added the comment: In reply to Ezio, the repr of a large string, list, tuple or dict is also long. The repr of a compiled regex should probably also show the flags, but should it just be the numeric value? -- ___ Python tracker

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +mrabarnett ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not sure having the pattern in the repr will make it more readable, > since the regex might even be very long. Hmm, I think it's a reasonable feature request myself. Oops, I meant "enhancement", not "feature request" :) -- nosy: +pitrou stage:

[issue13591] import_module potentially imports a module twice

2011-12-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13593] importlib needs to be updated for __qualname__

2011-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks ok to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13585] Add contextlib.CleanupManager

2011-12-13 Thread Sven Marnach
Sven Marnach added the comment: I think that the fact that Nick got the code to close multiple files wrong underlines that it is difficult to get right currently. Nick's code try: files = [open(fname) for fname in names] # ... finally: for f in files:

[issue13591] import_module potentially imports a module twice

2011-12-13 Thread Meador Inge
Meador Inge added the comment: I can reproduce this on tip. What happens is that 'importlib.import_module("my_lib.bar")' is effectively computed as: import my_lib import bar by '_bootstrap._gcd_import'. When '_gcd_import' goes to do the import of 'bar' it does *not* check to see if 'b

[issue13540] Document the Action API in argparse

2011-12-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: You're right. The documentation isn't incorrect, if you're splitting hairs. But it's not super friendly either. Questions that the documentation should answer: 1) Does the action always need to be a subclass of an Action, or is that recommended? If it's rec

[issue13593] importlib needs to be updated for __qualname__

2011-12-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +pitrou stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13394] Patch to increase aifc lib test coverage

2011-12-13 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for splitting the patch. I tried to apply the patch to 3.2 and I have 3 comments: 1) you changed a commented-out assertEqual with an assertNotEqual, because "ULAW is lossy compression, so frames *may* not match". Does it mean that sometimes they might ma

[issue13593] importlib needs to be updated for __qualname__

2011-12-13 Thread Meador Inge
New submission from Meador Inge : I was recently reading the 'importlib' code and noticed that the utility decorators have not been updated for '__qualname__': >>> def f(): pass ... >>> importlib.util.set_loader(f) .wrapper at 0x7f4b323f1f60> >>> importlib.util.set_loader(f).__name__ 'f' >>> i

[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2011-12-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2011-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d60856651139 by Ezio Melotti in branch '2.7': #6570: clarify tutorial section about keyword arguments. http://hg.python.org/cpython/rev/d60856651139 New changeset 44ca4264dc88 by Ezio Melotti in branch '3.2': #6570: clarify tutorial section about k

[issue13549] Incorrect nested list comprehension documentation

2011-12-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed. On a side note, using: >>> [x, x**2 for x in range(6)] File "", line 1 [x, x**2 for x in range(6)] ^ SyntaxError: invalid syntax In the 3.x docs seems to break the hightlight. With 'File "", line 1, in ?' the highlight works fine, so t

[issue13549] Incorrect nested list comprehension documentation

2011-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 132158b287d7 by Ezio Melotti in branch '2.7': #13549: improve tutorial section about listcomps. http://hg.python.org/cpython/rev/132158b287d7 New changeset ad5c70296c7b by Ezio Melotti in branch '3.2': #13549: improve tutorial section about listcom

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-13 Thread sbt
sbt added the comment: > sbt, have you been running the test suite before submitting patches? > If not, then please do. I ran it after I submitted. Sorry. Here is another patch. It also makes sure that __self__ is reported as None when METH_STATIC. -- Added file: http://bugs.pyth

[issue13585] Add contextlib.CleanupManager

2011-12-13 Thread Nick Coghlan
Nick Coghlan added the comment: And the backport: http://contextlib2.readthedocs.org/ I haven't tested on anything other than 2.7 as yet - I have an account request in train with the Shining Panda folks, so I'll set up multi-version CI for this project (along with a couple of others) once tha

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure having the pattern in the repr will make it more readable, since the regex might even be very long. You can use the .pattern attribute if you want to see the pattern. -- nosy: +ezio.melotti status: open -> pending versions: +Python 3.2, Py

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Martin Häcker
New submission from Martin Häcker : When calling repr() on a compiled regex pattern like this: > import re > repr(re.compile('foo')) you don't get the pattern of the regex out of the compiled form. Also all my research has shown no getter to allow this. I noticed this in my application becaus

[issue13516] Gzip old log files in rotating handlers

2011-12-13 Thread Vinay Sajip
Vinay Sajip added the comment: See this for the proposed resolution: http://plumberjack.blogspot.com/2011/12/improved-flexibility-for-log-file.html -- ___ Python tracker ___ __

[issue13585] Add contextlib.CleanupManager

2011-12-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Nick. You're awesome. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs