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

2008-08-27 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- priority: -> release blocker ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3611] invalid exception context

2008-08-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Some progress: The lines suppressed by the patch at http://bugs.python.org/msg71579 either do nothing (because e.g exc_type is already NULL or None), or happen to be in a case similar to the script "lostcontext2.py&qu

[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > Another small remark; #ifdef is better then #ifndef > Simply because it easier to get "Be positive" than "Don't be negative". Yes; but here, the symbol (HAVE_BROKEN_MBSTOWC) has a negat

[issue3660] reference leaks in 3.0

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: - the "test_site leaked [88, 88]" is the same as problem as issue3667. - test_unicodes leaks in PyUnicode_AsEncodedString (attached patch), and also with: str(memoryview(b'character buffers are decoded to u

[issue3712] memoryview leaks references

2008-08-28 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Two problems with memoryview: - The buffer interface of memoryview leaks a reference: str(memoryview(b'text'), 'utf-8') - memoryview does not implement tp_traverse and tp_clear, so reference cyc

[issue3660] reference leaks in 3.0

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: issue3712 tracks the memoryview issues. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3660] reference leaks in 3.0

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: the leaks in test_pickle and test_pickletools are corrected by the attached patch. Added file: http://bugs.python.org/file11288/pickle-leak.patch ___ Python tracker <[EMAIL PRO

[issue3667] Reloading an extension module always leaks

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The fix is actually simple: _PyImport_FindExtension() used to return a borrowed reference, the "strong" reference being stored in the PyImport_GetModuleDict() dictionary. All paths should behave the same. See attac

[issue3714] nntplib module broken by str to unicode conversion

2008-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Yes, the module is unusable in the current state. -- nosy: +amaury.forgeotdarc priority: -> critical ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3611] invalid exception context

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed as r66056. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3721] invalid literal for int() with base 16: ''

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is already fixed in trunk. (see issue900744) Can you try with a 2.6 version? -- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> pending ___ Pytho

[issue3668] "s*" argument parser marker leaks memory

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Yes, let them go in! -- resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3723] Py_NewInterpreter does not work

2008-08-29 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: The example Demo/embed/importexc.c crashes, because Py_NewInterpreter cannot reimport builtins and sys modules. This problem seems important for embedding applications like mod_python, for example. (the "import excep

[issue3717] Py_InitModule* is still referenced in docs

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: In your patch, it is not correct to declare main as main(int argc, wchar_t **argv) It is simply not the correct signature: the OS only supports "char** argv". You have to perform the conversion yourself. Look f

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Good catch! Here is a patch for 3.0. -- keywords: +needs review, patch nosy: +amaury.forgeotdarc priority: -> release blocker Added file: http://bugs.python.org/file11303

[issue3725] telnetlib module broken by str to unicode conversion

2008-08-29 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- priority: -> critical ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3725> ___

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11305/baditer.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11303/baditer.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: New patches, with the suggested spelling. For 3.0 and 2.6. Added file: http://bugs.python.org/file11306/baditer-2.6.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: What about using PyNumber_AsSsize_t? it uses PyNumber_Index to accept integral-like types, and refuses floats. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PRO

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Not bad! some remarks though: - It's better to avoid the "expensive" call to PyErr_Occurred() when possible. Here, an exception is set if (and only if) len==-1. For example, it is enough to add these lines a

[issue3660] reference leaks in 3.0

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Oops, you are right of course. I remove my patch so we don't get confused. ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3660] reference leaks in 3.0

2008-08-29 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11285/encode-leak.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Here are some timings, on winXP, vs2008 release build: # t.py def f(l=range(5000)): for x in l: pass # before the patch > python -m timeit -s "from t import f" "f()" 1 loops, best of 3: 15

[issue3660] reference leaks in 3.0

2008-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Did you look at the patch for issue3667 ? it should at least correct test_site. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3720] segfault in for loop with evil iterator

2008-08-30 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > Amaury, if you decide to go forward with this, please clean-up the > patches to eliminate common subexpressions. I already considered this, but generated machine code was identical, so I chose the more readable c

[issue3743] PY_FORMAT_SIZE_T is not for PyString_FromFormat

2008-08-31 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: test_deque fails on win64 buildbot: AssertionError: 'deque([7, 8, 9], maxlen=%Id)' != 'deque([7, 8, 9], maxlen=3)' A PY_FORMAT_SIZE_T format is incorrectly used with PyUnicode_FromFormat.

[issue3748] [py3k] platform.architecture() prints vogus messege on windows

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The call to _syscmd_file() should be avoided on windows platforms: - the "file" program does not exist - the stderr is redirected to /dev/null, which does not necessarily exists! On my machine, there is a "

[issue3548] subprocess.pipe function

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Vincent, GPL licenced code is incompatible with the inclusion into python. And if I am correct, you should sign a contributor agreement. Then the licence text is not necessary. -- nosy: +amaury.

[issue3751] str.rpartition fails silently with unicode argument

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It's not failing, it's simply calling unicode.partition instead of unicode.rpartition! -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file1

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Jesse, It seems that the patch was merged into py3k by r65883. The trick was from pickle import _Pickler as Pickler to get the subclassable python implementation. The only remaining point is the handling of dictionary

[issue3751] str.rpartition fails silently with unicode argument

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Updated patch, with tests. This is a 2.5 backport candidate. -- keywords: +needs review Added file: http://bugs.python.org/file11336/rpartition.patch ___ Python tracker <[E

[issue3751] str.rpartition fails silently with unicode argument

2008-09-01 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11331/rpartition.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3751] str.rpartition fails silently with unicode argument

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r66119 (trunk) and r66121 (python2.5) Thanks for the report! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3708] os.urandom(1.1): infinite loop

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch looks fine to me as well. -- keywords: -needs review nosy: +amaury.forgeotdarc resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3743] PY_FORMAT_SIZE_T is not for PyString_FromFormat

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: No, and this is the reason of the patch: PyUnicode_FromFormat and PyErr_Format do not use the platform printf. The code (in Objects/unicodeobject.c) is platform-independent; %zd is the way to print a ssize_t variable on al

[issue3743] PY_FORMAT_SIZE_T is not for PyString_FromFormat

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > You're right, Chris, I didn't think of that... Did I miss something? or some joke I do not understand? ___ Python tracker <[EMAIL PROTECTED]> <

[issue3720] segfault in for loop with evil iterator

2008-09-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Did you notice that the definition of PyIter_Check() also changed? >>> class T(object): ... def __iter__(self): return self ... >>> iter(T()) Traceback (most recent call last): File "", lin

[issue3733] Adding bin and Scripts folder into PATH

2008-09-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: See the long discussion in issue3561. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Windows installer should add Python and Scripts directories to the PATH

[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-09-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: With the patch, subclasses of threading.local seem to have an empty __dict__: import threading class MyLocal(threading.local): pass l = MyLocal() l.x = 2 l.__dict__ # returns {} Maybe __dict__ should be speci

[issue3720] segfault in for loop with evil iterator

2008-09-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Oops, sorry. I have too many files opened at the same time. Here is an updated patch. I removed all the "assert(PyIter_Check(it))", our evil iterator used to make them fail anyway in debug mode; and in the ca

[issue3720] segfault in for loop with evil iterator

2008-09-02 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11317/next-nevernull.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3759] test_asyncore.py leaks handle

2008-09-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Tested on Linux: each call to test.test_asyncore.test_main() opens two file descriptors (shown in /proc//fd). The patch corrects this. -- keywords: -needs review nosy: +amaury.forgeotdarc resolution:

[issue2975] VS8 include dirs grow without bound

2008-09-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Applied both patches (a bit differently for the equal sign) as r66171. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-09-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Here is an updated patch: - changed #ifndef into #ifdef. The "broken" case comes first now. - check that the second call to mbstowcs does not fail. - also, changed an assert, since strlen() does not always coun

[issue3607] test_multiprocessing failure (Unserializable message)

2008-09-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It seems that issue3125 follows the same problem; one of them could be closed IMO. Lowering priority as well. -- priority: release blocker -> high ___ Python tracker <

[issue3473] In function call, keyword arguments could follow *args

2008-09-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The compiler package was fixed some time ago with r65891 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1658] "RuntimeError: dictionary changed size during iteration" in Tkinter

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch is indeed simple. A minor stylistic remark: instead of for c in classes: del cnf[c[0]] it would be clearer to write for k, v in classes: del cnf[v] like the other loop does, 3 lines aft

[issue3762] platform.architecture() fails if python is lanched via its symbolic link (cygwin)

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem shows up on other platforms as well. The following comes from a standard Debian 64bit: $ /usr/bin/python -c "import platform; print platform.architecture()" ('64bit', '') $ /usr

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: In PyTokenizer_FindEncoding(), PyMem_MALLOC may return NULL. Another patch attached. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file11372/check_findencoding_

[issue3492] Zlib compress/decompress functions returning bytearray

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Two remarks: 1. Some functions in Modules/zipimport.c (get_data) will now receive PyBytes, but zipimporter_get_source handle them as PyByteArray. Does zipimport still work at all with this patch? 2. There are other p

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Right, here is an updated patch Added file: http://bugs.python.org/file11376/check_findencoding_malloc.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11372/check_findencoding_malloc.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3777] PyNumber_Long fails from Float

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Note to others: PySvn uses the PyCXX classes. The call in question is something similar to Py::Long( Py::Float( double( someValue ) ) ) Barry, what is the exact error message that you get? What do you mean by "res

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: pgen does not exist on Windows... What if I simply remove the call to PyErr_NoMemory? It is not strictly necessary: the function already returns NULL without an exception set, for example when the file canno

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: committed r66224 + r66225. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3660] reference leaks in 3.0

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Antoine, it seem that with encode-leak2.patch, the error path after PyErr_WarnEx() leaks the value of "v". I rewrote the whole paragraph to make it more straightforward: - the normal case is tested first - all pat

[issue1068268] subprocess is not EINTR-safe

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Two remarks: 1 - The part of the patch around the call to select.select() is already in trunk since r64756, almost in the same form. good. 2 - the patch seems to replace all calls to os.write, os.read and os.waipid. But it

[issue3721] invalid literal for int() with base 16: ''

2008-09-05 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- status: pending -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3721> ___

[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > self.read(buf, nbytes) Shouldn't this function be named readinto()? -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http

[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I asked this because I find the signature misleading: read(len) or read(buffer, len) io.py, for example, defines read(len) and read_into(buffer). ___ Python tracker <[EMAIL PRO

[issue3660] reference leaks in 3.0

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: encode-leak3.patch applied in r66234. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3660] reference leaks in test_distutils

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[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, we kee

[issue3660] reference leaks in test_distutils

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[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). Actually I found a (hackish) way to clean the 'ex

[issue3279] import of site.py fails on startup

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > Windows build files will need to be updated Nothing to do here: they are already built-in, linked into Python30.dll, and listed in PC/config.c But shouldn't the two extension modules be re

[issue3660] reference leaks in test_distutils

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: With the new module structure in 3.0, it should be possible to add a cleanup function. It would be a good exercise; I don't know of any module defining such a function. ___ Python

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

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I also agree with the patch. This seems the correct way to detect the Zip64 format. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3791] bsddb not completely removed

2008-09-05 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Some remnants of the defunct bsddb module, on windows: - _bsddb44.lib is still compiled (but never used anywhere) - _bsddb.py is still referenced by the msi installer This is a release blocker: the installer

[issue3791] bsddb not completely removed

2008-09-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: There are many other places with bsddb. I tried to list all the files here: Doc\library\collections.rst Doc\library\dbm.rst Doc\library\shelve.rst Doc\reference\datamodel.rst Lib\pydoc_topics.py Lib\shelve.py Lib\test\

[issue3792] Module variable overridden in child processes with multiprocessing

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Well, I get the OP's expected result on windows: C:\dev\python\trunk>PCbuild\python_d t.py Got 'p' of Correct C:\dev\python\trunk>PCbuild\python_d t.py -m Got 'p' of Correct This is easy to

[issue3777] long(4.2) now returns an int

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: You are right: long(4.2) used to return a long. This was changed by the introduction of the float_trunc() function, which is now used for float.__trunc__, float.__int__ and float.__long__. OTOH, long() has always been

[issue3796] some tests are not run in test_float

2008-09-06 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: r62680 moved some tests from test_builtin to test_float, but the list of classes to run was not updated. Some minor updated were needed to let these tests pass. -- files: test_float.patch keywords: needs review, p

[issue3796] some tests are not run in test_float

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r66270 and r66271. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

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

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: - PyBytes_Resize takes a PyObject**, you should pass &rv. Didn't you get a compiler warning? - Here is an additional test for the winreg module, your patch is needed for it to pass. -- nosy:

[issue3777] long(4.2) now returns an int

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Here is a patch that restores the float->long conversion. The function was simply copied from 2.5. -- keywords: +needs review, patch Added file: http://bugs.python.org/file11410/fl

[issue3798] SystemExit incorrectly displays unicode message

2008-09-06 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: When SystemExit is raised with a string argument, it is printed as UTF-8 to the (libc) stderr, and does not use the terminal's encoding. handle_system_exit() should use PyFile_WriteString() instead o

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

2008-09-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This patch corrects the "-m" case on windows: the path has to be decoded/recoded using the filesystem encoding, and not the default utf-8. Review is needed, of course. -- nosy: +amaury.forgeot

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

2008-09-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Updated patch. Added file: http://bugs.python.org/file11422/find_module_unicode_2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

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

2008-09-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: ./python -c "print('à')" does not work on my Linux machine with latest py3k (r66303), certainly because my terminal uses a latin-1 encoding: wcstombs will convert the argument back to the terminal encod

[issue3714] nntplib module broken by str to unicode conversion

2008-09-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Setting the default encoding as "ascii" is very conservative until we know the encoding actually used by the server. Are you sure that comp.lang.python uses latin-1? RFC3977, which re-defines the NNTP protocol,

[issue3632] use string_print() in gdb

2008-09-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch is fine. I don't know if it can make the 2.6 release, but it is very simple, and affect only a function used in debugger macros. -- resolution: -> accepted ___

[issue3791] bsddb not completely removed

2008-09-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed patch as r66330. Lower priority, but let the item open: more "bsddb" should be removed. -- priority: release blocker -> normal ___ Python tracker &

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

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Applied both patches as r66331. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

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

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Unfortunately, my patch does not work: see the compile warnings in "main.c": http://www.python.org/dev/buildbot/3.0/x86%20osx.5%203.0/builds/344/step-compile/0 I reverted the change, and wi

[issue3777] long(4.2) now returns an int

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Applied as r66332 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3777> ___ _

[issue516762] have a way to search backwards for re

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Why not? I needed such a feature some time ago. But if possible, it should be a keyword argument: re.search(..., backwards=True) similar to list.sort(reverse=True) -- nosy: +amaury.

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

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I think the test should check that TypeError is actually raised: self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0) It's even shorter than the try/except block... -- nosy: +am

[issue3805] sslobj.read py3k takes odd arguments

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The same function has two distinct behaviours: - If you pass a number, it return a bytes object. - If you pass a buffer, it returns a number! Different arguments and different return types: they should have different names

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

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Both patches look fine to me. They could be backported to 2.5 as well. -- keywords: -needs review resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> <

[issue3813] cannot lanch python.exe via symbolic link if HAVE_BROKEN_MBSTOWCS

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: http://man.he.net/man3/readlink says: "Conforming applications should not assume that the returned contents of the symbolic link are null-terminated" cygwin is not broken, but very (too much?) conforming in this c

[issue3813] cannot lanch python.exe via symbolic link if HAVE_BROKEN_MBSTOWCS

2008-09-09 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- keywords: +needs review priority: -> deferred blocker ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3813] cannot lanch python.exe via symbolic link if HAVE_BROKEN_MBSTOWCS

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Your patch is OK for me. Please apply! -- keywords: -needs review resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue3777] long(4.2) now returns an int

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I suppose you meant PyLong_FromDouble()? I think the messages talk about abstract numbers, not a specific python type: "infinity/NaN cannot be converted to an integral value". -- resolution: -> fixe

[issue3812] py3k build fails if configure --without-threads

2008-09-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Agreed. I suggest that you add a comment like "itertools.chain is in an extension module and may be unavailable" just above. Otherwise, someday one will find that this code should use a function from the stdlib, a

[issue3629] Python won't compile a regex that compiles with 2.5.2 and 30b2

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I came to the same conclusion: the 'skip' value is relative to the previous code, so it is necessary to adjust the target position. The patch is OK for me. -- nosy

[issue3743] PY_FORMAT_SIZE_T is not for PyString_FromFormat

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Jumping to "release blocker", since it causes a buildbot to fail. Review needed. -- priority: -> release blocker ___ Python tracker <[EMAIL PROTECTED]> <

[issue3821] trace module bug when using --missing

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This can be further simplified: line_increments = code.co_lnotab[1::2] Assigning to myself, I will try to add unit tests as well. the trace module is not tested at all... -- assignee: -> amaury.fo

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The correct link is #2636. Is it the same work? -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3807] _multiprocessing build fails when configure --without-threads

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch is not easy to read, but if it can be summarized to: if sysconfig.get_config_var('WITH_THREAD'): else: missing.append('_multiprocessing') then this makes sense - it

[issue3824] test_tarfile fails on cygwin (unicode decode error)

2008-09-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Is PyUnicode_DecodeMBCS available on cygwin? I get compilation errors when I try your patch. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <ht

<    5   6   7   8   9   10   11   12   13   14   >