[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-29 Thread STINNER Victor
STINNER Victor added the comment: Ok, fixed in r88228. Not backport needed, SSLContext was introduced in Python 3.2. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-29 Thread STINNER Victor
STINNER Victor added the comment: +if isinstance(message, io.TextIOWrapper): +# Backward compatibility hack. +message = message.buffer Is it a good thing to parse a mailbox using a text file? If not, we should emit a warning and maybe remove this

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-29 Thread STINNER Victor
STINNER Victor added the comment: > The last step is running the tests on Windows. > Attached is the updated patch. mailbox4.patch doesn't pass on Windows, Raymond is working on a patch. -- ___ Python tracker <http://bugs.python

[issue3080] Full unicode import system

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: As explained in issue #10828: Python 3.2 doesn't support non-ASCII module names on Windows because module names are encoded to UTF-8 instead of the filesystem encoding (the ANSI code page). -- ___ Python tr

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: "Python’s import mechanism can now load modules installed in directories with non-ASCII characters in the path name: import møøse.bites" møøse is not a module *path*, but a module *name*... This example doesn't work on Windows: see #3080. Modu

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: Should we add imports in all examples? Eg. add import math in: >>> repr(math.pi) '3.141592653589793' >>> str(math.pi) '3.141592653589793' At least, accumulate should be replaced by itertools.accumulate in the following

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: The import in the following example is wrong : >>> import datetime >>> datetime.now(timezone.utc) ... It should be replaced by: from datetime import datetime, timezone. -- ___ Pyt

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: ABCMeta should be replaced by abc.ABCMeta, or other "abc." prefixes should be removed. class Temperature(metaclass=ABCMeta): @abc.abstractclassmethod def from_fahrenheit(self, t): ... @abc.abstractclassmethod def from_celsi

[issue7358] cPickle crash on failed assertion

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

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: If you are still able to reproduce the bug, you may try the following module to get a backtrace: https://github.com/haypo/faulthandler/ -- status: pending -> open ___ Python tracker <http://bugs.pyth

[issue3080] Full unicode import system

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: See also #6011. -- ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10614] ZipFile: add a filename_encoding argument

2011-01-31 Thread STINNER Victor
Changes by STINNER Victor : -- title: ZipFile and CP932 encoding -> ZipFile: add a filename_encoding argument ___ Python tracker <http://bugs.python.org/issu

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ does

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: Attached patch replaces locale.getpreferredencoding() by locale.getpreferredencoding(False) in _io.TextIOWrapper and _pyio.TextIOWrapper. -- keywords: +patch Added file: http://bugs.python.org/file20637/io_dont_set_locale.patch

[issue7330] PyUnicode_FromFormat segfault

2011-02-01 Thread STINNER Victor
STINNER Victor added the comment: I opened other tickets related to PyUnicode_FromFormatV: * #10833 :Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated * #10831: PyUnicode_FromFormatV() doesn't support %li, %lli, %zi * #10830: PyUnicode_FromFormat

[issue11092] Setup.cfg isn't packaged when running sdist

2011-02-01 Thread STINNER Victor
STINNER Victor added the comment: You can add it to MANIFEST.in. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11092> ___ ___ Python-bugs-list m

[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread STINNER Victor
STINNER Victor added the comment: Since r70638, the http client encodes unicode to ISO-8859-1: << RFC 2616 says that iso-8859-1 is the default charset for HTTP entity bodies, but we encoded strings using ascii. See http://bugs.python.org/issue5314. Changed docs and code to use iso-

[issue11098] syntax error at end of line in interactive python -u

2011-02-02 Thread STINNER Victor
STINNER Victor added the comment: Since r7409 (14 years ago), Python does set the binary binary mode on stdin and stdout (not stderr) if the -u flag is used: if (unbuffered) { #if defined(MS_WINDOWS) || defined(__CYGWIN__) _setmode(fileno(stdin), O_BINARY); _setmode

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread STINNER Victor
STINNER Victor added the comment: > Since 2.x is closed for new features, this has to be rejected. We can explain in ElementTree documentation how to pass non-ASCII unicode strings: using explicit encoding to UTF-8. -- nosy: +haypo status: pending ->

[issue10951] gcc 4.6 warnings

2011-02-02 Thread STINNER Victor
STINNER Victor added the comment: gcc 4.6 bug has been fixed (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271). So setup.py can compile extensions using gcc 4.6, and here are new warnings: --- building dbm using bdb /home/haypo/prog/GIT/py3k/Modules/_pickle.c: In function 'load': /

[issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc

2011-02-03 Thread STINNER Victor
STINNER Victor added the comment: Can you try to get a backtrace? Use make install SHELL="bash -x" to display executed shell commands. And then rerun the last command in gdb: after the crash, the "where" command will give you a backtrace. ---

[issue11116] (mailbox and) email (errors) -> patch

2011-02-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue6> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue10971> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-02-08 Thread STINNER Victor
STINNER Victor added the comment: You should maybe add a test into _testcapi for this issue. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-02-08 Thread STINNER Victor
STINNER Victor added the comment: Ah, there is already a test for that: ok, it's fine and enough. -- ___ Python tracker <http://bugs.python.org/is

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

2011-02-10 Thread STINNER Victor
New submission from STINNER Victor : If the script filename is not decodable from the filesystem encoding, Python fails with a UnicodeEncodeError when we reach the recursion limit. The problem doesn't come from the user script, but from Python internals. It is difficult to understand an

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

2011-02-10 Thread STINNER Victor
New submission from STINNER Victor : The compileall uses print("bla", filename, "bla") to write messages to the console. But the print fails if the filename cannot be encoded to the console encoding. It occurs if the filename is an undecodable filename encoded by the PEP

[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: # 

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