[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-23 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou priority: -> normal ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue874900] threading module can deadlock after fork

2008-07-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Greg, I'm not sure your improvement patch is right, since some code may be holding a reference to the former _MainThread instance and expecting it to still be part of the active threads container. On the other hand there are th

[issue2834] re.IGNORECASE not Unicode-ready

2008-07-24 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- assignee: -> pitrou priority: -> critical ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue2832] Line numbers reported by extract_stack are offset by the #-*- encoding line

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

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

2008-07-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The same bug is being discussed in #3348 -- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> Cannot start wsgiref simple server in Py3k ___ Python

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-24 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +delimy ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3348> ___ ___ Python

[issue3139] bytearrays are not thread safe

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I haven't yet studied the patch in detail but I have a few questions: (1) are you sure it is safe not to INCREF the obj pointer in the Py_buffer? in the cases handled by your patch we still hold a reference to the original arg

[issue3139] bytearrays are not thread safe

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Travis, it would be really nice to have your input on this. -- nosy: +teoliphant ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3394] zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Agree with using 0600 as default permissions. -- nosy: +pitrou priority: -> high ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hirokazu, does replacing the following line (rather than changing the type of the `ch` variable): ch = *s; with ch = (unsigned char) *s; fix the crash as well? -- keywords: +patch nosy: +

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon Hirokazu Yamamoto <[EMAIL PROTECTED]>: > > With this patch? Yes, it fixed crash. Thanks! > # But I don't know whether this behavior is right or not As the name implies, utf7 is a 7-bit coding of Uni

[issue1734234] Fast path for unicodedata.normalize()

2008-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1734234> ___ __

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This patch also has a test in it. Added file: http://bugs.python.org/file10979/2242.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Should be fixed in r65227. Please reopen if there's still a problem. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: On second thought, perhaps it should also be backported to 2.5, so I'm leaving the bug open. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- resolution: -> accepted versions: -Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I've committed the fix for 2.5 in r65234, can somebody try it out with the failing MSVC version? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3394] zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Committed in r65235. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue1864] test_locale doesn't use unittest

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Done in r65237. Hopefully it won't break in weird ways on some platforms... -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The first 2 parts have been committed in r65237. I'll soon provide a patch for the third part. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is the patch for the third part. Added file: http://bugs.python.org/file10984/thousands_sep.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10128/bug1222.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10041/1222.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2242] Decoding UTF-7 with "ignore warnings" crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Thanks Amaury! -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue1819] Speed hack for function calls with named parameters

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Committed in r65240 (new pybench test) and r65241 (speedup patch). -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3356] some tests fail with Py_DEBUG (test_distutils, test_set)

2008-07-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hmm, ok. I was using `make EXTRA_CFLAGS="-DPy_DEBUG"`, but it wouldn't undefine NDEBUG so the assert() macro wouldn't be enabled. By using `make EXTRA_CFLAGS="-DPy_DEBUG -UNDEBUG"` instead it's fine.

[issue3356] some tests fail with Py_DEBUG (test_distutils, test_set)

2008-07-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Py_REFCNT simply drops their refcount field to -1 without bothering. I meant Py_DECREF. -- components: +Tests type: behavior -> crash ___ Python tracker <[EMAIL PR

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-07-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Another possibility would be for methods to also get the __name__ and __module__ attributes. I don't see any counter-indication to it. -- nosy: +pitrou ___ Python tracker <[EMAIL PRO

[issue2834] re.IGNORECASE not Unicode-ready

2008-07-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Final patch adding the (?a) inline flag (equivalent to re.ASCII). Please review: http://codereview.appspot.com/2439 Added file: http://bugs.python.org/file10998/reunicode5.patch ___ Python tracker &

[issue3459] optimize bytes.join()

2008-07-28 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: When the separator is empty and the sequence only contains one non-empty item, it is possible to optimize b"".join([...]) by simply returning the non-empty item. Since b"".join() is the recommended idiom to join

[issue3460] PyUnicode_Join could perhaps be simpler

2008-07-28 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: In py3k, PyUnicode_Join inherits some complexity from the 2.x days. However, it seems some of the precautions taken there may not be needed anymore. Witness the following comment: /* G. A codec may be invoked to conve

[issue2523] binary buffered reading is quadratic

2008-07-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Following our discussion and Guido's answer on python-3000 (*), I committed a modified fix in r65264. (*) http://mail.python.org/pipermail/python-3000/2008-July/014466.html -- resolution: -> fixed status:

[issue2834] re.IGNORECASE not Unicode-ready

2008-07-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le lundi 28 juillet 2008 à 20:41 +, Amaury Forgeot d'Arc a écrit : > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > > Are all those re.ASCII flags mandatory, or are they here just for

[issue3460] PyUnicode_Join could perhaps be simpler

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well the potentially dangerous function would have been PyUnicode_FromObject, but in py3k it only accepts unicode instances (either exact or subclasses), and since we are only interested in the underlying buffer we can replace those

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: My wild uneducated guess is that it's due to a nan-like value being in the globals, and comparing unequal to itself: >>> d = {1: float('nan')} >>> d {1: nan} >>> d == d False >>> i

[issue3460] PyUnicode_Join could perhaps be simpler

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a patch. On my measurements it makes str.join() 30% to 50% faster on non-trivial input. -- keywords: +patch Added file: http://bugs.python.org/file11004/strjoin3k.patch ___ Python t

[issue3459] optimize bytes.join()

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Raymond, Martin, any opinion on this? -- nosy: +loewis, rhettinger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2538] memoryview of bytes is not readonly

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The patch should probably come with a test :) -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think the cleanup should either be in regrtest.py as Amaury proposes, or in doctest itself. There's nothing wrong in decimal and its test suite. ___ Python tracker <[EMAIL PRO

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The doctest patch looks fine to me. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3462> ___

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well except that it would be better spelt as: __builtins__._ = None ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: > > You know what? It's a mess. > - from the __main__ module, __builtins__ is a module. > - in all other modules, __builtins__ is a dict. (why is it so? :-O)

[issue3462] test_builtin fails after test_decimal

2008-07-29 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Ok, I've found it: « But why is __builtins__ a module in __main__ and a dict elsewhere? Because in *interactive* mode, printing vars() would include __builtins__, which would be rather large. Code that incorrectly assumes it'

[issue2491] io.open() handles errors differently on different platforms

2008-07-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think the proposal to deprecate os.fdopen should be brought on python-3000. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3139] bytearrays are not thread safe

2008-07-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The problem is that the fix for #3295 was committed in the py3k branch (in r64751) rather thank on the trunk! Once PyExc_BufferError is defined properly the crash disappears and exceptions are printed i

[issue3139] bytearrays are not thread safe

2008-07-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le mercredi 30 juillet 2008 à 23:03 +, Amaury Forgeot d'Arc a écrit : > Again, I think this is unfortunate for a simple script that prints from > several threads. Yes, but it's an issue with the BufferedWriter im

[issue3295] PyExc_BufferError is declared but nowhere defined

2008-07-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: About r65312, BufferError inherits from StandardError, not directly from Exception :) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3139] bytearrays are not thread safe

2008-07-30 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 31 juillet 2008 à 00:00 +, Amaury Forgeot d'Arc a écrit : > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > > > If it was rewritten to use a fixed-size bytearray > does such

[issue2965] Update interface of weakref dictionaries

2008-07-31 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Is it ok that the keys/values/items return iterators rather than views? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2965] Update interface of weakref dictionaries

2008-07-31 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: By the way, code like: items1 = list(dict.items()) items1.sort() could be simplified into: items1 = sorted(dict.items()) (same for reversed() instead of list.r

[issue3476] BufferedWriter not thread-safe

2008-07-31 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: As discovered in #3139, io.BufferedWriter mutates the size of its internal bytearray object. Consequently, invocations of write() from multiple threads can produce exceptions when one thread gets a buffer to the bytearray while the

[issue3139] bytearrays are not thread safe

2008-07-31 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Martin, sorry for noticing this now but on python-dev you had proposed the following: « I propose that new codes s*, t*, w* are added, and that s#,t#,w# refuses objects which implement a releasebuffer procedure (alternatively, s# etc

[issue3476] BufferedWriter not thread-safe

2008-07-31 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a sample implementation (using a fixed-size bytearray) with test. Amaury, would you like to take a look? I'm a bit puzzled by the shady BufferedRandom semantics: though the tests do pass, it's hard to say why e.g. Buf

[issue3476] BufferedWriter not thread-safe

2008-07-31 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon Benjamin Peterson <[EMAIL PROTECTED]>: > > Benjamin Peterson <[EMAIL PROTECTED]> added the comment: > > It seems that as with the quadratic binary buffered reading, the best > solution is the list of

[issue2260] conditional jump to a POP_TOP optimization

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: While this patch is interesting, I think it would be more efficient to introduce variants of JUMP_IF_FALSE and JUMP_IF_TRUE which pop their argument rather than leaving it on the stack (like I did in #2459). -- nosy: +

[issue2860] re module fails to handle byte strings

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This is a duplicate of #3231 and was fixed in r65185. -- nosy: +pitrou resolution: -> duplicate status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3139] bytearrays are not thread safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon "Martin v. Löwis" <[EMAIL PROTECTED]>: > > Amaury, I think the issue of thread-safety of the io library should be > decoupled from this issue. I don't think it is release-critical that the > io li

[issue3139] bytearrays are not thread safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon "Martin v. Löwis" <[EMAIL PROTECTED]>: > > As for making Py_buffer own a reference to the object: what should be > the semantics for PyObject_ReleaseBuffer? I see the following options: > - Drop

[issue3476] BufferedWriter not thread-safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hi, Selon "Martin v. Löwis" <[EMAIL PROTECTED]>: > > I don't think the proposed patch (file11012) makes it thread-safe, and I > believe you cannot get it thread-safe without using thread synchronization.

[issue3486] bytes.join does not accept a sequence of bytearrays

2008-08-01 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This works in py3k but not in 2.x. I don't know if it is deliberate: Python 3.0b2+ (py3k, Jul 27 2008, 12:52:40) [GCC 4.3.1 20080626 (prerelease)] on linux2 Type "help", "copyright", "credits"

[issue3489] add rotate{left,right} methods to bytearray

2008-08-01 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: While tweaking the BufferedWriter implementation it came to me that it would be useful to have rotate_left and rotate_right methods on bytearray, so as to rotate the array by a number of bytes without any wasteful memory allocatio

[issue3139] bytearrays are not thread safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 01 août 2008 à 17:53 +, Amaury Forgeot d'Arc a écrit : > There is a small issue with the patch: in the "w#" format handler, > bf_getwritebuffer(arg, 0, res) is wrong. The third argument should be >

[issue3139] bytearrays are not thread safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I'm attaching a patch for getargs.c and another patch for the codecs module. Added file: http://bugs.python.org/file11032/codecs.patch Added file: http://bugs.python.org/file11033/getargs.patch ___

[issue3476] BufferedWriter not thread-safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Attaching a new patch with better performance characteristics than my previous one, and the non-blocking test rewritten in a sane way. Some timeit runs: -s "import io; f=io.open('/dev/null', 'wb'); s=b'a

[issue3476] BufferedWriter not thread-safe

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 01 août 2008 à 21:51 +, Martin v. Löwis a écrit : > With the status quo, people have at least a chance of learning that the > library is not thread-safe. If the shallow problems are resolved, people > will cry F

[issue3459] optimize bytes.join()

2008-08-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: bl = [b'', b'a'] gives a 20% speedup: before patch: 100 loops, best of 3: 0.443 usec per loop after patch: 100 loops, best of 3: 0.349 usec per loop (20% speedup) bl = [b'a']*2 gives a 2% slowdown

[issue3228] mailbox.mbox creates files with execute bit set

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: It would be nice if the patch came with a test. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You've missed the preceding line that says: +consumed = pbuf.len; If final is NULL, consumed isn't updated by the call to PyUnicode_DecodeMBCSStateful and keeps its original value of pbuf.len. (in all honesty, I d

[issue3459] optimize bytes.join()

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well as I said it occurred to me when doing some measurements of BufferedReader performance, but I agree that the gain may not justify the complexity. If nobody objects, feel free to close the

[issue2538] memoryview of bytes is not readonly

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r65420, with a test. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a new patch wrapping up Martin's patch with the following additions: - getargs.c fixes - codecs module fixes - multiprocessing module fix - fileobject readinto fix - in bytearray deallocator, print out a SystemError i

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11032/codecs.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3139] bytearrays are not thread safe

2008-08-02 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11033/getargs.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3488] Provide compress/uncompress functions on the gzip module

2008-08-02 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think the functionality is useful, although it may be too late to make it into 2.6/3.0. Some comments: - the functions should have docstrings - there should be unit tests - style nit: named parameters in function calls (and default

[issue3496] distutils fails with mingw binutils 2.18.50.20080109

2008-08-03 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- priority: -> critical versions: +Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3487] sre "bytecode" verifier

2008-08-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Shouldn't there be any unit tests? :) -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-08-04 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- priority: -> critical versions: +Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2396] Backport memoryview object to Python 2.6

2008-08-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Not only there may not be enough time, but: 1. the memoryview implementation itself is not finished (that is, in py3k) 2. polishing and documenting the buffer API is more important 3. there doesn't seem to be any use for memoryv

[issue3500] unbound methods of different classes compare equal

2008-08-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well, I'm not sure. One could also argue that 1 and 1.0 mustn't compare equal because they cannot be used equally in all circumstances (e.g. __index__), they have different repr's, different types, etc. The question is:

[issue3500] unbound methods of different classes compare equal

2008-08-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > The reason I noticed this is that since they compare and hash equal, if > you put two such methods into a set, you end up with a set with one > method. Currently, this is preventing me from running two test methods >

[issue3500] unbound methods of different classes compare equal

2008-08-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Apparently Roundup snipped my numbers example :-) Here it is, hoping it will pass through this time : >>> d = {} >>> d[1] = 'a' >>> d[1.0] = 'b' >>> d[1] 'b'

[issue3500] unbound methods of different classes compare equal

2008-08-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hi, > It's the same function attached to two different classes. I don't > really buy the "implementation detail" argument - if Guido says it, > then I don't have much choice but to accept it, but I

[issue2396] Backport memoryview object to Python 2.6

2008-08-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Not a release blocker then :-) -- priority: release blocker -> critical ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3506] Change buffer/memoryview DeprecationWarning

2008-08-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The memoryview implementation is still unfinished (in py3k), so I suggest we drop the warning or comment it out. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue1685] linecache .updatecache fails on utf8 encoded files

2008-08-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: After a look at the patch and at linecache.py, some comments: - 'rbU' is strange, the 'U' flag has no effect for binary files, so it should just be 'rb' instead - I'm surprised we don't have a

[issue2834] re.IGNORECASE not Unicode-ready

2008-08-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: If nobody (except Amaury :-)) has anything to say about the current patch, should it be committed? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Bill, I haven't studied your patch in detail but a few comments: - it would be nice to have more unit tests, especially for the various bytes/unicode possibilities, and perhaps also roundtripping (Matt's patch ha

[issue3506] Change buffer/memoryview DeprecationWarning

2008-08-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I'm no buffer API/memoryview expert, but at least slicing is not implemented, and there are almost no unit tests. It can probably be used, but given the absence of tests and of actual uses in the stdlib, I'm not sure we can

[issue3511] Incorrect charset range handling with ignore case flag?

2008-08-06 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou priority: -> normal versions: +Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue1288615] Python code.interact() and UTF-8 locale

2008-08-07 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- keywords: +patch nosy: +pitrou type: -> behavior versions: -Python 2.3, Python 2.4, Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3515] refcount gc bug?

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You don't need to raise another exception, calling sys.exc_clear() should be fine. But a cleaner way to write your example is: def foo(): with open("a.txt", "w") as io: raise RuntimeError() &quo

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 07 août 2008 à 13:42 +, Matt Giuca a écrit : > The reasoning is this: if we allow non-ASCII characters to be escaped, > then we allow quote to generate invalid URIs (URIs are only allowed to > have ASCII charac

[issue1288615] Python code.interact() and UTF-8 locale

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r65578. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue1288615] Python code.interact() and UTF-8 locale

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 07 août 2008 à 18:52 +, Karen Tracey a écrit : > Karen Tracey <[EMAIL PROTECTED]> added the comment: > > Cool, thanks! Do I take it from the Versions setting that the fix will > be available in the n

[issue3506] Change buffer/memoryview DeprecationWarning

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le mercredi 06 août 2008 à 20:12 +, Guido van Rossum a écrit : > +1. buffer() stinks. memoryview() rules. They don't hvae the same use > cases. > > Is there truly nobody else who understands PEP 3118 well enough

[issue3460] PyUnicode_Join could perhaps be simpler

2008-08-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I've committed the patch in r65583. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > This would mean raising an exception in Listener.__init__ if this > invariant is violated. If I understand the suggestion correctly, it would forbid people to listen on 0.0.0.0. I'm not sure it is the right correctio

[issue1117601] os.path.exists returns false negatives in MAC environments.

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The only sane alternative to the current behaviour would be to raise an Exception from os.path.exists rather than returning False. But it would also break a lot of code, and complexify code using os.path.exists which currently doesn

[issue941346] AIX shared library fix

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Sébastien, what does your patch change exactly? Does it build a shared lib for Python by default? If that's the case, I'm not sure it's a good idea due to AIX's particular way of treating shared libraries; it might

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon Jesse Noller <[EMAIL PROTECTED]>: > > Unfortunately, the patch while simple, is too simple. The removal of the > _address attribute breaks a lot more than it fixes (it's heavily used > elsewhere) I don&#x

<    36   37   38   39   40   41   42   43   44   45   >