[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: Martin's patch for the PEP 384 adjustments looks good to me. A note in the PEP that we've deliberately excluded this on a temporary basis due to the implementation/documentation mismatch and expect to have it back in for 3.3 might be helpful, too. --

[issue10841] binary stdio

2011-01-05 Thread Glenn Linderman
Glenn Linderman added the comment: tested on Windows, for those that aren't following issue 4953 -- components: +IO type: -> behavior ___ Python tracker ___ ___

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-05 Thread STINNER Victor
STINNER Victor added the comment: test___all__ just loads ALL modules... and it doesn't unload them. I patched test___all__ to unload modules: the "ResourceWarning: unclosed file ... '/dev/null' ..." disappears, but a new error occurs. The multiprocessing module registers _exit_function() in

[issue10825] use assertIsNone(...) instead of assertEquals(None, ...)

2011-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r87783. -- nosy: +rhettinger resolution: -> accepted status: open -> closed ___ Python tracker ___ _

[issue10813] Suppress adding decimal point for places=0 in moneyfmt()

2011-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think I prefer the code as-is. If you need to blank out the decimal point, set dp to the empty string. -- ___ Python tracker ___ ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > PyMemoryView_FromBuffer should be calling PyObject_Getbuffer on the > view->obj member (it's one of the things that embedding the reference > allows, just as it allowed removal of the separate obj argument from > the PyObject_ReleaseBuffer signature). One use

[issue10841] binary stdio

2011-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Windows nosy: +amaury.forgeotdarc, brian.curtin versions: +Python 3.1, Python 3.2 ___ Python tracker ___ _

[issue10841] binary stdio

2011-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-05 Thread Nadeem Vawda
Nadeem Vawda added the comment: Have you tried my patch (resourcewarning-fixes-3.diff)? It fixes the warning for me without breaking anything. I was just worried that the warning was something triggered by my specific system configuration when you said that you couldn't reproduce it. I was tr

[issue2320] Race condition in subprocess using stdin

2011-01-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: This is likely solved in py3k 3.2 with the C _posixsubprocess.c module. The pipe creation and cloexec flag setting is all done atomically when possible, and at least with the GIL held when not. close_fds also now defaults to True. --

[issue10841] binary stdio

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: What are the results if, instead of piping through subprocess, you simply redirect stdout to a file (using "... > myfile.txt")? -- ___ Python tracker

[issue10841] binary stdio

2011-01-05 Thread Glenn Linderman
Glenn Linderman added the comment: The same. This can be tested with the same test program, c:\python32\python.exe test.py 1 > test1.txt similar for 2, 3, 4. Then add -u and repeat. All 8 cases produce the same results, either via a pipe, or with a redirected stdout. -- _

[issue10841] binary stdio

2011-01-05 Thread Glenn Linderman
Glenn Linderman added the comment: Actually, it seems like this "-u" behaviour, should simply be the default for Python 3.x on Windows. The new IO subsystem seems to be able to add \r when desired anyway. And except for Notepad, most programs on Windows can deal with \r\n or solo \n anyway.

[issue10841] binary stdio

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Actually, it seems like this "-u" behaviour, should simply be the > default for Python 3.x on Windows. There is nothing in "-u" which should explain the behaviour you're observing, so either way it's a bug. Making "-u" the default is quite orthogonal. --

[issue10840] pyarg_parsetuple docs and py_buffer

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Done in 3.2 and 3.1. For 2.7 the structure of the doc page would lead to too much repetition IMO. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7 ___ P

[issue10841] binary stdio

2011-01-05 Thread Glenn Linderman
Glenn Linderman added the comment: Is there an easy way for me to find the code for -u? I haven't learned my way around the Python sources much, just peeked in modules that I've needed to fix or learn something from a little. I'm just surprised you think it is orthogonal, but I'm glad you a

[issue10841] binary stdio

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is there an easy way for me to find the code for -u? "-u" just passes 0 for the "buffering" argument to open() when creating stdout and stderr. Otherwise "buffering" equals -1. You can find equivalent code for open() in Lib/_pyio.py (the actual code in is in

[issue5945] PyMapping_Check returns 1 for lists

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, making PyMapping_Check() more robust produces a test failure in test_builtin, because of the following code: # Verify locals stores (used by list comps) eval('[locals() for i in (2,3)]', g, d) eval('[locals() for i in (2,3)]',

<    1   2