[issue1193577] add server.shutdown() method to SocketServer

2008-03-02 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: It seems that .await_request() was only added a month ago to fix issue 742598, so it's no great hardship to refactor it again now. Timeouts never worked for .serve_forever() because the try/except in .handle_request() turned their exception into a plain return,

[issue2176] Undocumented lastrowid attribute i sqlite3 cursor class

2008-03-02 Thread Pavel Vinogradov
Pavel Vinogradov added the comment: This patch include brief lastrowid description based on my experience and Python DB API 2.0 PEP. -- keywords: +patch nosy: +pavel.vinogradov Added file: http://bugs.python.org/file9582/lastrowid_rst_desctiption.diff __

[issue2216] Problems using logging module with idle

2008-03-02 Thread Andrea Griffini
New submission from Andrea Griffini: I'm not a user of idle, but when asked about a strange behaviour of the logging module I digged a bit and found what I think is indeed a problem in the module itself. The problem is visible if the module is used from idle (or any other IDE that keeps the same

[issue2200] find_executable fails to find .bat files on win32

2008-03-02 Thread Lev Shamardin
Lev Shamardin added the comment: Here is my vision of this patch. I don't think that it is necessary to fall back to 'com/exe/bat' if PATHEXT is not set, since it must be set on any correctly configured Win32 platform. -- keywords: +patch Added file: http://bugs.python.org/file9584/spawn

[issue687648] classic division in demos/ directory

2008-03-02 Thread Robert Schuppenies
Robert Schuppenies added the comment: The attached patch applies floor division to all classic divisions where only integer input was used, and true division where at least on input parameter was of non-integral type. In cmptree.py I replaced "int(size/dt)" with "size//dt" as it has the same sem

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Christoph Zwerschke
New submission from Christoph Zwerschke: The following code throws a NameError which seems to be a bug existing since Python 2.4 up to the current 2.5.2. class A: a = 'test' [c for c in a] (c for c in a) tuple(c for c in a) [c for c in a if c in a] (c for c in a if c in a

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Georg Brandl
Georg Brandl added the comment: This may seem odd, but is correct as per spec. The "if c in a" part is executed in a scope of its own, and class scopes don't contribute to nested scoping. -- nosy: +georg.brandl resolution: -> wont fix status: open -> closed ___

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Thanks for the quick explanation. I understand that class scopes don't extend and this is documented behavior. However, the question is why the if clause is executed in a scope of its own and where this is documented. You would expect that the problematic

[issue1193577] add server.shutdown() method to SocketServer

2008-03-02 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I'll submit the attached patch in a couple days unless I get comments. Added file: http://bugs.python.org/file9586/polling_shutdown.patch _ Tracker <[EMAIL PROTECTED]> __

[issue1672853] Error reading files larger than 4GB

2008-03-02 Thread Joseph Armbruster
Joseph Armbruster added the comment: Just got in from New Smyrna beach... and the verdict is: URL: http://svn.python.org/projects/python/branches/release25-maint Revision: 61182 python bigfiletest1.py 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1500

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Georg Brandl
Georg Brandl added the comment: The actual equivalent would be class A: a = 'test' def __g(_x): for c in _x: if c in a: yield c tuple(__g(a)) i.e. the outmost iterator is evaluated in the enclosing scope; not the if clause is in its own scope, but

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think this is Mac specific---one of the linux buildbots has also been having this problem, it seems. I think it's a result of having an older version of sqlite3 installed. My OS X 10.4 box has sqlite3 version 3.1.3 installed, and that version doesn't s

[issue2217] Problem with if clause in generator expression on class level

2008-03-02 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Thanks, this now makes sense to me. You're right, it's rather an ugly wart than a bug. But I think the Python reference needs to be improved to make this clear enough. How about the following proposed addtions (in square brackets) to section 5.2.5 (http://

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Jean Brouwers
Jean Brouwers added the comment: Just for the record, the test continues to fail if rerun with 2.6a1. However, the (same?) test does *not* fail with 3.0a3 built on the same MacOS X system. __ Tracker <[EMAIL PROTECTED]> _

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Christian Heimes
Christian Heimes added the comment: Some modifications to the 2.6 code base didn't make it into 3.0 in time. See r61141 -- nosy: +tiran __ Tracker <[EMAIL PROTECTED]> __ __

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Jean Brouwers
Jean Brouwers added the comment: In addition, the sqlite test did *not* fail with 2.5.2 and 2.5.1 built on the same MacOS X machine, about one week resp. several months ago. __ Tracker <[EMAIL PROTECTED]> ___

[issue1736190] asyncore/asynchat patches

2008-03-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I've discussed a lot with Josiah via e-mail and this is the updated version of the patch including a fix for the two issues raised before. This update has been needed also because the original patch has been out-dated by some commits after r53734 involving the

[issue2218] Enhanced hotshot profiler with high-resolution timer

2008-03-02 Thread Jean Brouwers
New submission from Jean Brouwers: The _hotshot module uses the gettimeofday function to profile the run time. I enhanced the hotshot module in Python 2.5.2 to use a high resolution timer where available (RDTSC on x86/_64, MFTB/U on PowerPC and gethrtime on Solaris). The improved hotshot mod

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Gerhard Häring
Gerhard Häring added the comment: Revision 61141 made the test work with old SQLite versions. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mail

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Gerhard Häring
Changes by Gerhard Häring: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyth

[issue2215] test_sqlite fails in 2.6a1 on MacOS X

2008-03-02 Thread Gerhard Häring
Gerhard Häring added the comment: r61174 made the tests work with old SQLite versions. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing lis

[issue2179] with should be as fast as try/finally

2008-03-02 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Here's a proof-of-concept patch that keeps the __exit__ method on the stack. It uses ROT_TWO to stuff it under the context object instead of storing it into a temporary. (Thanks Nick for pointing out that problem before I had to waste time on it.) test_with pass

[issue1740] use unittest for test_logging

2008-03-02 Thread Brett Cannon
Brett Cannon added the comment: Committed in r61189 on the trunk. Thanks, Antoine! -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1740] use unittest for test_logging

2008-03-02 Thread Brett Cannon
Brett Cannon added the comment: Oh, and thanks Thomas for the port change. I made sure to keep it. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue2179] with should be as fast as try/finally

2008-03-02 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Now with documentation, a working test_compile, and one less refleak. Added file: http://bugs.python.org/file9590/faster_with.patch __ Tracker <[EMAIL PROTECTED]> __

[issue795081] email.Message param parsing problem II

2008-03-02 Thread Tony Nelson
Tony Nelson added the comment: If I understand RFC2822 3.2.2. Quoted characters (heh), unquoting must be done in one pass, so the current replace().replace() is wrong. It will change '\\"' to '"', but it should become '\"' when unquoted. This seems to work: re.sub(r'\\(.)',r'\1',s) I have

[issue1107887] Speed up function calls/can add more introspection info

2008-03-02 Thread Jeffrey Yasskin
Changes by Jeffrey Yasskin: -- nosy: +jyasskin _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: http: