[issue2181] optimize out local variables at end of function

2008-02-28 Thread Armin Rigo
Armin Rigo added the comment: I view this as a problem with Psyco, not with the user code. An even deeper reason for which the general optimization would break code is because it changes the lifetime of objects. For example, Psyco contains specific, user-requested support to make sure the

[issue2199] cPickle error with gtk GEnum classes

2008-02-28 Thread PyScripter
New submission from PyScripter: cPickle has problems loading instances of gtk gobject.GEnum classes. gobject.GEnum is a subclass of int. On the other hand pickle handles those classes correctly. Since cPickle is meant to be a faster version of pickle this needs to be consider a bug. To

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

2008-02-28 Thread Lev Shamardin
New submission from Lev Shamardin: distutils.spawn.find_executable appends '.exe' suffix on win32 and os2 platforms. This is incorrect behavior, since it prevents finding .bat, .cmd and other similar files. Ether all extensions from the %PATHEXT% must be checked or filenames both with appended

[issue2169] Adding DOCTYPE and html, body tags to SimpleHTTPServer

2008-02-28 Thread A.M. Kuchling
A.M. Kuchling added the comment: Applied to 2.6 in rev. 61105; it will be merged up to 3.0 at some point. Thanks for the patch! -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2169

[issue1569] Add VS CRT redist to the MSI installer

2008-02-28 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven added the comment: OK, I played around a bit and created a setup project (.vdproj file). The relevant part for the merge modules is: MergeModule { {CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_8968169979C7478FA06F2A63790836FB {

[issue2127] sqlite3 docs should mention utf8 requirement

2008-02-28 Thread Virgil Dupras
Virgil Dupras added the comment: Ok then, we need a test for this. Patch attached. However, I don't know if I applied Amaury's patch wrong or if I miss a ./configure option or something, but even with the patch, the test fails. Another thing: Why isn't the sqlite3 test suite a part of

[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
New submission from Jarod: Section 4.4 of the tutorial gives example code: for n in range(2, 10): ... for x in range(2, n): ... if n % x == 0: ... print n, 'equals', x, '*', n/x ... break ... else: ... # loop fell through without finding a

[issue2201] Documentation Section 4.4

2008-02-28 Thread Robert Lehmann
Robert Lehmann added the comment: In the example code from the tutorial you gave, there was still a comma separator between the string 'equals' and the reference `x`. This is missing when you entered the code, that's why Python is throwing an exception there. -- nosy: +lehmannro

[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
Jarod added the comment: I made a type in that line, but when the typo isn't there I get the same thing. It turns out that it was an error from running a slightly older version of the dev kit. Now that I have updated the dev kit it runs, but I end up with the following as an output: 3 is a

[issue1540386] SocketServer.ForkingMixIn.collect_children() waits on pid 0

2008-02-28 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Mostly fixed in r61106. This should make the buildbots happy, but there is still a corner case in which we waitpid(0) and could confuse other libraries. -- nosy: +jyasskin type: - behavior versions: +Python 2.6 _

[issue1183] race in SocketServer.ForkingMixIn.collect_children

2008-02-28 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Hmm. I think the race can only happen if you call collect_children() concurrently from multiple threads or from a signal handler. The waidpid(0) bug (which affected anyone who spawned subprocesses from anything other than ForkingMixIn) is partly fixed by

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2008-02-28 Thread Brendan W. McAdams
New submission from Brendan W. McAdams: URLLIB2 seems to have issues attempting to digest authenticate against a Windows-based IIS 6.x server. The IIS server requests MD5-sess support, and URLLIB2 throws an exception that ... far from explains this: Traceback (most recent call last): File

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2008-02-28 Thread Brendan W. McAdams
Brendan W. McAdams added the comment: Sorry, this isn't a crash. It doesn't crash the interpreter. I'll assume behavior' is the correct categorization. -- type: crash - behavior __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2202

[issue2201] Documentation Section 4.4

2008-02-28 Thread Georg Brandl
Georg Brandl added the comment: Sorry, but there must be another typo in your code. I guess the else clause isn't correctly indented -- it belongs to the for statement, not the if statement. -- nosy: +georg.brandl resolution: - invalid status: open - closed

[issue2203] ssl module getpeercert returns empty dict when cert_reqs=ssl.CERT_NONE

2008-02-28 Thread Mathew Ryden
Changes by Mathew Ryden: -- components: Library (Lib) nosy: mryden severity: normal status: open title: ssl module getpeercert returns empty dict when cert_reqs=ssl.CERT_NONE type: behavior versions: Python 2.6 __ Tracker [EMAIL PROTECTED]

[issue2201] Documentation Section 4.4

2008-02-28 Thread Jarod
Jarod added the comment: @Georg: you were correct, the indentation was incorrect, I suggest that there be some additional notation be added to code examples in the documentation showing how many tabs there are, to make for an easier read and minimize on errors.

[issue1569] Add VS CRT redist to the MSI installer

2008-02-28 Thread Martin v. Löwis
Martin v. Löwis added the comment: So on that front I think it is a mission accomplished, now to tweak and tune. Please do attach the project. I can't quite understand what it is that you have achieved. Is that a project file that can create a full Python installer?

[issue2204] document ConfigParser behaviour when a file has same section multiple times

2008-02-28 Thread Senthil
Senthil added the comment: Should this 'undesirable' behavior be documented? My thoughts are a) All the key,value pairs in the named section be retrived from entire file. Just appending the dict. Otherwise, b) An Exception can be thrown if it encounters an invalid Configfile having multiple

[issue2127] sqlite3 docs should mention utf8 requirement

2008-02-28 Thread Gerhard Häring
Gerhard Häring added the comment: I didn't try the patch out, yet. But I'd instead try to just open u:memory instead. Also, in Lib/test/test_sqlite.py the sqlite tests are started. They are of course run as part of the Python test suite. __ Tracker [EMAIL

[issue2196] Fix hasattr's exception problems

2008-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's a documentation change that explains hasattr's exception issues top accompany my patch. -- components: +Documentation Added file: http://bugs.python.org/file9567/hasattr_docs.diff __ Tracker [EMAIL PROTECTED]

[issue2199] cPickle error with gtk GEnum classes

2008-02-28 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Using slightly modified PyGObject (so that it gives more useful error message in pyg_enum_new) and adding 'raise' in the end of attached example, I got this: enum GTK_RC_TOKEN_LOWEST of type GtkRcTokenType class 'gtk._gtk.RcTokenType' Traceback (most recent

[issue2199] cPickle error with gtk GEnum classes

2008-02-28 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: It doesn't seem 'pickle' itself works: import pickle import gtk s = pickle.dumps (gtk.RC_TOKEN_LOWEST, pickle.HIGHEST_PROTOCOL) pickle.loads (s) __main__:1: Warning: cannot retrieve class for invalid (unclassed) type `invalid' ** ERROR **: file pygenum.c:

[issue1175933] threading.Condition.wait() return value indicates timeout

2008-02-28 Thread Noriyuki Hosaka
Noriyuki Hosaka added the comment: I have a question: Why not to raise an exception? Timeout means something has messed up, can not continue. We are not doing task scheduling, aren't we? -- nosy: +bgnori _ Tracker [EMAIL PROTECTED]

[issue2205] os.times() returns uncorrect value

2008-02-28 Thread makoto kuwata
Changes by makoto kuwata: -- components: Library (Lib) nosy: kwatch severity: normal status: open title: os.times() returns uncorrect value type: behavior versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2205

[issue2205] os.times() returns uncorrect value

2008-02-28 Thread Facundo Batista
New submission from Facundo Batista: What? Why you say that? What are you doing? What do you get? What do you expect? In which version of Python and in which Platform are you working? -- nosy: +facundobatista resolution: - rejected status: open - closed

[issue2205] os.times() returns incorrect value

2008-02-28 Thread makoto kuwata
makoto kuwata added the comment: I'm sorry to put empty submit. os.time() returns incorrect value. test.py: def f(n): if n = 0: return 1 else: return f(n-1) + f(n-2) import os t1 = os.times() f(34) t2 = os.times() utime = t2[0]

[issue2205] os.times() returns incorrect value

2008-02-28 Thread makoto kuwata
makoto kuwata added the comment: See http://groups.google.com/group/comp.lang.python/browse_thread/thread/8032897a30781df/c656a79d4c3268a6 for details about this bug. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2205 __

[issue2206] critical memory leak in hashlib.md5

2008-02-28 Thread Xie Bengui
Changes by Xie Bengui: -- nosy: -agateriver __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2206 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2206] critical memory leak in hashlib.md5

2008-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is not a hashlib problem (or a bug at all.) range returns an list of numbers. The allocation of this list is the part taking up all the memory. Try replacing range with xrange. -- nosy: +benjamin.peterson

[issue2206] critical memory leak in hashlib.md5

2008-02-28 Thread Benjamin Peterson
Changes by Benjamin Peterson: -- severity: normal - minor __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2206 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2206] critical memory leak in hashlib.md5

2008-02-28 Thread Xie Bengui
Xie Bengui added the comment: I am sorry for submitting this fake issue! Thank Benjamin Peterson! -- nosy: +agateriver __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2206 __

[issue1175933] threading.Condition.wait() return value indicates timeout

2008-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think an exception is the proper thing to use here. Having the wait timeout is not exceptional or unexpected. Timeout means something has messed up, can not continue. Not really. It means we didn't want to wait this long to be notified. --

[issue1183] race in SocketServer.ForkingMixIn.collect_children

2008-02-28 Thread David Ripton
David Ripton added the comment: The if pid not in self.active_children: continue check that was added in r61106 appears to fix the bug, so I'm happy. Thanks. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1183 __

[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-28 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I agree that we're basically done here. I'm back to -1 on inlining the common case for arithmetic (attached here anyway). Simple cases are already pretty fast, and bigger fractions are dominated by gcd time, not function call overhead. Since duplicating the

[issue2127] sqlite3 docs should mention utf8 requirement

2008-02-28 Thread Virgil Dupras
Virgil Dupras added the comment: u':memory:'? That already worked before the patch because the implicit encoding with 'ascii' does not bump into any non-ascii character. Nope, one has to call connect with a filename containing non-ascii characters. __ Tracker