[issue3160] Building a Win32 binary installer crashes

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

[issue3782] os.write accepts unicode strings

2008-09-04 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: I'm a bit puzzled that both str and bytes are accepted by os.write() in py3k: >>> os.write(1, "foo\n") foo 4 >>> os.write(1, b"foo\n") foo 4 -- components: Interpreter Core mes

[issue874900] threading module can deadlock after fork

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Ok, with this patch the test passes under py3k. Apart from the trivial typo (_Thread__stopped -> _stopped), I had to change print("...") to os.write(1, b"...\n") in the tests as otherwise subprocess wouldn't

[issue874900] threading module can deadlock after fork

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Benjamin, if you don't change the test, the deadlock problem is still solved, it's just that the third test fails because the subprocess stdout is empty instead of containing the desired value. It is *not* because the subproce

[issue874900] threading module can deadlock after fork

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Instead of os.write(), it is actually sufficient to sys.stdout.flush() at the end of the subprocess. Patch attached. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue874900] threading module can deadlock after fork

2008-09-04 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11379/forkthread2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Why wouldn't w.message simply be None? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3660] reference leaks in 3.0

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The patch for _pickle has been committed in r66227. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3660] reference leaks in 3.0

2008-09-04 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Numbers for the current py3k branch (without encode-leak2.patch): test_distutils leaked [141, 142] references, sum=283 test_docxmlrpc leaked [-7, -85] references, sum=-92 test_logging leaked [0, 219] references, sum=219 test_poplib lea

[issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: As for the multiprocessing problem, it has been fixed recently on trunk. Can you give it a try? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3660] reference leaks in 3.0

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: FWIW, applying encode-leak2.patch removes the leak in test_unicode. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3784] Incorrect compiler options used for cc of Sun Studio 12

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Is it really a compile error or just a warning? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3783] dbm.sqlite proof of concept

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: It would be more efficient to base keys() on iterkeys() than the reverse, IMO. Other than that, why not open a branch or at least upload full-fledged patch files? :) -- nosy: +pitrou ___

[issue1757072] Zipfile robustness

2008-09-05 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3535] zipfile has problem reading zip files over 2GB

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Alan, do you have an opinion on this? -- nosy: +alanmcintyre versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue874900] threading module can deadlock after fork

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Just checked that the latest patch works on Windows as well. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue3660] reference leaks in 3.0

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 05 septembre 2008 à 13:08 +, Amaury Forgeot d'Arc a écrit : > Antoine, it seem that with encode-leak2.patch, the error path after > PyErr_WarnEx() leaks the value of "v". Hmm, you are right. >

[issue3660] reference leaks in 3.0

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Amaury, your patch is much clearer indeed and it fixes the leak. -- keywords: -needs review ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3535] zipfile has problem reading zip files over 2GB

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Alan, do you have commit access? Otherwise the patch needs approval from another core developer. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3660] reference leaks in 3.0

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Current status: test_distutils leaked [141, 142] references, sum=283 test_logging leaked [0, -219] references, sum=-219 test_smtplib leaked [0, 87] references, sum=87 The distutils leak should be investigated, but the overall situat

[issue3535] zipfile has problem reading zip files over 2GB

2008-09-05 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3535> ___ _

[issue3601] test_unicode.test_raiseMemError fails in UCS4

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r66235, r66236. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3660] reference leaks in test_distutils

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > test_distutils will be difficult; the leak is around the "import xx" in > Lib/distutils/tests/test_build_ext.py. > > And Python/import.c says: > /* To prevent initializing an extension module more than once

[issue3660] reference leaks in test_distutils

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > It's not only the name, but a copy of the whole module dict just after > import (that's why reload(sys) takes you back the > sys.setdefaultencoding() function). Ow. > Actually I found a (hackish) way to cle

[issue3535] zipfile has problem reading zip files over 2GB

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r66240, r66241. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3790] in zlib decompressor objects, unused_data and unconsumed_tail must be immutable

2008-09-05 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: Currently (in py3k), the attributes "unused_data" and "unconsumed_tail" on zlib decompressor objects are bytearrays. This can wreak havoc in the read() method of ZipInfo objects, because one of those bytearrays i

[issue3492] Zlib compress/decompress functions returning bytearray

2008-09-05 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: We must definitely clean up other uses of bytearray in the extension modules - see #3790 for an example. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: What do you mean, "overriden"? The behaviour looks totally normal to me. You change the value of "p" before the subprocess is started, so the subprocess inherits the new value, not the old one.

[issue3705] py3k fails under Windows if "-c" or "-m" is given a non-ascii value

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Committed in r66269. -- priority: deferred blocker -> high title: py3k aborts if "-c" or "-m" is given a non-ascii value -> py3k fails under Windows if "-c" or "-m"

[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I agree this would be a worthwhile addition too. Unfortunately given the current schedule this will probably have to wait for 2.7/3.1. -- nosy: +pitrou versions: +Python 2.7, Python 3.1 -Pyth

[issue3797] mmap, dbm, ossaudiodev, marshal & winreg return bytearray instead of bytes

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Tests pass here as well, under Windows and Linux. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3797] mmap, dbm, ossaudiodev, marshal & winreg return bytearray instead of bytes

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: As for ossaudiodev: -PyByteArray_Resize(rv, count); +_PyBytes_Resize(rv, count); I think this should be _PyBytes_Resize(&rv, count) instead. ___ Python tracker <[EMAIL PROT

[issue3797] mmap, dbm, ossaudiodev, marshal & winreg return bytearray instead of bytes

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Amaury beat me to the punch :-o ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3797> ___ _

[issue3795] wsgiref.simple_server fails to run demo_app

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This seems to be a duplicate of #3348. -- nosy: +pitrou resolution: -> duplicate status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3348] Cannot start wsgiref simple server in Py3k

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Also reported in #3795. PJE, are you willing to work on this some day? -- nosy: +Walling ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue874900] threading module can deadlock after fork

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le samedi 06 septembre 2008 à 22:27 +, Gregory P. Smith a écrit : > Gregory P. Smith <[EMAIL PROTECTED]> added the comment: > > forkthread2.patch looks good to me. to be consistent shouldn't we also > app

[issue3705] py3k fails under Windows if "-c" or "-m" is given a non-ascii value

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Looks good and works under Linux. One small nit, you could just as well use "NN(ssi)" for the Py_BuildValue and remove Py_DECREF(fob), so as to be more consistent. ___ Python tracker &

[issue874900] threading module can deadlock after fork

2008-09-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Committed in r66274, r66275. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue3634] invalid result value of _weakref.__init__()

2008-09-08 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Adding a simple unit test would be nice. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3814] Add VCS support

2008-09-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This isn't the right place to post setuptools patches, as setuptools is not part of the standard Python distribution. There is a setuptools bug tracker at http://bugs.python.org/setuptools/ You can probably also use the distutils-

[issue1297193] Search is to long with regex like ^(.+|dontmatch)*$

2008-09-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fair enough :) -- nosy: +pitrou resolution: -> wont fix status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hi, This looks impressive. You should really work from the current SVN trunk, not from the 2.5 sources, as there were some additions to the re module (mainly, a bytecode verifier contributed by Google). Also, if it can be split into s

[issue3827] memoryview.size is redundant

2008-09-09 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +teoliphant ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3827> ___ __

[issue3827] memoryview.size is redundant

2008-09-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The patch is ok to me. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3783] dbm.sqlite proof of concept

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 11 septembre 2008 à 12:46 +, Skip Montanaro a écrit : > Gerhard> What's all this ORDER BY in both your implementations about? > Gerhard> The dbm "spec" says nothing about keys being ordered

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > My code regularily calculates the sha1 sum of 10.000 files and because > in another reuse of the code had to deal with files too big to fit in > memory I set a limit of 256Mb. Why don't you use a sensible buffer siz

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Andrew, as for memory reallocation issues, you may take a look at #3526 where someone has similar problems on SunOS. If nobody objects, I will close the present bug as invalid. ___ Python tracker &

[issue3640] test_cpickle crash on AMD64 Windows build

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: By the way, this isn't caused by the present issue, but you'll notice that in the latest trunk, some tests in find_recursion_limit.py fail with an AttributeError instead of RuntimeError. This is likely caused by a PyDic

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 11 septembre 2008 à 16:01 +0200, Anthon van der Neut a écrit : > The thing however was resolved by reading multiple smaller chunks indeed > 1Mb if the filesize exceeds 1Mb (in the latter case the original read() > is

[issue3783] dbm.sqlite proof of concept

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 11 septembre 2008 à 13:48 +, Skip Montanaro a écrit : > Actually, I think Python guarantees (for dicts at least - other mappings > should probably follow suit) that if you call keys() then call values() > wit

[issue3103] sqlite defines a few global symbols.

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: If they aren't part of a public API I think it's ok to fix them in 2.6/3.0. It is a bug fix, not a feature change. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> &

[issue3783] dbm.sqlite proof of concept

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I might add that calling keys() then values() is suboptimal, because it will issue two SQL queries while calling items() will issue just one. ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Thorben, is the problem still there if you use fork() rather than launching a separate thread for the server? The implementation of the recv() method is straightforward and I don't see anything that could cause a huge latency

[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: You can use setsockopt() to set the TCP_NODELAY flag and see if that improves things; sending thousands of 4-bytes packets isn't exactly the expected utilization of TCP. As I said, socket.recv() is just a thin wrapper above the s

[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > now thats interesting: > adding the line "sock.setsockopt(SOL_TCP, TCP_NODELAY, 1) " decreased > the delay by half. It still is extremely high but it's a start. Did you do it on both the client and server so

[issue3783] dbm.sqlite proof of concept

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Well, sure, but heaven only knows what an application programmer will do... If the docs clearly explain that there is no guarantee, we don't need heaven. I would find it strange to potentially ruin performance just for a g

[issue3783] dbm.sqlite proof of concept

2008-09-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Benchmarks to prove or disprove performance changes? Agreed, benchmarks should be run. > Subclasses to > offer different order by semantics (see the version I uploaded for an > example)? If you like, but "

[issue3850] find_recursion_limit.py is broken

2008-09-12 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: find_recursion_limit.py in trunk is broken: it fails with an AttributeError while a RuntimeError is expected. This has appeared due to the recent changes in recursion limit handling, but the problem is deeper. As I explained on

[issue3640] test_cpickle crash on AMD64 Windows build

2008-09-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I've opened #3850 for the find_recursion_limit problem. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3850] find_recursion_limit.py is broken

2008-09-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a patch. -- keywords: +needs review, patch Added file: http://bugs.python.org/file11480/find_recursion_limit.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3850] find_recursion_limit.py is broken

2008-09-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: It's not my code, it's the interpreter's code which uses PyDict_GetItem() all over the place, and the aim of find_recursion_limit.py is precisely to test the function call paths i

[issue3657] pickle can pickle the wrong function

2008-09-12 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: But it still means pickling a function/method defined in a builtin extension module can give wrong results, doesn't it deserve being fixed? -- nosy: +pitrou ___ Python tracker <[E

[issue3657] pickle can pickle the wrong function

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > I expect this is why nobody has ever complained about it: unless you're > looking at the strings embedded in the pickle GLOBAL opcode, it's > unlikely to have a visible consequence. Well, it may have a conseq

[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Yes, obviously. Although adding it to the client socket did make no > difference after I had already done so for the server. Still > communication is too slow by orders of magnitude. (Sorry for pointing > this out aga

[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-13 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3858] make install tries to install files outside of --prefix

2008-09-13 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- components: +Installation priority: -> critical type: -> behavior versions: +Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3850] find_recursion_limit.py is broken

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > On my Macbook, it segfaults; perhaps that docstring applied only > to MacOS 9? Well, I just tried under Windows and the interpreter neither segfaults nor prints a MemoryError, it aborts silently. I guess the comment is either

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: By the way, the patch must be pretty incomplete, since there are almost no changes to _sre.c. Am I missing something? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: See also #3825. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2636> ___ ___ Python

[issue3850] find_recursion_limit.py is broken

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Bug fixed and module comments updated in r66457. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-09-13 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- resolution: -> rejected status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3858] make install tries to install files outside of --prefix

2008-09-13 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: OK, thanks for the report anyway :) -- nosy: +pitrou resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3782] os.write accepts unicode strings

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a patch. I've covered all direct uses of os.write() in the standard library, but perhaps there are indirect uses. Please review. -- keywords: +needs review, patch Added file: http://bugs.python.org/file11498/os

[issue3873] Unpickling is really slow

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Do the numbers vary if you read the whole file at once and then unpickle the resulting bytes string? Large parts of the IO library are written in Python in 3.0, which might explain the discrepancy. -- nosy: +

[issue3873] Unpickling is really slow

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Gregory had patches for a freelist of long objects in #2013. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3782] os.write accepts unicode strings

2008-09-15 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Thanks, committed in r66469. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The test would be better in test_memoryview rather than in test_builtin. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > I disagree. The test I added is really about compile, and its failure > was really just a side effect of the buffer bug. Well, I won't fight over it, but it's really meant to check an aspect of memoryview behaviour -

[issue3973] Invalid line number in Exception traceback with header # -*- coding: xxx -*-

2008-09-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Looks like a duplicate of #2384. Do you confirm? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3973] Invalid line number in Exception traceback with header # -*- coding: xxx -*-

2008-09-26 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- resolution: -> duplicate status: open -> closed superseder: -> [Py3k] line number is wrong after encoding declaration ___ Python tracker <[EMAIL PROTECTED]> <http://b

[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2384> ___ ___ Python

[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: #3973 is a duplicate. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3976] pprint._safe_repr is not general enough in one instance

2008-09-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Another solution would be to separate the dict items by key type, try to sort each items list with separate fallback on onsorted. Then merge the whole thing, ordered by key type name. -- nosy: +

[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: The rest of the patch is fine with me (I assume you've run all the unit tests :-)). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3978] ZipFileExt.read() can be incredibly slow

2008-09-27 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Very interesting, but it will have to wait for 2.7/3.1. 2.6 and 3.0 are in the final phases of the release process. -- nosy: +pitrou priority: -> normal versions: +Python 3.1 -P

[issue3988] Byte warning mode and b'' != ''

2008-09-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: +1 as well. Lib/pty.py had a line like that ("while buf != ''") and I wondered why no exception was thrown with -bb while the variable was a bytes object. -- nosy: +pitrou

[issue3974] collections.namedtuple uses exec to create new classes

2008-10-01 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Have you run benchmarks of both versions? It seems the benefit of the original version is that it's faster, thanks to hardcoding critical methods. -- nosy: +pitrou ___ Python trac

[issue3187] os.listdir can return byte strings

2008-10-03 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > You should also support bytearray() in ntpath: >isinstance(path, (bytes, bytearray)) The most generic way of allowing all bytes-alike objects is to write: path = bytes(path) It raises a TypeError if `path` can't e

[issue3187] os.listdir can return byte strings

2008-10-03 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 03 octobre 2008 à 11:43 +, STINNER Victor a écrit : > STINNER Victor <[EMAIL PROTECTED]> added the comment: > > > The most generic way of allowing all bytes-alike objects is to write: > >

[issue3448] Multi-process 2to3

2008-10-03 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think it's reasonable to only enable multiprocessing if the adequate command-line option has been set. It's how `make` already works (next time you compile Python, try `make -jN` where N is your number of CPU cores).

[issue4040] ignored exceptions in generators (regression?)

2008-10-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This is not specific to generators, this is due to the fact that a lot of recursion checks have been added all over the place. When an internal function designed to ignore exceptions (for example PyErr_GivenExceptionMatches()) encounter

[issue4074] Building a list of tuples has non-linear performance

2008-10-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Someone should try implementing Martin's suggestion one day :) -- nosy: +pitrou versions: +Python 3.1 -Python 2.5, Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue4093] add gc/memory management tests to pybench

2008-10-09 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: Issue #4074 suggests to me that maybe pybench should have some gc and/or memory management tests. Marc-Andre, what do you think? -- components: Demos and Tools messages: 74599 nosy: lemburg, pitrou priority: normal severity:

[issue4093] add gc/memory management tests to pybench

2008-10-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Note that pybench disables GC per default for exactly the reasons > causing #4074 :-) I know, I was thinking to enable the GC only in the GC-specific test of course. The idea is to have a test stressing the GC heavily, such as

[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: When the following snippet is taken: if (_PyString_Resize(&rv, (bin_data - (unsigned char *)PyString_AS_STRING(rv))) < 0) { PyBuffer_Release(&pascii); P

[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: The a2b_hqx() patch was committed in r77528 (trunk) and r77529 (py3k). Thanks again! -- ___ Python tracker <http://bugs.python.org/issue7

[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15910/issue7703_binascii_a2b_hqx_v3.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7661] compiling ctypes fails with non-ascii path

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've merged the ctypes fix to 2.6. As for 3.1, it doesn't seem to need the fix. -- ___ Python tracker <http://bugs.python.

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch was committed in r77543 (py3k), thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be better to test with some of the real world examples given in this issue: str.split, and a functools.partial object. -- ___ Python tracker <http://bugs.python.org/issue3

<    40   41   42   43   44   45   46   47   48   49   >