[issue11173] Undocumented public APIs in Python 3.2

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: > PyErr_WarnFormat is already documented in Doc/c-api/exceptions.rst > PyImport_ExecCodeModuleWithPathnames is already documented in Doc/c-api/import.rst > PyModule_GetFilenameObject is already documented in Doc/c-api/m

[issue11173] Undocumented public APIs in Python 3.2

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: > Py_UNICODE_strcat, Py_UNICODE_strncmp, Py_UNICODE_strrchr See issue #10435 (with a patch) for these functions. -- ___ Python tracker <http://bugs.python.org/issu

[issue11082] ValueError: Content-Length should be specified

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: Georg Brandl: can this fix go into Python 3.2? It changes the API. I like any patch rejecting unicode where unicode is irrevelant (where we don't know how to choose the right encoding). About the patch: you should maybe add a test to ensure that s

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

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: Le jeudi 10 février 2011 à 16:41 +, Ross Lagerwall a écrit : > Ross Lagerwall added the comment: > > 32-bit computers can address up to 4GiB of memory ... at least 4 GB. With PAE (Physical Address Extension), we can address up to 2^36 bytes.

[issue11071] What's New review comments

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: Another remark. In the "poplib" section, there is a paragraph about asyncore: I don't see how both are related. -- ___ Python tracker <http://bugs.pyt

[issue11071] What's New review comments

2011-02-10 Thread STINNER Victor
STINNER Victor added the comment: In the What's new in 3.2: there is no mention of the PEP 3003 (Python Language Moratorium). May we add a section "What is not new in 3.2"? :-) This PEP is something specific to Python 3.2. -- ___

[issue7330] PyUnicode_FromFormat segfault

2011-02-11 Thread STINNER Victor
STINNER Victor added the comment: It looks like your patch fixes #10829: you should add tests for that, you can just reuse the tests of my patch (attached to #10829). --- unicode_format() looks suboptimal. +memset(buffer, ' ', width); +width_unicode = PyUnicode_FromStr

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-02-11 Thread STINNER Victor
New submission from STINNER Victor : If you have an undecodable filenames on UNIX, Python 3 escapes undecodable bytes using surrogates. pydoc: HTMLDoc.index() uses indirectly os.listdir() which does such operation, and later filenames are encoded to UTF-8 (the whole HTML content is encoded to

[issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383

2011-02-11 Thread STINNER Victor
STINNER Victor added the comment: Oops, my isUndecodableFilename() example is wrong. PEP 383 only uses U+DC80..U+DCFF range: def isUndecodableFilename(filename): return any((0xDC80 <= ord(ch) <= 0xDCFF) for ch in filename) Example of undecodable filename: b'bla\xe9\xff.py&

[issue11187] PyUnicode_AsEncodedString: the bootstrap hack is no more needed

2011-02-11 Thread STINNER Victor
New submission from STINNER Victor : Since version 3.2, Python uses the locale encoding in PyUnicode_EncodeFSDefault() using _Py_wchar2char() and _Py_char2wchar() until the codec registry is initialized and the locale codec is loaded (until initfsencoding() is done). Before Python 3.2

[issue11187] PyUnicode_AsEncodedString: the bootstrap hack is no more needed

2011-02-11 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Unicode ___ Python tracker <http://bugs.python.org/issue11187> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11193] test_subprocess error on AIX

2011-02-11 Thread STINNER Victor
STINNER Victor added the comment: test_undecodable_code() in test_cmd_line had a similar issue: on FreeBSD, Solaris and Mac OS X, even if the locale is C (and nl_langinfo(CODESET) announces ASCII), _Py_char2wchar() (mbstowcs) decoded b'\xff' as '\xff' (use ISO-8859-1 e

[issue11190] test_locale error on AIX

2011-02-11 Thread STINNER Victor
STINNER Victor added the comment: See also issue #11193 (another locale issue on AIX). -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11

[issue11160] ZipFile.comment expects bytes

2011-02-13 Thread STINNER Victor
STINNER Victor added the comment: > can we use str.encode() function to convert string into bytes ? Can you try different ZIP archivers to check which encoding is expected? WinZip, WinRAR, 7-zip, "zip" command line program on Linux, etc. And do you have any reference into a ZIP

[issue11210] PyErr_SetFromWindowsErrWithFilenameObject() doesn't exist: remove it from pyerrors.h

2011-02-14 Thread STINNER Victor
New submission from STINNER Victor : PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(int, const char *); has a strange prototype: "FilenameObject" usually indicates a PyObject* argument, not a char* argument. The function doesn't exist in Python/errors.c,

[issue11188] test_time error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: > File ".../Lib/test/test_time.py", line 351, in test_mktime >self.assertEqual(time.mktime(tt), t) > OverflowError: mktime argument out of range I don't know which values are "out of range". But I guess that the test f

[issue11193] test_subprocess error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: > I don't understand why the test pass on FreeBSD, Solaris and > Mac OS X, but not on AIX. Oh, the command line and the filesystem encodings may be different. test_undecodable_env() of test_subprocess.py uses os.environ which uses sys.getfilesys

[issue11193] test_subprocess error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: >>> sys.getfilesystemencoding() 'iso8859-1' Ok, I expected this result. Can you also try: $ LC_ALL=C ./python -c "import sys; print(ascii(sys.argv))" $(echo -ne "abc\xff") ['-c', 'abc\udcff'] $ LC_A

[issue11211] gzip.open() fails for gzipped file

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: test.jml is a ZIP archive, not a gzip archive. "gzip -d" is kind enough to unpack it even if it is ZIP file and not a gzip file. So it's not a Python bug at all. -- nosy: +haypo resolution: -> invalid stat

[issue11188] test_time error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: > So test_negative is now OK Ok, I converted your comment to a patch: strftime_aix.patch. -- keywords: +patch Added file: http://bugs.python.org/file20762/strftime_aix.patch ___ Python tracker &l

[issue11188] test_time error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: > but tm_wday = 42 did not solve the problem it seems. Can you try with tm_yday=-1 or tm_isdst=-2? -- ___ Python tracker <http://bugs.python.org/issu

[issue11188] test_time error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor added the comment: > http://code.google.com/p/y2038/wiki/AmazingDiscoveries <<< AIX again Merijn informs me that before year 0 AIX gets very, very slow. >>> -- ___ Python tracker <http://bu

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

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: Can you please attach your Makefile file? In Makefile.pre.in, I see: libpython$(VERSION).dylib: $(LIBRARY_OBJS) VERSION should be 3.2, only LDVERSION is the VERSION + the ABI flags (eg. 3.2dm). And I don't see any usage of libpython$(LDVERSION).dyl

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

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: Ah, there is also Mac/Makefile.in: attach also Mac/Makefile. (and there is also Mac/PythonLauncher/Makefile.in, but I don't think that the issue comes from this file) ((can it be related to python*-config pr

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

2011-02-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue11222> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: @Georg: Is this issue a release blocker? -- ___ Python tracker <http://bugs.python.org/issue11222> ___ ___ Python-bugs-list m

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

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: Ah ok, the issue comes from configure.in near line 779: Darwin*) LDLIBRARY='libpython$(LDVERSION).dylib' BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'

[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11223> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: > I will try with pdb or something. You can also try to attach gdb to the running process: with python-gdb.py, you have nice py-* commands. Or if you don't have gdb7, you may try my faulthandler module: you will have to modify the source code (eg.

[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor
New submission from STINNER Victor : len(ur'\u') == len(u'\u') == 1 len(ur'\U0010') == len(u'\U0010') == 1 but >>> len(ur'\n'), len(u'\n') (2, 1) >>> len(ur'\x00'), len(u'\x00'

[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor
STINNER Victor added the comment: > Python 2.x could not be changed, for compatibility reasons. Well, it is not a bug because it is documented! << When an 'r' or 'R' prefix is used in conjunction with a 'u' or 'U' prefix, then the \u an

[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > Here is what faulthandler reports when I trigger it as Python > is locked in test_socket: > ... > File ".../Lib/test/fork_wait.py", line 30 in f faulthandler doesn't print the source code line (yet?). Here is the code: class

[issue11230] "Full unicode import system" not in 3.2

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: Short answer: In Python 3.2, « import héhé » doesn't work on Windows, but you can have non-ASCII paths in sys.path. Longer answer: I fixed the import machinery to handle correctly non-ASCII characters in module *paths*. But the import machinery is u

[issue11231] bytes() constructor is not correctly documented

2011-02-17 Thread STINNER Victor
New submission from STINNER Victor : There are 5 different usages of the bytes() constructor: 1) bytes(iterable_of_ints) -> bytes 2) bytes(string, encoding[, errors]) -> bytes 3) bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer 4) bytes(memory_view) -> bytes 5) bytes(i

[issue11231] bytes() constructor is not correctly documented

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > These are AFAIR the same. So the docstring should also maybe be updated too: $ python >>> help(bytes) Help on class bytes in module builtins: class bytes(object) | bytes(iterable_of_ints) -> bytes | bytes(string, encoding[, errors]) -&g

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

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: The problem occurs on import (import bla reads bla.py), when Python tries to create bla.pyc. The problem is that Python stores the timestamp as 4 bytes in .pyc files, whereas time_t is 64 bits on Windows (at least on Windows XP with Visual Studio). To

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

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > To support bigger timestamps, we have to change the file format > of .pyc files. write_compiled_module(), check_compiled_module() and other functions use the marshal module to read/write binary file, but marshal has no function for int64_t, only fo

[issue4379] Py_SAFE_DOWNCAST in FILE_TIME_to_time_t_nsec failing

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: Oh, this issue was already fixed by r87666 to fix the duplicate issue #8278. -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4379] Py_SAFE_DOWNCAST in FILE_TIME_to_time_t_nsec failing

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > Oh, this issue was already fixed by r87666 ... in py3k, and then merged into release31-maint (r87668) and release27-maint (r87669). -- ___ Python tracker <http://bugs.python.org/iss

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > Shouldn't module time be changed to use a cross-platform implementation > that uses a 64 bit time_t-like type? Apparently Perl 6 has made the > equivalent change. The error occurs on time.gmtime(t): even if we use 64 bits time_t type, we have

[issue7330] PyUnicode_FromFormat segfault

2011-02-17 Thread STINNER Victor
STINNER Victor added the comment: > > It looks like your patch fixes #10829: you should add tests for that, you > > can just reuse the tests of my patch (attached to #10829). > > Sorry, but I think my patch doesn't fix #10829. Ah ok, so don't add failing tests :-

[issue11242] urllib.request.url_open() doesn't support SSLContext

2011-02-18 Thread STINNER Victor
New submission from STINNER Victor : Issue #9003 added cafile and capath arguments to url_open(), but it is not possible to reuse a SSLContext object (which would avoid to reload certificates, CRL, etc.). -- components: Library (Lib) messages: 128779 nosy: haypo, pitrou priority

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread STINNER Victor
STINNER Victor added the comment: Oh, my patch is incomplete: time2netscape() has the same issue. -- ___ Python tracker <http://bugs.python.org/issue5

[issue7330] PyUnicode_FromFormat segfault

2011-02-18 Thread STINNER Victor
STINNER Victor added the comment: > Oh, what if the trunked char* cannot be decoded correctly? > e.g. a tow-bytes character is divided in the middle? Yes, but PyUnicode_FromFormatV() uses UTF-8 decoder with replace error handler, and so the incomplete byte sequence will be replaced by

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread STINNER Victor
STINNER Victor added the comment: No, I forgot to upload it... -- keywords: +patch Added file: http://bugs.python.org/file20785/cookiejar_datetime.patch ___ Python tracker <http://bugs.python.org/issue5

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread STINNER Victor
STINNER Victor added the comment: If datetime.strftime() is not reliable, we should maybe fix it instead of using a workaround? -- ___ Python tracker <http://bugs.python.org/issue5

[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-18 Thread STINNER Victor
New submission from STINNER Victor : While testing a patch fixing issue #7330, I found a bug in PyUnicode_FromFormat() in the %V format: it decodes the byte string from ISO-8859-1, whereas I would expect that the string is decodes from UTF-8, as the "%s" format. -- messag

[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-18 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue11246> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-02-21 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg128975 ___ Python tracker <http://bugs.python.org/issue8650> ___ ___ Python-bugs-list m

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

2011-02-21 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg128976 ___ Python tracker <http://bugs.python.org/issue8651> ___ ___ Python-bugs-list m

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

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: I removed Antoine's message because it was related to issue #8650. -- ___ Python tracker <http://bugs.python.org/i

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

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Woops, I removed a duplicate message of Antoine. in this issue instead of #8651. Removed message: - > Fixed by r87729. This only addresses the compress() and decompress() functions, but e.g. crc32() and adler32() are also touched by this is

[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: > Confirmed on Python 3.2 (winxp). > The problem doesn't seem to exist on 3.1.3. Can you try Python 3.1 with -u command line flag? I changed Python 3.2 to always open all files in binary module, not only if -u flag is used. I had also to fix th

[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: +text = PyUnicode_FromFormat(b'repr=%V', 'abcdef', b'abcdef') +self.assertEqual(text, 'repr=abcdef') How do you know which argument is used? For example, you should use instead 'abc' and b

[issue11187] PyUnicode_AsEncodedString: the bootstrap hack is no more needed

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r88476. I prefer to only change it in Python 3.3, so no backport. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11169] compileall doesn't support PEP 383 (undecodable paths/filenames)

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r88478. > Not sure this can make it into stable branches. I agree, I prefer to not touch stable releases. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bug

[issue11168] UnicodeEncodeError on recusion limit if the script filename is undecodable

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: r88480 removes the filename variable: use gdb7+python-gdb.py or the faulthandler module to get a Python backtrace. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11168] UnicodeEncodeError on recusion limit if the script filename is undecodable

2011-02-21 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue11168> ___ __

[issue10830] PyUnicode_FromFormatV("%c") doesn't support non-BMP characters on narrow build

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Fixed in 3.3 (r88481). Keep it open to backport it maybe to 3.2 later. -- status: open -> pending ___ Python tracker <http://bugs.python.org/issu

[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Do adler32() and crc32() support length up to UINT32_MAX? Or should we maybe limit the length to INT32_MAX? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-02-21 Thread STINNER Victor
STINNER Victor added the comment: Well, the main problem is that there are 3 different codes to parse the format string, and each code is different... Attached patch factorizes the code: create one subfunction parse_format_flags(). It fixes also this issue and prepares the work to fix #10831

[issue3299] invalid object destruction in re.finditer()

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: "import re: re.finditer("a", {})" crash on Python 2.x (tested with svn trunk) because of an invalid use of PyObject_NEW/PyObject_DEL. The error is in pattern_scanner(), in block "if (!string) { ... }".

[issue3301] DoS when lo is negative in bisect.insort_right() / _left()

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: "import bisect; bisect.insort(range(4), -1, -1)" goes into an unlimited loop. Workaround: replace negative lo value by zero. The function may raise an exception. -- components: Library (Lib) files: bisect_l

[issue3302] segfault on gettext(None)

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: msgid of gettext(), dgettext(), dcgettext() C functions can not be NULL (domainname can be NULL): "import locale; locale.gettext(None)" generates a segfault. domainname argument of bindtextdomain() have to be a n

[issue3303] invalid ref count on locale.strcoll() error

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: If locale.strcoll(a, b) fails because PyUnicode_FromObject(b) fails, refcount of a is wrong. Attached patch fixes the problem. -- components: Library (Lib) files: locale_strcoll_rel1.patch keywords: patch messages: 6933

[issue3303] invalid ref count on locale.strcoll() error

2008-07-06 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Example to reproduce the bug: import locale; locale.strcoll(u"a", None) ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3304] invalid call to PyMem_Free() in fileio_init()

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: fileio_init() calls PyMem_Free(name); whereas name comes from PyArg_ParseTupleAndKeywords(). Attached patch removes this invalid call. The bug may also affect Python3.0. -- components: Library (Lib)

[issue3299] invalid object destruction in re.finditer()

2008-07-06 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @georg.brandl: The error is an Heisenbug. Yes, sometimes it doesn't crash, but recheck in Valgrind ;-) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3305] Use Py_XDECREF() instead of Py_DECREF() in MultibyteCodec and MultibyteStreamReader

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Functions mbstreamwriter_dealloc() and mbstreamreader_dealloc() of Modules/cjkcodecs/multibytecodec.c uses Py_DECREF() to free stream attribute memory, but this attribute may be NULL if MultibyteCodec or MultibyteStreamReader const

[issue3306] audioop.findmax() crashs with negative length

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Example: >>> import audioop >>> audioop.findmax(''.join( chr(x) for x in xrange(256)), -2392392) Erreur de segmentation (core dumped) The problem is that audioop_findmax() doesn't check le

[issue3299] invalid object destruction in re.finditer()

2008-07-06 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Hum, the bug is maybe specific to Python build with --with-pydebug. I don't know exactly the behaviour changes of the PYDEBUG option. @effbot: in my patch, I replaced PyObject_DEL (PyObject_FREE) and not PyObject_Del

[issue3307] invalid check of _bsddb creation failure

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: newDBObject(), called by DB_construct(), doesn't check correctly the result of all to the external function db_create(). It checks if self->db is NULL, but db_create() doesn't change self->db value on er

[issue3307] invalid check of _bsddb creation failure

2008-07-06 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The bug occurs on db_create() failure. Dummy example to reproduce it: "import _bsddb; _bsddb.DB(None, 29.515)" ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3309] missing lock release in BZ2File_iternext()

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Call BZ2File_iternext() on closed file doesn't release the lock. Example: --- import bz2 obj = bz2.BZ2File('/etc/issue') obj.close() try: # acquire the lock obj.next() except ValueError, err: # 

[issue3311] block operation on closed socket/pipe for multiprocessing

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _multiprocessing Connection methods don't check if handle is valid or not. If you close the socket/pipe, Python may crash on operations, especially in poll() on FD_SET(...handle, &rdfs). Example of crash: --

[issue3312] bugs in _sqlite module

2008-07-07 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: (A) module_register_adapter() doesn't check microprotocols_add() result, whereas it can fails (eg. dict setitem error). Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" => should raise a TypeError

[issue3313] dlopen() error with no error message from dlerror()

2008-07-07 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Python dl_open() function (from dl module) calls dlopen() and check its result: if it's NULL, it's an error. This is correct if I read the man page. But with an invalid flag value (-1), dlopen() returns NULL but dlerro

[issue3313] dlopen() error with no error message from dlerror()

2008-07-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: As expected, the bug can be reproduced with ctypes.dlopen(). py_dl_open() function of Modules/_ctypes/callproc.c should be merged with Modules/dlmodule.c. Here use at least the attached patch for ctypes (same job than the other patc

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _multiprocessing.Connection() allows to use any positive (or nul) number has socket handle. If you use an invalid file descriptor, poll() method may crash (especially for big positive integer). Example: >>> import _

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- type: -> crash ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3321> ___ ___

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-08 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: scanstring_str() and scanstring_unicode() functions don't end value whereas it can be outside input string range. A check like this is needed: if (end < 0 || len <= end) { PyErr_SetString(PyExc

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ooops, there is a typo in my last patch: it's "struct stat statbuf;" and not "struct stat *statbuf;"! Here is a new version of the patch. Added file: http://bugs.python.org/file10861/_m

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Valgrind output for Python trunk compiled with pydebug option: ==29848== Invalid read of size 4 ==29848==at 0x809AF61: _Py_ForgetReference (object.c:2044) ==29848==by 0x809AFCF: _Py_Dealloc (object.c:2065) ==29848==by 0x8

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: F*ck, Firefox just crashed! I have to rewrite my long comment... First, to explain why the problem only occurs in pydebug mode: a PyObject has only _ob_next and _ob_prev attributes if Py_TRACE_REFS is set (eg. by pydebug). PyObje

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10828/re_finditer.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10892/_curses_panel.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Other examples of invalid use of PyObject_Del(). Don't apply the patch, i didn't check it. Eg. element_dealloc() should crash if self->tag is NULL... and at line 331, self->tag is NULL whereas I called element_dea

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About _curses_panel.patch: same as pyobject_del.patch, i didn't tested the code, and is looks like PyCursesPanel_Dealloc() expects that the object is properly initialized. It looks like this bug (invalid use of PyObject_Del/P

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-14 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10860/_multiprocessing_connection.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3302] segfault on gettext(None)

2008-07-19 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10945/locale_none-2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3302] segfault on gettext(None)

2008-07-19 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10831/locale_none.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: To reproduce the crash, try very big negative integer as second argument. Example: >>> _json.scanstring("test", -23492394) Erreur de segmentation (core dumped) >>> _json.scanstring(u"test", -

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I wrote that I'm unable to fix the bug correctly, but I wrote a patch to avoid the crash: - replace begin by end in error messages: is it correct? - use "end < 0 || len <= end" test to check scanstring()

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

2008-08-10 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @kmtracey: Great and thanks! Three years later, the bug is finally fixed :-) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue3553] "2to3 -l" doesn't work when installed in /opt

2008-08-14 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I just installed Python 3.0b2 in /opt/py3k and tried 2to3 tool: $ /opt/py3k/bin/2to3 -l Available transformations for the -f/--fix option: Traceback (most recent call last): File "/opt/py3k/bin/2to3", line 5,

[issue3553] "2to3 -l" doesn't work when installed in /opt

2008-08-14 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file2/2to3_fixer_dir.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3131> ___ ___ Python-bugs-list mailing list

[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I reported the same bug with another patch: #3553. I used __import__ and module.__file__ attribute (and not realpath). -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTE

[issue3606] 2to3: commands varible replaced by subprocess

2008-08-19 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I tried 2to3 on my python-ptrace project and with minor changes, it works fine. One of the minor changes is to replace subprocess.split(";") by commands.split(";"). The original code was: commands = command

[issue3610] Fix gdbinit for Python 3.0

2008-08-19 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I'm trying to track down a bug in Python 3.0 (or my program?). I fixed some functions of gdbinit: - pystack and pylocals: use the new function py_printstr - lineno: call CPython "PyCode_Addr2Line" instead of ugly

<    32   33   34   35   36   37   38   39   40   41   >