[issue11233] clarifying Availability: Unix

2011-02-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I like the footnote idea. Me too. > I wonder if it would also be worth marking which functions are Posix > (Availability: posix) and therefore likely to be available on all unix > systems. POSIX has optional APIs, hasn't it? ---

[issue11235] Source files with date modifed in 2106 cause OverflowError

2011-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry, ncoghlan ___ Python tracker <http://bugs.python.org/issue11235> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. I guess it needs Georg's approval, though. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/is

[issue11244] Negative tuple elements produce inefficient code.

2011-02-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue11244> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If I do "c:\python27\python run_nose.py" it works correctly. If I do > "nosetests" I get the process explosion. Maybe the bug is in how > distutils and nose work from the command line? I'm confused. The bug is in nose its

[issue11244] Negative tuple elements produce inefficient code.

2011-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The culprit is r82043: "Issue #9011: Remove buggy and unnecessary ST->AST compilation code". -- assignee: -> mark.dickinson nosy: +pitrou ___ Python tracker <http://bugs.py

[issue11244] Negative tuple elements produce inefficient code.

2011-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem is that the "UNARY_NEGATIVE + LOAD_CONST" optimization, which occurs first in bytecode order, inserts a NOP and prevents the tuple optimization to work. -- ___ Python tracker <http://bu

[issue11244] Negative tuple elements produce inefficient code.

2011-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ouch. Obviously test_peephole doesn't have enough tests... -- ___ Python tracker <http://bugs.python.org/issue11244> ___ ___

[issue11244] Negative tuple elements produce inefficient code.

2011-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch that enables advanced (recursive) constant folding. Example: python -c "import dis; f=lambda x: x in {(3*-5)+(-1-6),(1,-2,3)*2,None};dis.dis(f)" With 3.1: 1 0 LOAD_FAST0 (x) 3

[issue11184] Broken large file support on AIX

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Okay, committed to py3k in r88440. Does this need backporting? Certainly. -- ___ Python tracker <http://bugs.python.org/issu

[issue11244] Negative tuple elements produce inefficient code.

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 19 février 2011 à 10:45 +, Mark Dickinson a écrit : > Mark Dickinson added the comment: > > Unassigning. I don't think that r82043 is the *real* culprit here; that > bugfix just happened to expose a deficiency in the peeph

[issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var)

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it's up to Georg to decide if it goes before 3.2. But I don't see the hurry: the online docs are rebuilt daily anyway. -- assignee: pitrou -> georg.brandl ___ Python tracker <http:/

[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sure it should be a blocker? -- nosy: +georg.brandl, pitrou ___ Python tracker <http://bugs.python.org/issue11249> ___ ___ Pytho

[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, isn't Py_tp_doc characteristically bound to a constant char *, so that the problem doesn't manifest itself? -- ___ Python tracker <http://bugs.python.o

[issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO')

2011-02-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker <http://bugs.python.org/issue11234> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Sounds like a blocker to me. Martin, will you be able to provide a patch > > before final? > > The attached patch works fine for me. Is there some documentation somewhere for all this? --

[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > >>> Sounds like a blocker to me. Martin, will you be able to provide a patch > >>> before final? > >> > >> The attached patch works fine for me. > > > > Is there some documentation somewhere for all t

[issue11250] 2to3 truncates files at formfeed character

2011-02-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue11250> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> critical ___ Python tracker <http://bugs.python.org/issue11254> ___ ___ Python-bugs-list mailing list Un

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou stage: -> patch review versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issu

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is the first patch adapted for py3k. -- Added file: http://bugs.python.org/file20810/faster-find-library1-py3k.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, re.escape is probably still needed around name. -- ___ Python tracker <http://bugs.python.org/issue11258> ___ ___

[issue11127] sockets should not be pickleable

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: You also need to a test to Lib/test/test_socket.py. -- ___ Python tracker <http://bugs.python.org/issue11127> ___ ___ Python-bug

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, orsenthil stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker <http://bugs.python.org/issu

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker <http://bugs.python.org/issue11259> ___ ___ Python-

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker <http://bugs.python.org/issue11257> ___ ___ Python-

[issue11184] Broken large file support on AIX

2011-02-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> georg.brandl versions: +Python 2.7 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue11184> ___ ___ Py

[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks good to me. -- nosy: +pitrou stage: -> patch review versions: +Python 3.3 -Python 3.1 ___ Python tracker <http://bugs.python.org/issu

[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Fixed by r87729. This only addresses the compress() and decompress() functions, but e.g. crc32() and adler32() are also touched by this issue. -- versions: -Python 2.6, Python 3.1, Python 3.2 ___ Python trac

[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Fixed by r87728. This only addresses the compress() and decompress() functions, but e.g. crc32() and adler32() are also touched by this issue. -- ___ Python tracker <http://bugs.python.org/iss

[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the patch! Committed in r88460 (3.3) and r88461 (3.2). 2.7 would need more surgery in order for this to be fixed, see #8651 and #8650. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending

[issue10826] pass_fds sometimes fails

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r88484 (3.x), r88485 (3.2). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : Following r88460 (issue10276), test_zlib crashes on the Snow Leopard buildbot (apparently in the new "test_big_buffer" test case). -- messages: 129002 nosy: ixokai, ned.deily, pitrou priority: critical severity: normal status: open title:

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've tried INT_MAX and it didn't change anything. -- ___ Python tracker <http://bugs.python.org/issue11277> ___ ___

[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I was a bit optimistic concerning 32-bit Windows. I had to do some changes, in part because off_t is 32-bit there. The final patch is committed in r88486 (tested under 32-bit and 64-bit Linux and Windows

[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2011-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Backported in r88487 to 3.2, and in r88488 to 2.7. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python tracker <http://bug

[issue11279] test_posix and lack of "id -G" support - less noise required?

2011-02-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +jcea, ronaldoussoren ___ Python tracker <http://bugs.python.org/issue11279> ___ ___ Python-bugs-list mailing list Unsub

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does it matter that _4G < UINT_MAX? You mean _4G > UINT_MAX, right? Yes, it matters, otherwise that defeats the point of the test :) -- ___ Python tracker <http://bugs.python.or

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it's not a patch, just a traceback :) -- ___ Python tracker <http://bugs.python.org/issue11277> ___ ___ Python-bugs-l

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > File: issue11277.patch. > Hmm. Two non-register constants and equal code on 32 and 64 bit. > Does Python has a '64 bit' switch or the like - PY_SSIZE_T_MAX is not > preprocessor-clean, i would guess. Er, how is this patch

[issue2833] __exit__ silences the active exception

2008-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2833> __ ___ Python-bugs-list mailin

[issue2833] __exit__ silences the active exception

2008-05-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I've just discovered that the patch in r62847 doesn't clean up the exception state if the except clause does not mention a local variable, e.g. "except MyException" instead o

[issue2507] Exception state lives too long in 3.0

2008-05-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This bug should be reopened, the patch does not fix it when the except clause does not assign the exception to a local variable (that is, "except KeyError" rather than "except KeyError as e"). Another can of wo

[issue2833] __exit__ silences the active exception

2008-05-14 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Small typo in the snippet above, this should obviously read: try: raise Exception("foo") except Exception as e: try: raise KeyError("caught") except Ke

[issue2833] __exit__ silences the active exception

2008-05-14 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: As Amaury said, lexically nested exception handlers make re-raising behaviour buggy. In Py3k, a workaround is to instead write: try: raise Exception("foo") except Exception as : try: raise KeyError("

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Currently, when creating a new Thread object, there is no good way of > getting that thread's get_ident() value. Well, how about doing it at the beginning of its run() method, e.g. in a Thread subclass:

[issue2507] Exception state lives too long in 3.0

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This is a complementary patch that should fix the remaining cases (funnily doctest was relying on the old behaviour). Unfortunately #2833 still remains, and would probably need some discussion on the ML for proper resolution. Adde

[issue2507] Exception state lives too long in 3.0

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I don't think so. As Amaury pointed in #2833, the original re-raising behaviour which got changed by fixing the present bug was rather broken in its own way. Anyway, I think the question better be asked on the ML because any solut

[issue2507] Exception state lives too long in 3.0

2008-05-24 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10424/better_exc_cleanup.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2507] Exception state lives too long in 3.0

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Patch removed, there are still some unsolved cases :-) __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2833] __exit__ silences the active exception

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Just found another funny example. This one fails also before r62847. def except_yield(): try: raise Exception("foo") except: yield 1 raise list(except_yield()) In Py3k (with or without

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well, it's true that get_ident() will always give you a reliable number while currentThread() can play dirty games on you at shutdown. The thing is the Thread object is dereferenced before the OS thread actually terminates, so it

[issue2507] Exception state lives too long in 3.0

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a hopefully complete patch using the same approach as before. However I'm now convinced that another approach would be better in order to solve both this bug and the various re-raising issues. It would involve replacing

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Or, if you want to educate people at all cost, the TypeError raised by bin() when trying it on a float object could include in its message the binary representation of the float object "for

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I'm not sure about the educational value of letting obscure bugs creeping in when someone passes a float where an int is expected :-) Your vis() function looks appropriate for the task of educating people, why should its behaviou

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well it's quite simple. Imagine you have a function f() which takes an integer parameter named x, and somewhere applies bin() to this parameters. Right now, if you call f(1.0) instead of f(1), you will get a TypeError, which

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > I think you are mistaken. Python always distinguished between floats > and integers Sorry, my bad. > For example, if > bin is used inside f() only to produce some log output, but > otherwise f() works on any nu

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > I read the proposal as > producing the true mathematical radix 2 representation of a float > rather than its 64-bit memory layout. The term "layout" was probably badly chosen. Still, the explicit moti

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > What would you say to adding float-capable bin/oct/hex (+ maybe tobase) > to the math module? Why not indeed. However, as I said, if the intent is float-specific (and it is, unless there is another inexact numeric type whic

[issue3008] Let bin() show floats

2008-05-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Better to just build-out bin() and be done with it. Ok, someone has to take a decision anyway. However, if you do that, it should be probably decided first what happens for hex() and oct(). Do they still disallow floats

[issue3021] Lexical exception handlers

2008-06-01 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This patch implements the proposal outlined on the py3k mailing-list here: http://mail.python.org/pipermail/python-3000/2008-May/013740.html It solves both #2507 and #2833, and even improves re-raising semantics in several cases (s

[issue2507] Exception state lives too long in 3.0

2008-06-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: A clean solution is now proposed in #3021. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2833] __exit__ silences the active exception

2008-06-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: A clean solution to both #2507 and #2833 is now proposed in #3021. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Shall the method be called isprintable() or simply printable()? For the record, in the io classes, the writable()/readable() convention was chosen. -- nosy: +pitrou ___ Python tracker &

[issue3001] RLock's are SLOW

2008-06-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You should investigate and try to diagnose where the speed difference comes from. ISTM the RLock class is implemented in Python while the Lock class is simply an alias to the builtin native lock type, which could explain most

[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You are right, I had forgotton about lower()/islower(). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: test_shutil fails with the following error under some AIX 5.3 machine: == FAIL: test_on_error (__main__.Test

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a working patch. I've also added a try/finally block, because otherwise the following tests in regrtest.py couldn't run properly (@test was unremovable because of wrong permissions). -- keywords: +patch

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Apparently it dates back to this commit: http://hg.pitrou.net/public/cpython/trunk/rev/56254b99fb78 Perhaps someone should ask the original author. But indeed I'm not sure why it's testing such implementation details. The

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: With or without my patch, bare "raise" inside a "finally" statement raises a "RuntimeError: no active exception to re-raise". (except, of course, when the try/finally is itself enclosed in an except bloc

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: (an unexpected side effect of my patch is that the interpreter has become 5-10% faster under Linux, witnessed with pystone and pybench. I don't know the explanation) ___ Python tracker <[E

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Ok, it makes sense to have the same behaviour for except and finally blocks then. As for the syntax error, I'm still not convinced. The point of Py3k is to change semantics: people should expect some incompatible changes. Also t

[issue3021] Lexical exception handlers

2008-06-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a newer patch that also adapts the behaviour of finally blocks as suggested by Adam Olsen. Note that I had to change some things in the way 'with' statements are compiled and executed. Added file: http://bugs.pyth

[issue2523] binary buffered reading is quadratic

2008-06-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I recommend not letting this issue rot too much :) Eating 20+ seconds to read the contents of a 10MB binary file in one pass is not very good marketing-wise, and the betas are coming soon... ___

[issue2523] binary buffered reading is quadratic

2008-06-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Thanks for the fixes. By the way, I don't know much about non-blocking streams, but it seems to me that "optimal" non-blocking read() would require that the chunks we ask to the OS are block-aligned, which is not the cas

[issue2523] binary buffered reading is quadratic

2008-06-10 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Yup. However, if you try it, you'll probably notice that it decreases performance of normal (blocking) reads as well :-) Anyway, non-blocking file objects are pretty much second-class citizens in Py3k right now, so my remark was

[issue1819] Speed hack for function calls with named parameters

2008-06-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a new patch against SVN trunk. Nothing changed, except that I updated pybench to test keyword arguments as well. Added file: http://bugs.python.org/file10590/namedparam2.patch ___ Python t

[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This is an implementation of the Py_SETREF and Py_XSETREF macros proposed in http://mail.python.org/pipermail/python-dev/2008-May/079862.html As an example, I added a few conversions among the extension modules. -- comp

[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: FWIW, I also wanted to propose for Py_INCREF(op) to evaluate as (op), so that it can be used as return or assignment value, e.g.: return Py_INCREF(result); or: self->var = Py_INCREF(obj); but it's perhaps a bit more

[issue3081] Py_(X)SETREF macros

2008-06-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Benjamin, the patch is against py3k, also it might also apply cleanly on trunk... ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1819] Speed hack for function calls with named parameters

2008-06-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: And here is a patch adding a new test in pybench as suggested by Marc-Andre Lemburg. Added file: http://bugs.python.org/file10600/pybench.patch ___ Python tracker <[EMAIL PROTECTE

[issue3092] Wrong unicode size detection in pybench

2008-06-12 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: In py3k, pybench wrongly detects UCS2 builds as UCS4. Patch attached. -- components: Demos and Tools files: pybench_ucs.patch keywords: patch messages: 68076 nosy: pitrou severity: normal status: open title: Wrong unicod

[issue3092] Wrong unicode size detection in pybench

2008-06-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 12 juin 2008 à 20:26 +, Marc-Andre Lemburg a écrit : > Doesn't chr(10) raise an exception in UCS2 builds ? No, it returns a 2-character string. > Note that sys.maxunicode is not available in Python 2.1

[issue3092] Wrong unicode size detection in pybench

2008-06-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Which hopefully is the proper surrogate sequence :) Well at least that's what the doc string says! ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3104] overzealous garbage collector (dict)

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Are you sure the keys for those list objects aren't just equal to others you insert in the dict? Witness: >>> d = {} >>> d[1] = 'a' >>> d {1: 'a'} >>> d[1.0] = 'b'

[issue3079] sys.exit() called from optparse - bad, bad, bad

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The current behaviour is useful in that most of time, it is convenient to let OptionParser display a standard error message and bail out. However, having an attribute on the OptionParser object (e.g. exit_on_errors) to be able to chang

[issue1407] [performance] Too many closed() checkings

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Is this issue still valid? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1542308] Nested finally in generators don't follow PEP 342

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Is it useful to keep this bug open? Does it correspond to a real-world use case? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue3098] sys.sizeof test fails with wide unicode

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Do you really need to expose Py_UNICODE_SIZE? There is already sys.maxunicode, unless I'm missing something. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue3106] speedup some comparisons

2008-06-13 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This patch is an experiment in making faster some of the most common comparisons (str vs. str, int vs. int). I don't know if it may bring noticeable speedups in real-world situations, but here are the synthetic benchmark nu

[issue3098] sys.sizeof test fails with wide unicode

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hmm, so it seems that in some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4 if the native int type is itself larger than 32 bits; although the latter is probably quite rare (64-bit platforms are usually either LP64 or

[issue3098] sys.sizeof test fails with wide unicode

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 13 juin 2008 à 20:18 +, Marc-Andre Lemburg a écrit : > AFAIK, only Crays have this problem, but apart from that: I'd consider > it a bug if sizeof(Py_UCS4) != 4. Perhaps a #error can be added to that effec

[issue3108] Implicit exception chaining (PEP 3134)

2008-06-13 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This patch implements implicit except chaining (__context__) as per PEP 3134, or not quite. The difference is that PyErr_Set* functions do set the __context__ attribute, otherwise I think it would make an annoying discrepancy b

[issue2632] performance problem in socket._fileobject.read

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: If it's fixed in 2.6 and 3.0, it shouldn't be release blocker anymore, now should it? ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3108] Implicit exception chaining (PEP 3134)

2008-06-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Guido, thanks for your comments. Here is a new patch addressing them. Added file: http://bugs.python.org/file10627/context2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3109] test_multiprocessing seems fragile

2008-06-13 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: I had the following intermittent failure under py3k: [...] test_multiprocessing Process Process-24: Traceback (most recent call last): File "/home/antoine/py3k/context/Lib/multiprocessing/process.py", line 237, in _bootst

[issue3104] overzealous garbage collector (dict)

2008-06-14 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > The original text file was an IRC log. Shoving Charles Dickens' "Great > Expectations" 17 times in a text file and then parsing it doesn't show > this problem for some weird reason. I'd say the

[issue2650] re.escape should not escape underscore

2008-06-14 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Talking about performance, why use a loop to escape special characters when you could use a regular expression to escape them all at once? -- nosy: +pitrou ___ Python tracker <[EMAIL

[issue3112] implement PEP 3134 exception reporting

2008-06-14 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3112> ___ ___ Python

[issue3113] Document exception chaining

2008-06-14 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3113> ___ ___ Python

<    34   35   36   37   38   39   40   41   42   43   >