[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Jeffrey Yasskin
Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment: Neal, t and stream aren't likely to have much effect since they're used so little. next_instr and stack_pointer are used to communicate between loops, so they can't move inside. I eagerly await your benchmark runs. :) Skip, I managed to repr

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Thanks for the review! > Your description of the patch is a bit misleading. As far as I can > tell only the first chunk (Python/import.c changes) addresses a > potential buffer overflow. Yes, you are right. It seems only the bug in im

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Pybench doesn't show much difference for me, about 0.1% better on minimum times. A few tests are quite a bit worse (> 10%) with the patch (Recursion, SimpleFloatArithmetic, StringPredicates, TryFinally). A few are quite a bit better (Compare

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: I've yet to run pybench, but I came get these warnings from the compiler after applying the patch: ../Python/ceval.c: In function 'PyEval_EvalFrameEx': ../Python/ceval.c:772: warning: 'x' may be used uninitialized in this function ../Py

[issue1600] str.format() produces different output on different platforms (Py30a2)

2008-03-09 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Issue closed with commit r60909. Fixed as suggested by Mark Dickinson: "The exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent." -- resolution: -> fixed status: open -> clos

[issue2218] Enhanced hotshot profiler with high-resolution timer

2008-03-09 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: Attached is the latest, hopefully final version of the enhanced and improved hotshot profiler files. In addition to fixes for the 7 issues mentioned previously, type Py_ssize_t is used instead of size_t. Use this verion 4 and discard all p

[issue2261] Warning: could not send message for past 4 hours

2008-03-09 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-b

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: Can't next_instr and stack_pointer move inside the for loop too? __ Tracker <[EMAIL PROTECTED]> __ __

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: I bet with just a little more work, you could get rid of t and stream. t is only used for a single set of opcodes (STORE_SLICE+n). stream is only used for the PRINT opcodes. The code in print could be moved to a function which might allow the

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-09 Thread Jeffrey Yasskin
New submission from Jeffrey Yasskin <[EMAIL PROTECTED]>: I'm using Apple's gcc-4.0.1 on a 2.33GHz Intel Core 2 Duo to test this. Measurements from other compilers or other chips would be cool. Specifically, this patch: 1) Moves the declarations of most of the local variables inside the for(;;)

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

2008-03-09 Thread Jeffrey Yasskin
Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment: Thanks Nick and Amaury! Amaury, what times are you seeing? It could be a just-gcc speedup, but I wouldn't have thought so since the patch eliminates 2 times around the eval loop. It could be that the overhead of WITH_CLEANUP is high enough t

[issue2260] conditional jump to a POP_TOP optimization

2008-03-09 Thread Paul Pogonyshev
Paul Pogonyshev <[EMAIL PROTECTED]> added the comment: Also, this is the reason for while() in the patch. Consider this function: def bar(a, b, c): if a: if b: if c: return 'true' Before the patch: 11 0 LOAD_FAST0 (a)

[issue2261] Warning: could not send message for past 4 hours

2008-03-09 Thread Paul Molodowitch
New submission from Paul Molodowitch <[EMAIL PROTECTED]>: ** ** THIS IS A WARNING MESSAGE ONLY ** ** YOU DO NOT NEED TO RESEND YOUR MESSAGE ** ** The original message was received at S

[issue2260] conditional jump to a POP_TOP optimization

2008-03-09 Thread Paul Pogonyshev
New submission from Paul Pogonyshev <[EMAIL PROTECTED]>: This optimization targets a common case of functions like this: def foo(a, b): if a: if b: return 'true' Before the optimization: 6 0 LOAD_FAST0 (a) 3 JUMP_IF_FALSE

[issue1617161] Instance methods compare equal when their self's are equal

2008-03-09 Thread Paul Pogonyshev
Paul Pogonyshev <[EMAIL PROTECTED]> added the comment: Since I'm not on python-dev, I'll mention here that the new behavior makes no sense to me at all. Which is best highlighted by Frank in msg63414. -- nosy: +_doublep _ Tracker <[EMAIL PROTECTED]>

[issue2249] To document "assertTrue" in unittest

2008-03-09 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Okay, I give in :) Committed as r61329. -- resolution: wont fix -> fixed status: pending -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2259] Poor support other than 44.1khz, 16bit audio files?

2008-03-09 Thread Oki Mikito
New submission from Oki Mikito <[EMAIL PROTECTED]>: It appears that aifc, as well as wave, does not support audio files other than 44100 hz 16-bit format. -- >>> f = aifc.open('Track 06') Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Ver

[issue2249] To document "assertTrue" in unittest

2008-03-09 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Just to make the story complete, it should be mentioned that assertFalse/True were added because these are the names used by JUnit: r34209 | purcell | 2003-09-22

[issue2249] To document "assertTrue" in unittest

2008-03-09 Thread Steve Purcell
Steve Purcell <[EMAIL PROTECTED]> added the comment: +1 for applying Alexander's patch, then; I'll leave the decision to a current committer. __ Tracker <[EMAIL PROTECTED]> __

[issue2249] To document "assertTrue" in unittest

2008-03-09 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: FWIW, grepping through Lib/test reveals the following statistics: assertFalse: 83 assertTrue: 97 failUnless: 684 assert_: 1977 Not having assertTrue/assertFalse methods in the Library Reference does not discourage people from using th

[issue1617161] Instance methods compare equal when their self's are equal

2008-03-09 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Armin, I think this should be discussed on python-dev. I don't understand your motivation for comparing methods of distinct but equal objects as equal. The callback argument on the other hand, is compelling. ___

[issue1617161] Instance methods compare equal when their self's are equal

2008-03-09 Thread Frank Niessink
Frank Niessink <[EMAIL PROTECTED]> added the comment: Just to reiterate the original bug report: the issue (for me) is that currently (python 2.5): >>> [].__add__ == [].__add__ True >>> [].__add__ == [1].__add__ False Or, using a non-builtin class: >>> class C(object): ... def __eq__(self, o

[issue1617161] Instance methods compare equal when their self's are equal

2008-03-09 Thread Armin Rigo
Armin Rigo <[EMAIL PROTECTED]> added the comment: My mistake, you are right. I forgot about one of the many types that CPython uses internally for built-in methods. Indeed: >>> [].index == [].index False >>> [].__add__ == [].__add__ True I can fix this so that the answer is Tr

[issue2258] Update command line docs for issue 1739468

2008-03-09 Thread Nick Coghlan
New submission from Nick Coghlan <[EMAIL PROTECTED]>: The ability to execute zip files and directories containing a __main__.py file needs to be covered in the documentation of the command line options. -- assignee: ncoghlan components: Documentation keywords: easy messages: 63412 nosy:

[issue2249] To document "assertTrue" in unittest

2008-03-09 Thread Jesús Cea Avión
Jesús Cea Avión <[EMAIL PROTECTED]> added the comment: I noted the issue while working in bsddb3 module. If failed in python2.3 because some tests were using "assertTrue". I had to dig where that method came from (time lost!) and found that a) it was added in python 2.4 and b) it is not documente

[issue2119] Empty test

2008-03-09 Thread Martin v. Löwis
New submission from Martin v. Löwis <[EMAIL PROTECTED]>: Follow-up __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: htt