[issue6482] PATCH: tiny simplification for subprocess

2009-07-13 Thread Yinon Ehrlich
Changes by Yinon Ehrlich : -- files: subprocess.patch keywords: patch nosy: Yinon severity: normal status: open title: PATCH: tiny simplification for subprocess versions: Python 2.7 Added file: http://bugs.python.org/file14499/subprocess.patch ___ Pyt

[issue6481] PATCH: typo in subprocess documentation

2009-07-13 Thread Yinon Ehrlich
New submission from Yinon Ehrlich : os.waitpid returns a tuple (pid, status) -- assignee: georg.brandl components: Documentation files: subprocess.patch keywords: patch messages: 90513 nosy: Yinon, georg.brandl severity: normal status: open title: PATCH: typo in subprocess documentation

[issue6432] ImageTk.PhotoImage

2009-07-13 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: ActivePython bug: http://bugs.activestate.com/show_bug.cgi?id=83694 -- nosy: +srid ___ Python tracker ___ __

[issue6480] code.runsource() parsing bug

2009-07-13 Thread Sean
New submission from Sean : I'm writing a little pre-processor that just parses python snippets out of a file and passes them to a code.InteractiveInterpreter, and I'm noticing some somewhat nasty stuff in how runsource handles some code. sys.version: '2.6.2 (r262:71600, Jul 12 2009, 11:52:33) \n

[issue6444] multiline exception logging via syslog handler

2009-07-13 Thread Max Arnold
Max Arnold added the comment: > Why can't you either use %r in the format string, or define your own handler/formatter to do exactly what you want? I'm describing default behaviour of logger.exception(). Out of the box (with SyslogHandler and "/dev/log") I'm unable to use it, because of this pr

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
John Burnett added the comment: You're right, Vista64 is returning "win32" for the platform. And ahh, I see what I did: in Python 2.5.2, _syscmd_file wasn't using a sys.platform check. Then when I looked at the current version, I saw it was still using "/dev/null", but didn't see a platform ch

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: John Burnett wrote: > John Burnett added the comment: > > I'm not sure how you're seeing that those functions bypass external > commands? Both functions use this bypass mechanism: if sys.platform in ('dos','win32','win16','os2'): return defau

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
John Burnett added the comment: I'm not sure how you're seeing that those functions bypass external commands? I'm running Vista64, and it certainly looks like calling platform.architecture calls _syscmd_file, which then immediately calls os.popen("file %s 2> /dev/null"). This causes windows to

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2009-07-13 Thread Georg Brandl
Georg Brandl added the comment: ISTM that structseq should have been a tuple subclass anyway. Isn't it advertised as some sort of "tuple with attribute access"? -- ___ Python tracker __

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Georg Brandl
Georg Brandl added the comment: Retro, you still won't give up, will you? -- status: pending -> closed ___ Python tracker ___ ___ Pyth

[issue3410] platform.version() don't work as expected in Vista in portuguese

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I've checked in patch r74005 to address the problem. Could you check whether the current SVN version of platform.py works on your Portuguese Windows version ? Thanks. -- ___ Python tracker

[issue6476] MSVCRT's spawnve/spawnvpe are not thread safe

2009-07-13 Thread Jose Fonseca
Jose Fonseca added the comment: Perhaps. I'm not a scons developer -- just an user -- and I don't know what versions of python far back in time they want support, but it appears it would make sense to use subprocess where available indeed. I already I've filled an issue with scons at http://scon

[issue6071] no longer possible to hash arrays

2009-07-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: > It no longer works with objects created with buffer() either: That's because the buffer objects don't implement the buffer protocol (in particular, they don't define the Py_TPFLAGS_HAVE_NEWBUFFER flag, and the bf_getbuffer/bf_releasebuffer operations that go

[issue1616979] cp720 encoding map

2009-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The codec file now starts with the comment: """Python Character Mapping Codec cp720 generated on Windows: Vista 6.0.6002 SP2 Multiprocessor Free with the command: python Tools/unicode/genwincodec.py 720 """ I also added a file Tools\unicode\genwincodecs

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On which Windows platform would that be ? Both internal helper functions bypass using an external command for Windows and DOS platforms. -- ___ Python tracker

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> lemburg nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue6479] platform.py writes to hard coded platform dependant "dev/null"

2009-07-13 Thread John Burnett
New submission from John Burnett : The functions _syscmd_uname and _syscmd_file are hard-coded to pipe stderr to "/dev/null", as opposed to os.devnull. On Windows, this has the effect of creating a file called "null" to a local "dev" directory (if the directory exists). Attached is a fix. Whil

[issue6476] MSVCRT's spawnve/spawnvpe are not thread safe

2009-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Indeed. But shouldn't you use the subprocess module instead? -- nosy: +amaury.forgeotdarc resolution: -> wont fix status: open -> pending ___ Python tracker

[issue6478] time.tzset does not reset _strptime's locale time cache

2009-07-13 Thread Mihai Ibanescu
New submission from Mihai Ibanescu : If one changes from one timezone to another within the same python process, and if one tries to parse a time string that includes the timezone, the library malfunctions. See attached script for a reproducer. The problem is that, even though time.tzset() is c

[issue6477] Pickling of NoneType raises PicklingError

2009-07-13 Thread July Tikhonov
New submission from July Tikhonov : Python 3.2a0 (py3k:73749M, Jul 1 2009, 23:17:59) [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pickle [40072 refs] >>> pickle.dumps(type(None)) Traceback (most recent ca

[issue6476] MSVCRT's spawnve/spawnvpe are not thread safe

2009-07-13 Thread Jose Fonseca
New submission from Jose Fonseca : MSVCRT's implementation of _spawnve, _spawnvpe, or any version that takes an environ as paramater is not thread-safe, because it stores a temporary environment string into a global variable. _spawnve, _spawnvpe, and friends call a function named _cenvarg which

[issue6418] unittest.TestProgram change breaks nose

2009-07-13 Thread Michael Foord
Michael Foord added the comment: Oops - I meant revision 73997 of course. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6418] unittest.TestProgram change breaks nose

2009-07-13 Thread Michael Foord
Michael Foord added the comment: Committed in revision 6418. Still needs fixing in trunk (note the patch itself can't be applied as it is missing a couple of 'self's). Having problems testing this fix without causing spurious output on stderr. -- __

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > It's not, I was more thinking of push_str(foo), where it uses a default encoding. I think some people don't know what unicode or encoding is, or don't want to worry about it. Nice as it sounds, the problem with this is that those people cannot write corr

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jorrit Posthuma
Jorrit Posthuma added the comment: On 13 jul 2009, at 17:33, Jean-Paul Calderone wrote: > > Jean-Paul Calderone added the comment: > >> It's not 'that' clear you should only work with bytes on a socket. > > It's pretty clear to me. :) That's what sockets can deal with - > bytes. It's allso

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > It's not 'that' clear you should only work with bytes on a socket. It's pretty clear to me. :) That's what sockets can deal with - bytes. If you want to transfer something other than bytes via a socket, then you need to convert it to bytes. In the ca

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jorrit Posthuma
Jorrit Posthuma added the comment: It's not 'that' clear you should only work with bytes on a socket. Especially not when using a wrapper like asynchat. They are supposed to make it easier, and passing a string is easier. Maybe it's possible to do a default byte conversion when the user is wo

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Mark Dickinson
Mark Dickinson added the comment: > I think that the fresh fruits can really be considered as dangerous > weapons. Indeed. Google for "monty python self-defence against fresh fruit". -- nosy: +marketdickinson status: pending -> open ___ Python trac

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Ezio Melotti
Ezio Melotti added the comment: That example was introduced in r16743 as: >>> spcs = [" Apple", " Banana ", "Coco nut "] >>> print [s.strip() for s in spcs] ['Apple', 'Banana', 'Coco nut'] and was changed in r16831 to: >>> freshfruit = [' banana', ' loganberry ', 'passion fruit '] >>> [w

[issue6475] Documentation > Tutorial > List Comprehensions

2009-07-13 Thread Retro
New submission from Retro : There's a mistake in the code snippet: >>> freshfruit = [' banana', ' loganberry ', 'passion fruit '] >>> [weapon.strip() for weapon in freshfruit] ['banana', 'loganberry', 'passion fruit'] The second line should be: >>> [fruit.strip() for fruit in freshfruit] ['

[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments

2009-07-13 Thread Hagen Fürstenau
New submission from Hagen Fürstenau : I think the following error messages are inconsistent and confusing: >>> def f(a, b): pass ... >>> f(a=1) Traceback (most recent call last): File "", line 1, in TypeError: f() takes exactly 2 non-keyword positional arguments (1 given) >>> f(b=1) Traceback

[issue6433] multiprocessing: pool.map hangs on empty list

2009-07-13 Thread Jesse Noller
Jesse Noller added the comment: It's on my list for this week. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue6433] multiprocessing: pool.map hangs on empty list

2009-07-13 Thread Eric Eisner
Eric Eisner added the comment: Can anyone review this patch? It is a very simple fix to catch this one edge case. As this can cause multiprocessing to enter a state where it needs to be externally killed, it would be good if this made 2.6.3. -- ___ P

[issue6469] Function definition expressions feature

2009-07-13 Thread R. David Murray
R. David Murray added the comment: Even assuming you'd gotten a rough consensus on python-ideas (which it does not appear that you have), a change of this nature would require a PEP, and is thus not suitable for the tracker. -- nosy: +r.david.murray priority: -> normal resolution: ->

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Besides, the new API makes the behaviour more explicit and puts the decision in the hands of the embedding developer (which certainly knows better than us what he wants to do). As the Python Zen says: In the face of ambiguity, refuse the temptation to guess. -

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, it would certainly be useful to review current behaviour and document it precisely; and then, perhaps change it in order to fix the current bug. The problem is that the current behaviour seems to have evolved quite organically, and it's not obvious who r

[issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures

2009-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Right, file.write raises IOError when os.write raises OSError :-( Updated the patch. -- Added file: http://bugs.python.org/file14494/broken_pipe-2.patch ___ Python tracker __

[issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures

2009-07-13 Thread Dariusz Walczak
Dariusz Walczak added the comment: Your patch works for me with one exception: On FreeBSD (python 2.6.1) OSError exception is raised by os.write instead of IOError exception (raised by self.stdin.write on Windows). The error code is same on both platforms. -- _

[issue6314] logging.basicConfig(level='DEBUG', ... and setLevel("DEBUG") result in no logging

2009-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: Fixed checked into trunk & py3k as per msg90214. -- resolution: -> fixed status: open -> pending ___ Python tracker ___ __

[issue6458] With logging.config.fileConfig can't create logger without handler

2009-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: Just set up a handlers= line in the relevant sections. You don't have to actually specify any handlers. -- nosy: +vsajip resolution: -> invalid status: open -> closed ___ Python tracker

[issue6444] multiline exception logging via syslog handler

2009-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: Why can't you either use %r in the format string if you know you'll be printing out multiple lines, or define your own handler/formatter to do exactly what you want? I can't see how to provide what you need in a generally useful way in the stdlib. -- assig

[issue6469] Function definition expressions feature

2009-07-13 Thread Chris Perkins
Chris Perkins added the comment: Details and discussion: http://groups.google.com/group/python-ideas/browse_frm/thread/a2bb1ff3992d9c01 -- ___ Python tracker ___ ___

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-07-13 Thread Tomas Hoger
Tomas Hoger added the comment: Additional API has one disadvantage - it requires a modification of all affected applications embedding python, which is not likely to happen soon after the API is introduced. Therefore, it may still be worth reviewing current behaviour (that seemed to have had no

[issue6473] hmac sha384/sha512 fails test vectors

2009-07-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> critical stage: -> needs patch versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker ___ _

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2009-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond Hettinger wrote: > Raymond Hettinger added the comment: > > In Py3.x, this fails: > "%s.%s.%s-%s-%s" % sys.version_info > > The reason is that PyUnicode_Format() expects a real tuple, not a tuple > lookalike. The fix is to either have structs

[issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures

2009-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Testing on Debian with latest trunk: - the proposed example code works very well (I get all data). - I added "subprocess._has_poll = False", and some (sometimes all) data is lost. It seems that select() will return stdin even if it is not writable. On Win

[issue6071] no longer possible to hash arrays

2009-07-13 Thread ivank
ivank added the comment: It no longer works with objects created with buffer() either: >>> hashlib.sha1(buffer("x")).hexdigest() Traceback (most recent call last): File "", line 1, in TypeError: object supporting the buffer API required -- ___ Py