[issue508157] urllib.urlopen results.readline is slow

2008-04-06 Thread Aren Olson
Aren Olson [EMAIL PROTECTED] added the comment: I can indeed confirm that this change creates a HUGE speed difference. Using the code found at [1] with python2.5 and apache2 under Ubuntu, changing the buffer size to 4096 improved the time needed to download 10MB from 15.5s to 1.78s, almost 9x

[issue815646] thread unsafe file objects cause crash

2008-04-06 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: I've attached my patch that I want to commit. The main change from filethread4 is some cleanup in file_test to make it run a lot faster and add verbose mode output to indicate how well it is actually testing the problem (counting the times

[issue2292] Missing *-unpacking generalizations

2008-04-06 Thread Thomas Wouters
Thomas Wouters [EMAIL PROTECTED] added the comment: No, it's what you asked for in msg63551: How about dicts? kwds = {'z': 0, 'w': 12} {'x': 1, 'y': 2, **kwds} # {'x': 1, 'y': 2, 'z': 0, 'w': 12} (unpacking of dicts in dicts.) __ Tracker [EMAIL PROTECTED]

[issue2561] Instance remembers old values from former life

2008-04-06 Thread Werner Arnhold
New submission from Werner Arnhold [EMAIL PROTECTED]: I don't know if it is a bug or a feature but the result seems to be wrong for me: A constructor argument remembers its values from the last call -- files: class_with_listparamdefault.py messages: 65024 nosy: warnhold severity: normal

[issue2561] Instance remembers old values from former life

2008-04-06 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Yes, this is expected. Default values are only evaluated once, at function creation time. If you need to have a mutable default argument that is assigned to something and changed, use something like this: def f(arg=None): if arg is None:

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
Changes by Tarek Ziadé [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9960/unicode.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2562 __ ___

[issue2558] Document pickle protocol 3

2008-04-06 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Committed the patch in r62181. -- assignee: gvanrossum - georg.brandl resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2558

[issue980098] Module to dynamically generate structseq objects

2008-04-06 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I believe this is obsolete now we have namedtuple? -- assignee: - rhettinger nosy: +georg.brandl, rhettinger Tracker [EMAIL PROTECTED] http://bugs.python.org/issue980098

[issue815646] thread unsafe file objects cause crash

2008-04-06 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: Patched and tested on one of my buildbots, test_file passes without error with your latest Patch Greg. -- nosy: +Trent.Nelson Tracker [EMAIL PROTECTED] http://bugs.python.org/issue815646

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
New submission from Tarek Ziadé [EMAIL PROTECTED]: If I try to put my name in the Author field as a string field, it will brake because distutils makes the assumption that the fields are string encoded in ascii, before it decodes it into unicode, then encode it in utf8 to send the data. See

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
Changes by Tarek Ziadé [EMAIL PROTECTED]: Added file: http://bugs.python.org/file9961/unicode.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2562 __ ___ Python-bugs-list

[issue980098] Module to dynamically generate structseq objects

2008-04-06 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- versions: +Python 2.6 Tracker [EMAIL PROTECTED] http://bugs.python.org/issue980098 ___ Python-bugs-list mailing list

[issue2515] Segfault while operating on closed sqlite3 cursor.

2008-04-06 Thread Gerhard Häring
Gerhard Häring [EMAIL PROTECTED] added the comment: Thanks for reporting this. It's fixed in r62183 in the 2.5 maintenance branch. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2515

[issue815646] thread unsafe file objects cause crash

2008-04-06 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Ok Greg, I wasn't sure locking/unlocking the GIL would create a memory barrier but it sounds logical after all. Your patch looks fine to me. Tracker [EMAIL PROTECTED] http://bugs.python.org/issue815646

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: The official supported way for non-ASCII characters in distutils is to use Unicode strings. If anything else fails, that's not a bug. IIUC, in this case, it's setuptools that fails, not distutils. Assuming I understood correctly, I'm closing

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
Tarek Ziadé [EMAIL PROTECTED] added the comment: In that case, distutils should not do a unicode() call over each field passed before .encode('utf8') is called, because it makes the assumption that string type can be used. __ Tracker [EMAIL PROTECTED]

[issue2563] embed manifest in windows extensions

2008-04-06 Thread Mark Hammond
New submission from Mark Hammond [EMAIL PROTECTED]: The move to vs2008 has caused .manifest files to be created next to distutils created extensions modules, rather than being embedded as recommended by Microsoft. See http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx The attached

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I don't understand. It is *certainly* allowed to use byte strings for these data, as long as they are ASCII. The Unicode requirement exists only for non-ASCII characters, and distutils makes explicit, deliberate use of the default encoding

[issue2530] Document IO module

2008-04-06 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Attaching a draft. -- keywords: +patch Added file: http://bugs.python.org/file9963/io_doc.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2530 __

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
Tarek Ziadé [EMAIL PROTECTED] added the comment: ok I see what you mean, thanks for the explanation __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2562 __ ___ Python-bugs-list

[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: If option --with-system-ffi is not specified and if the compiler is not gcc, raise an error. Up to here, it all sounded fine. What do you mean by error? Abort? That should not happen. Instead, setup.py skips modules if it doesn't find the

[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C

2008-04-06 Thread Jean Brouwers
Jean Brouwers [EMAIL PROTECTED] added the comment: Agreed. In addition, gcc -v writes to stderr and catching the output requires redirecting stderr or using os.popen3 or -4. The latter fail since the select module (needed by subprocess) is still missing at that time. Going back to Thomas'

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Tarek Ziadé
Tarek Ziadé [EMAIL PROTECTED] added the comment: oh, hold one, it is more complicated in fact :) setuptools calls DistributionMetadata.dist.write_pkg_file() method to write the .egg-info file. This method make the assertion that the metadata fields are string so it is not setuptools fault.

[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C

2008-04-06 Thread Jean Brouwers
Jean Brouwers [EMAIL PROTECTED] added the comment: Instead of ... raise an error, it should read ... report the _ctypes module as missing, do not run any tests, etc. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2552

[issue2564] Python hangs on FreeBSD7 in test_capi

2008-04-06 Thread Taavi Repän
Changes by Taavi Repän [EMAIL PROTECTED]: -- components: None nosy: trepan severity: normal status: open title: Python hangs on FreeBSD7 in test_capi type: behavior versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2564

[issue2564] Python hangs on FreeBSD7 in test_capi

2008-04-06 Thread Taavi Repän
New submission from Taavi Repän [EMAIL PROTECTED]: When doing import.test_autotest, test_capi hangs. It seems that threads 1,2,3 are trying to acquire import lock, which is owned by thread 4, which is trying to lock some other lock. Python 2.5.2 (r252:60911, Apr 6 2008, 17:28:23) [GCC 4.2.1

[issue2530] Document IO module

2008-04-06 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Ok. attaching an improved patch. Do you think information about indenting classes and such can be added to the style guide? It'd be very helpful. Added file: http://bugs.python.org/file9965/io_doc2.patch __

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I agree there is a bug in distutils. Before we proceed, I think distutils-sig needs to be consulted. My proposal would be the one I suggested earlier: all strings should either be Unicode or ASCII-only byte strings. This contradicts to the

[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: As a follow-up: for compatibility, it might be possible to support either Unicode or arbitrary plain strings in write_pkg_file. In 3k, such support can then be dropped. As that constitutes a new feature, it shouldn't be applied to 2.5.

[issue2515] Segfault while operating on closed sqlite3 cursor.

2008-04-06 Thread Paul Davis
Paul Davis [EMAIL PROTECTED] added the comment: No prob. On Sun, Apr 6, 2008 at 7:06 AM, Gerhard Häring [EMAIL PROTECTED] wrote: Gerhard Häring [EMAIL PROTECTED] added the comment: Thanks for reporting this. It's fixed in r62183 in the 2.5 maintenance branch. -- resolution:

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2008-04-06 Thread Johannes Hoff
Johannes Hoff [EMAIL PROTECTED] added the comment: This is still the case with Visual Studio Express 2008. It can be fixed by downloading the Windows SDK, though it would be nicer if this was not necessary. Download link: http://blogs.msdn.com/windowssdk/archive/2008/02/07/

[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-04-06 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: [Updating the issue with relevant mailing list conversation] Interesting results! I committed the patch to test_socket.py in r62152. I was expecting all other platforms except for Windows to behave consistently (i.e. pass). That is, given

[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-04-06 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: [Updating issue with mailing list discussion; my reply to Jean-Paul] With TCP, we are never able to start multiple servers that bind the same IP address and same port: a completely duplicate binding. That is, we cannot start one server that

[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-04-06 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: [Updating issue with mailing list discussion; Jean-Paul's reply] On Fri, 4 Apr 2008 13:24:49 -0700, Trent Nelson [EMAIL PROTECTED] wrote: Interesting results! I committed the patch to test_socket.py in r62152. I was expecting all other

[issue2548] Undetected error in exception handling

2008-04-06 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: I've identified rev58032 [1] as the one introducing this issue. It's Brett's code, fixing a nasty crasher and adding a pre-built exception (PyExc_RecursionErrorInst). [1] http://svn.python.org/view?rev=58032view=rev P.S.: Thanks Thomas for

[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-04-06 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: I've attached another patch that fixes test_support.bind_port() as well as a bunch of files that used that method. The new implementation always uses an ephemeral port in order to elicit an unused port for subsequent binding. Tested on

[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-04-06 Thread Neal Norwitz
Neal Norwitz [EMAIL PROTECTED] added the comment: Trent, go ahead and try this out. We should definitely be moving in this direction. So I'd rather fix the problem than keep suffering with the current problems of not being able to run the test suite concurrently. I think bind_port might be

[issue815646] thread unsafe file objects cause crash

2008-04-06 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: Committed to trunk in revision 62195. Misc/NEWS entry added. I also added two new C API functions: PyFile_IncUseCount and PyFile_DecUseCount along with documentation. They should be used by any C extension code that uses PyFile_AsFile and

[issue2565] Change 'type' to 'class' in repr/str(builtin-class)

2008-04-06 Thread Terry J. Reedy
New submission from Terry J. Reedy [EMAIL PROTECTED]: From py3 devel list today: r23331 | gvanrossum | 2001-09-25 05:56:29 +0200 (Di, 25 Sep 2001) | 5 lines Change repr() of a new-style class to say class 'ClassName'

[issue2513] 64bit cross compilation on windows

2008-04-06 Thread Mark Hammond
Mark Hammond [EMAIL PROTECTED] added the comment: Checked in r62197, including the patch from Thomas. Note I expanded the patch to the distutils doc (noting you need to build Python itself for the target platform before it works) and added a short entry to Misc/NEWS -- resolution: -

[issue2388] Compiler warnings when using UCS4

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This is now fixed in r62199 -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2388 __

[issue2565] Change 'type' to 'class' in repr/str(builtin-class)

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: So which one should it be: type or class? -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2565 __

[issue2566] Py3.0a4 wsgiref simple_server failed to start

2008-04-06 Thread delimy
New submission from delimy [EMAIL PROTECTED]: Here's the most recent traceback: File /home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py, line 116, in finish_response self.write(data) File /home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py, line 199, in write

[issue2128] sys.argv is wrong for unicode strings

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: What warnings precisely are you seeing? I didn't see anything in the 3k branch (not even for #2388, as PyErr_Format doesn't have the GCC format attribute in 3k, unlike 2.x). __ Tracker [EMAIL PROTECTED]

[issue2567] Section New-style and classic classes needs to be removed/rewritten

2008-04-06 Thread Martin v. Löwis
New submission from Martin v. Löwis [EMAIL PROTECTED]: There are no classic classes anymore in Python. -- assignee: georg.brandl components: Documentation messages: 65065 nosy: georg.brandl, loewis severity: normal status: open title: Section New-style and classic classes needs to be

[issue2565] Change 'type' to 'class' in repr/str(builtin-class)

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This is now fixed in r62203. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2565 __