[issue4195] Regression for executing packages

2008-10-25 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Added revised version of patch with test cases and documentation updates, as well as fixing a potential recursion issue with pathological packages where __main__ was also a package) -- keywords: +patch Added file:

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Winfried Plappert
Winfried Plappert [EMAIL PROTECTED] added the comment: Hi is the dramatic difference on Solaris-10 / Python2.6: I dtraced the popentest.py and counted syscalls: with os_popen: read =243 with process:Popen read = 589018 That explains a lot! The rest of the system calls are similir

[issue2275] urllib2 header capitalization

2008-10-25 Thread John J Lee
John J Lee [EMAIL PROTECTED] added the comment: I have attached a patch that just: * Improves doctests a bit * Changes .get_headers() and .has_header() to be case-insensitive * Documents .get_header() and .header_items(), fixes some incorrectly-documented argument names, and notes the

[issue2275] urllib2 header capitalization

2008-10-25 Thread John J Lee
Changes by John J Lee [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11887/issue2775-problems.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-10-25 Thread John J Lee
John J Lee [EMAIL PROTECTED] added the comment: I agree there is a bug here: clearly the methods on the Request class are inconsistent with AbstractHTTPHandler.do_open() . I think Facundo's patch is good, though it needs a test. The general principle when fixing earlier bugs has been that the

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Winfried Plappert
Winfried Plappert [EMAIL PROTECTED] added the comment: The created testfile size is 588890 bytes, which implies that subprocess.Popen reads the file in completely unbuffered mode, one byte at a time. If I modify the popentest.py programme by specifying a bufsize of 1_000_000, the execution time

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Using a nonzero bufsize parameter makes all the difference in the world: Using the default (bufsize=0 == unbuffered): % python popentest.py time with os.popen : 0.035032 time with subprocess.Popen : 1.496455 Creating the

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Using a nonzero bufsize parameter makes all the difference in the world: ... In fact, looking at posix_popen in posixmodule.c it appears the default value for bufsize there is -1, implying that I/O is fully buffered. Even if the

[issue4203] adapt sphinx-quickstart for windows

2008-10-25 Thread Tim Michelsen
New submission from Tim Michelsen [EMAIL PROTECTED]: Hello, for users on the windows platform, it could be of great help if the sphinx-quickstart would be adjuste to their platform. Here are my suggestions: * create a batch file instead of the Makefile * make-docs.bat, contents: sphinx-build

[issue4203] adapt sphinx-quickstart for windows

2008-10-25 Thread Tim Michelsen
Changes by Tim Michelsen [EMAIL PROTECTED]: -- type: - feature request ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4203 ___ ___ Python-bugs-list

[issue3924] cookielib chokes on non-integer cookie version, should ignore it instead

2008-10-25 Thread John J Lee
John J Lee [EMAIL PROTECTED] added the comment: Patch with tests attached. The patch is slightly different to my first suggestion: in the patch, invalid version values cause the cookie to be ignored (but double quotes around valid versions are fine). -- keywords: +patch Added file:

[issue3924] cookielib chokes on non-integer cookie version, should ignore it instead

2008-10-25 Thread John J Lee
John J Lee [EMAIL PROTECTED] added the comment: The bug is present on trunk and on the py3k branch, so I've selected versions Python 2.7 and Python 3.0 This is a straightforward bug, so I selected 2.5.3 and 2.6 also, to indicate this is a candidate for backport. -- components: +Library

[issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4

2008-10-25 Thread Akira Kitada
New submission from Akira Kitada [EMAIL PROTECTED]: I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. Failed to find the necessary bits to build these modules: _bsddb _sqlite3 _tkinter gdbm linuxaudiodev

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' [EMAIL PROTECTED]: -- nosy: +giampaolo.rodola ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4194 ___ ___ Python-bugs-list

[issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4

2008-10-25 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Even if a certain platform is supported, you can't infer that all modules will build on it. Can you propose a patch? -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED]

[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait

2008-10-25 Thread Piotr Meyer
Piotr Meyer [EMAIL PROTECTED] added the comment: I confirm build failure on NetBSD 4.0.1 (latest stable) - but NetBSD-current is - probably - also affected: *** WARNING: renaming _multiprocessing since importing it failed: build/lib.netbsd-4.0.1-i386-2.6/_multiprocessing.so: Undefined PLT

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: I've been thinking about it, and I think even though it would be a slight change to the API, I agree with Winfried that the default value for bufsize should be -1, not 0. In my own use of os.popen and friends, almost all the time I use them

[issue4194] Miserable subprocess.Popen performance

2008-10-25 Thread Winfried Plappert
Winfried Plappert [EMAIL PROTECTED] added the comment: On the other hand, we will silently break all those applications which are out there relying on the fact that a pipe is an unbuffered device. You might consider it for Python 3.0, but I don't know if it is a good idea for Python 2.x. The

[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Eric Devolder
New submission from Eric Devolder [EMAIL PROTECTED]: creating a unicode string from an empty b'' does not result in '', but produces b'' instead. str(b'') b'' Workaround: if the encoding is specified, the resulting string is fine. str(b'', 'ascii') '' -- components: Interpreter

[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: This is expected. There is no bytes.__str__ method, so the bytes.__repr__ is used. -- nosy: +benjamin.peterson resolution: - invalid status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Eric Devolder
Eric Devolder [EMAIL PROTECTED] added the comment: Thanks for the tip - and sorry about the noise. I didn't catch this when reading through PEPs manual, however. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4205

[issue4206] multiprocessing docs

2008-10-25 Thread David W. Lambert
New submission from David W. Lambert [EMAIL PROTECTED]: http://docs.python.org/dev/3.0/library/multiprocessing.html map(func, iterable[, chunksize]) A parallel equivalent of the map() builtin function. It blocks till the result is ready. Not really, __builtins__.map returns a mapping object,