[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-05 Thread STINNER Victor
STINNER Victor added the comment: The issue doesn't affect Python 2.7? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13070> ___ ___ Pytho

[issue13104] urllib.request.thishost() returns a garbage value

2011-10-05 Thread STINNER Victor
STINNER Victor added the comment: There is a failure on FreeBSD 8.2 buildbot: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1104/steps/test/logs/stdio == ERROR: test_thishost

[issue13104] urllib.request.thishost() returns a garbage value

2011-10-05 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker <http://bugs.python.org/issue13104> ___ ___ Python-bugs-list

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread STINNER Victor
STINNER Victor added the comment: I changed how newlines are handled on Windows to fix an issue with CGI: see the issue #10841. changeset: 67431:0933c3753a71 user:Victor Stinner date:Fri Jan 07 18:47:22 2011 + files: Misc/NEWS Modules/_io/fileio.c Modules/main.c

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread STINNER Victor
STINNER Victor added the comment: print() uses PyFile_WriteString("\n", file) by default (if the end argument is not set) to write the newline. TextIOWrapper.write("\n") replaces "\n" by TextIOWrapper._writenl. On Windows, stdin, stdout and stderr a

[issue13134] speed up finding of one-character strings

2011-10-11 Thread STINNER Victor
STINNER Victor added the comment: changeset: 72874:bfd3fcfb02f3 user:Victor Stinner date:Tue Oct 11 23:22:22 2011 +0200 files: Objects/stringlib/asciilib.h Objects/stringlib/fastsearch.h Objects/stringlib/stringdefs.h Objects/stringlib/ucs1lib.h Objects/stri

[issue13146] Writing a pyc file is not atomic

2011-10-11 Thread STINNER Victor
STINNER Victor added the comment: So if a process replaces the PYC file whereas another is reading the PYC, the reader may read corrupted data? The ideal fix is maybe to use a file lock? -- nosy: +haypo ___ Python tracker <http://bugs.python.

[issue13155] Optimize finding the max character width

2011-10-11 Thread STINNER Victor
STINNER Victor added the comment: find_max_char() returns 0x1 instead of 0x10, which may be wrong (or at least, surprising). You may add a max_char variable using other macros like MAX_CHAR_ASCII, MAX_CHAR_UCS1, ..., which will be set at the same time than mask. Or restore your if

[issue13155] Optimize finding the max character width

2011-10-11 Thread STINNER Victor
STINNER Victor added the comment: > Ok, updated patch. "ret = ~mask + 1;" looks wrong: (~0xFF80+1) gives 128, not 127. I don't see why you need: +if (ret < 128) +return 127; +if (ret < 256) +return 255; #undef ASCII_CHAR_MASK should be #un

[issue13156] _PyGILState_Reinit assumes auto thread state will always exist which is not true.

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

[issue13157] Build Python outside the source directory

2011-10-12 Thread STINNER Victor
New submission from STINNER Victor : It is no more possible to build Python outside its source directory. Try using: cd mkdir release cd release ../configure make Attached patch should fix this issue. -- files: build.patch keywords: patch messages: 145392 nosy: haypo, loewis

[issue13157] Build Python outside the source directory

2011-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Build ___ Python tracker <http://bugs.python.org/issue13157> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13150] Most of Python's startup time is sysconfig

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

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

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

[issue13063] test_concurrent_futures failures on Windows: IOError('[Errno 232] The pipe is being closed') on _send_bytes()

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: The issue has been fixed by the merge of the PEP 3151: I now get a BrokenPipeError with errno=32 and winerror=232. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issu

[issue13155] Optimize finding the max character width

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: Without the patch: python3.2 -m timeit 'x="é"+"x"*1' 'x[1:]' 10 loops, best of 3: 2.18 usec per loop python3.3 -m timeit 

[issue13155] Optimize finding the max character width

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: With find_max_char4.patch: python3.3 -m timeit 'x="é"+"x"*1' 'x[1:]' 10 loops, best of 3: 1.96 usec per loop -- ___ Python tra

[issue13155] Optimize finding the max character width

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: find_max_char5.patch: - don't use adjusted ~mask+1: "precompute" the right max_char - rename findwidth.h to find_max_char.h - add some #undef -- Added file: http://bugs.python.org/file23392/find_

[issue13146] Writing a pyc file is not atomic

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: > with atomic_create(, 'b') as f: See issues #8604 and #8828. -- ___ Python tracker <http://bugs.pytho

[issue13157] Build Python outside the source directory

2011-10-12 Thread STINNER Victor
STINNER Victor added the comment: > Which is platform with broken VPATH support and/or make ? Well, my commit is maybe useless... I tried to have two builds at the same time: - debug in Python source code (e.g. ~/python) - release in a subdirectory in the Python source code (e.g. ~/pyt

[issue13165] Integrate stringbench in the Tools directory

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Some ideas to improve stringbench: - test different Unicode range (stringbench tests only ASCII currently) - test mixing different Unicode range, e.g. ascii+latin1, UCS2.find(ascii), UCS2.replace(UCS2, UCS4), ... - add options to configure string lengths

[issue13169] Regular expressions with 0 to 65536 repetitions and above makes Python crash

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

[issue13174] test_os failures on Fedora 15: listxattr() returns ['security.selinux']

2011-10-13 Thread STINNER Victor
New submission from STINNER Victor : == FAIL: test_fds (test.test_os.ExtendedAttributeTests) -- Traceback (most recent call last): File "/home/haypo

[issue13174] test_os failures on Fedora 15: listxattr() returns ['security.selinux']

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Attached patch fixes test_os failures. -- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file23399/xattr_test.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13029] test_strptime fails on Windows 7 french

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Yes, this issue is a duplicate of #10653. -- resolution: -> duplicate ___ Python tracker <http://bugs.python.org/issu

[issue10653] test_time test_strptime fails on windows

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: It's a bug in the Windows API: I used the workaround suggested by Hirokazu Yamamoto. Thanks Hirokazu! Python 2.7 doesn't use wcsftime() and so it is not affected by this issue. -- resolution: -> fixed status: open -> closed versi

[issue13029] test_strptime fails on Windows 7 french

2011-10-13 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue13029> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: > Please use the file from Fedora in a test. Done. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12795] Remove the major version from sys.platform

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: While working on #12326, it's realized that many modules and applications rely on sys.platform. Change this value should be decided for each platform because it breaks backward compatibility. Linux was a special case and now I don't think that we s

[issue12568] Add functions to get the width in columns of a character

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: > There might be something you can steal from ... I don't think that Python should reinvent the wheel. We should just reuse wcswidth(). Here is a simple patch exposing wcswidth() function as locale.width(). Example: >>> import locale &

[issue12568] Add functions to get the width in columns of a character

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, unicode_width.patch of issue #2382 implements the width on Windows using: WideCharToMultiByte(CP_ACP, 0, buf, len, NULL, 0, NULL, NULL); It computes the length of byte string encoded to the ANSI code page. I don't know if it can be seen as the "

[issue13171] Bug in file.read(), can access unknown data.

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

[issue13171] Bug in file.read(), can access unknown data.

2011-10-14 Thread STINNER Victor
STINNER Victor added the comment: This issue is a duplicate of the issue #1394612 which has been closed as invalid. Read the following message: http://bugs.python.org/issue1394612#msg27200 I suppose that Python 3 is not affected by this issue because it doesn't use fread/fwrite anymore

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-10-14 Thread STINNER Victor
STINNER Victor added the comment: > It is not code under the users’ control (i.e. setup.py) > that uses MBCS, but the bdist_wininst command itself. bdist_command append configuration data to a wininst-xxx.exe binary. Where does this file come from? Can we modify wininst-xxx.exe binaries

[issue13171] Bug in file.read(), can access unknown data.

2011-10-14 Thread STINNER Victor
STINNER Victor added the comment: Le 14/10/2011 14:37, Alexander Steppke a écrit : > "When a file is opened with update mode ('+' as the second or third character > in the above list of mode argument values), You can just say " '+' in the file mode &q

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: > The problem is that the config file is parsed using > GetPrivateProfileString, and the result is then passed to TextOut, > SetDlgItemText, CreateWindow, etc. all of which are defined to accept MBCS > strings. I agree that this can't work

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: > Crashes on the Windows buildbots: Oops, it should be fixed by my last commits. -- ___ Python tracker <http://bugs.python.org/issu

[issue10653] test_time test_strptime fails on windows

2011-10-16 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue10653> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13088] Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: Antoine fixed the compilation issue. http://hg.python.org/cpython/rev/c63087ac1f6c changeset: 72941:c63087ac1f6c user:Antoine Pitrou date:Sat Oct 15 16:38:20 2011 +0200 Fix build under Windows -- resolution: -> fixed status: o

[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: _Py_fopen() returns NULL without raising an exception if fopen() fails. Attached patch raises a OSError if fopen() if errno is different than ENOENT. I don't know if ENOENT is the right error number on Windows. Should we ignore more error numbers,

[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: > I suggest also ignoring ENOTDIR and EISDIR. Not sure about EACCES. We should maybe mimick the io module: >>> open('Lib') IsADirectoryError: [Errno 21] Is a directory: 'Lib' In the io module, opening a directory ra

[issue13032] h2py.py can fail with UnicodeDecodeError

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: Using your patch, h2py.py skips all statements that cannot be decoded from UTF-8, whereas unpatched h2py.py accepts all statements that can be decoded from the locale encoding. I don't know if it is intentional to accept non-ASCII statements. It is

[issue12619] Automatically regenerate platform-specific modules

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: > is auto-generation wanted? For example, Lib/plat-linux/IN.py was regenerated at Nov 23 12:09:28 2002 (revision c2604d69aa5d) for the last time, and nobody complained. These modules are inconsistent. For example, the IN module contains constants of 64 b

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-16 Thread STINNER Victor
STINNER Victor added the comment: What is the status of this issue? rot13 codecs & friends were added back to Python 3.2 with {bytes,str}.(un)transform() methods: commit 7e4833764c88. Codecs were disabled because of surprising error messages before the release of Python 3.2 final: i

[issue8714] Delayed signals in the REPL on OpenBSD (possibly libpthread related)

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

[issue13195] subprocess: args with shell=True is not documented on Windows

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: See also issues #7839, #8972 and #10197. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13195> ___ ___ Pytho

[issue13196] subprocess: undocumented if shell=True is necessary to find executable in Windows PATH

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: Can't you merge this issue with #13195? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13196> ___ ___

[issue13197] subprocess: move shell arguments to a separate keyword param

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: Did you read the issue #7839? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13197> ___ ___ Python-bugs-list m

[issue13195] subprocess: args with shell=True is not documented on Windows

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: > For now I'll be pretty fine if this stuff is at least > properly documented. Can you propose a document patch describing the current behaviour? -- ___ Python tracker <http://bugs.python.

[issue13195] subprocess: args with shell=True is not documented on Windows

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: > Certainly not right now as I don't have development environment setup See our development guide to get such environment: http://docs.python.org/devguide/setup.html > It could be a lot easier with online editor Would like like to work on t

[issue12568] Add functions to get the width in columns of a character

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: > I'm -1 on using wcswidth, though. When you write text into a console on Linux (e.g. displayed by gnome-terminal or konsole), I suppose that wcswidth() can be used to compute the width of a line. It would help to fix #2382. Or do you think that

[issue12517] Large file support on Windows: sizeof(off_t) is 32 bits

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: changeset: 72869:32b1999410de user:Victor Stinner date:Tue Oct 11 22:45:02 2011 +0200 files: Modules/_io/fileio.c description: Fix io.FileIO.readall() on Windows 64 bits Use Py_off_t type (64 bits) instead of off_t (32 bits

[issue12454] mailbox: use ASCII to read/write .mh_sequences files

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: I kept Python 2.7 and 3.2 unchanged because I'm not completly sure that the fix is correct :-) -- ___ Python tracker <http://bugs.python.org/is

[issue12451] open: avoid the locale encoding when possible

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, it should be enough :-) -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12367] select.error has no errno attribute

2011-10-17 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: rejected -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12367> ___ ___ Pyth

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: mbcs6.patch: update patch to tip. -- Added file: http://bugs.python.org/file23430/mbcs6.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22374/mbcs4.patch ___ Python tracker <http://bugs.python.org/issue12281> ___ ___ Python-bugs-list m

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22389/mbcs5.patch ___ Python tracker <http://bugs.python.org/issue12281> ___ ___ Python-bugs-list m

[issue10197] subprocess.getoutput fails on win32

2011-10-17 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue10197> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13204] sys.flags.__new__ crashes

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

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-17 Thread STINNER Victor
STINNER Victor added the comment: Version 7 of my patch. This patch is ready for a review: I implemented all TODO. Summary of the patch (of this issue): - fix mbcs encoding to handle correctly ignore & replace error handlers on all Windows version - the mbcs encoding now supports any e

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file23430/mbcs6.patch ___ Python tracker <http://bugs.python.org/issue12281> ___ ___ Python-bugs-list m

[issue13209] Refactor code using unicode_encode_call_errorhandler() in unicodeobject.c

2011-10-18 Thread STINNER Victor
New submission from STINNER Victor : It's difficult to use unicode_encode_call_errorhandler() because the caller has to: - resize the output buffer (and check for integer overflow on the new size) - handle bytes and str for the replacement string: PyUnicode_EncodeDecimal() doesn'

[issue13210] Support Visual Studio 2010

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

[issue13210] Support Visual Studio 2010

2011-10-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brian.curtin ___ Python tracker <http://bugs.python.org/issue13210> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13210] Support Visual Studio 2010

2011-10-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue13210> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-18 Thread STINNER Victor
STINNER Victor added the comment: test_codecs pass on Windows XP and Windows Seven buildbots. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue13216] Add cp65001 codec

2011-10-18 Thread STINNER Victor
New submission from STINNER Victor : Thanks to #12281, it is now trivial to implement any Windows code page in Python. I don't know if existing code pages (e.g. cp932) should use codecs.code_page_encode/.code_page_decode on Windows, or continue to use the (portable) Python code. Users

[issue13216] Add cp65001 codec

2011-10-18 Thread STINNER Victor
STINNER Victor added the comment: > Users want the code page 65001 See issues #6058, #7441 and #10920. -- ___ Python tracker <http://bugs.python.org/issu

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > We shouldn't use the MS codec if we have our own, as they may differ. Ok, I agree. MS codec has a nice replacement behaviour (search for a similar glyph): cp1252 encodes Ł to b'L' for example. Our codec raises a UnicodeEncodeError o

[issue1602] windows console doesn't print or input Unicode

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: I done more tests on the Windows console. I focused my tests on output. To sum up, if we implement sys.stdout using WriteConsoleW() and sys.stdout.buffer.raw using WriteConsoleA(): - print() will not fail anymore on unencodable characters, because the

[issue1602] windows console doesn't print or input Unicode

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: unicode3.py replaces sys.stdout, sys.stdout.buffer, sys.stderr and sys.stderr.buffer to use WriteConsoleW() and WriteConsoleA(). It displays also a lot of information about encodings and displays some characters (I wrote my tests for cp850, cp1252 and

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > I consider that it is useless to set the ANSI code page to 65001 in a console I did more tests on the Windows console, focused on output, see: http://bugs.python.org/issue1602#msg145898 I was wrong, it *is* useful to change the code page to 65001. Even

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: Attached patch updates skip_if_broken_ubuntu_ssl(): OpenSSL in Ubuntu is still broken :-( OpenSSL package version is 1.0.0e-2ubuntu4 but in Python, ssl.OPENSSL_VERSION_INFO is still (0, 9, 8, 15, 15) !? -- keywords: +patch nosy: +haypo Added file

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > ssl.OPENSSL_VERSION_INFO is still (0, 9, 8, 15, 15) After a recompilation, I get (1, 0, 0, 5, 15) and ssl doesn't has PROTOCOL_SSLv2. test_ssl is failing with: ===

[issue13212] json library is decoding/encoding when it should not

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

[issue12989] Consistently handle path separator in Py_GetPath on Windows

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

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > > Sorry, which bug? > #6501 and friends Hum, this particular issue, #6501, doesn't concern the code page 65001. The typical usecase (issues #7441 and #10920) is: C:\victor\cpython>chcp 65001 Page de codes active : 65001

[issue12367] select.error has no errno attribute

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > The tracebacks say that the lockups are happening in test_errno The test was added by f6b8e4226260 the 17th october, the last lockup occurred the 16th (19:08:15). Before, I added a workaround to see the failure but avoid the lockup: 60fecfbea397 (Oct

[issue12619] Automatically regenerate platform-specific modules

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > you should make a case by example Did you read comments of this issue and my email thread on python-dev? There are differents examples: - LONG_MAX is 9223372036854775807 even on 32 bits system - On Mac OS X, FAT programs contains 32 and 64 binar

[issue1602] windows console doesn't print or input Unicode

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: win_console.patch: a more complete prototype * patch the site module to replace sys.stdout and sys.stderr by UnicodeConsole and BytesConsole classes which use WriteConsoleW and WriteConsoleA * UnicodeConsole inherits from io.TextIOBase and BytesConsole

[issue1602] windows console doesn't print or input Unicode

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: test_win_console.py: Small script to test win_console.patch. Write some characters into sys.stdout.buffer (WriteConsoleA) and sys.stdout (WriteConsoleW). The test is written for cp850, cp1252 and cp65001 code pages. -- Added file: http

[issue13224] Change str(class) to return only the class name

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: It looks like your change breaks backward compatibility (e.g. tests written using doctests). I don't know if it's a problem or not. -- nosy: +haypo ___ Python tracker <http://bugs.python.o

[issue13226] Expose RTLD_* constants in the posix module

2011-10-19 Thread STINNER Victor
New submission from STINNER Victor : We have a sys.setdlopenflags() function, but required constants are not available on all platforms. The DLFCN is only available on Linux and sunos5 (is plat-sunos5 available for all Solaris and OpenIndiana versions?), but not on OpenBSD, FreBSD, Mac OS X

[issue12619] Automatically regenerate platform-specific modules

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #13226 to provide RTLD_* constants on all platforms (not only on Linux and sunos5). -- ___ Python tracker <http://bugs.python.org/issue12

[issue12619] Automatically regenerate platform-specific modules

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > > There are differents examples: > > - LONG_MAX is 9223372036854775807 even on 32 bits system > > - On Mac OS X, FAT programs contains 32 and 64 binaries, whereas > > constants are changed for 32 or 64 bits > > That's

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > *.encode('rot_13') ==> CodecLookupError I like the idea of raising a lookup error on .encode/.decode if the codec is not a classic text codec (like ASCII or UTF-8). > *.transform('ascii') ==> CodecLookupError Sam

[issue12619] Automatically regenerate platform-specific modules

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > FYI, in Debian we have at least: > one package using the CDROM module, Is it cdsuite? (http://offog.org/code/cdsuite.html) > 3 packages using the IN module, I found policykit (it uses IN.INT_MAX). What are the 2 others? Which constants are us

[issue13227] Option to make the lru_cache type specific

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: The patch doesn't update the doc. You may also test type(square(3)). Except of these nits, the patch looks good. The typed option is an important feature, and your patch contains a good example of its usage (the re module). -- nosy: +

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > I think it may even make sense to build the filtering > options into codecs.lookup() itself: > > def lookup(encoding, decoded_format=None, encoded_format=None): > info = _lookup(encoding) # The existing codec lookup algor

[issue13201] Implement comparison operators for range objects

2011-10-20 Thread STINNER Victor
STINNER Victor added the comment: +one = PyLong_FromLong(1); +if (!one) +return -1; +cmp_result = PyObject_RichCompareBool(r0->length, one, Py_EQ); +Py_DECREF(one); If would be nice to have a PyLong_CompareLong() function. -- nosy: +ha

[issue13232] Logging: Unicode Error

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

[issue12619] Automatically regenerate platform-specific modules

2011-10-20 Thread STINNER Victor
STINNER Victor added the comment: For Freevo: yes, it uses the CDROM module. But this module doesn't look to be perfect because Freevo has a fallback for FreeBSD and another for... Linux (because of missing CDROM.CDROM_DRIVE_STATUS?): - try: from CDROM i

[issue13226] Expose RTLD_* constants in the posix module

2011-10-20 Thread STINNER Victor
STINNER Victor added the comment: Updated patch: remove "either" in the documentation. Thanks neologix par the review. -- Added file: http://bugs.python.org/file23483/posix_rtld-2.patch ___ Python tracker <http://bugs.python.o

[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread STINNER Victor
STINNER Victor added the comment: Extract of configure.in: - # Check for --with-computed-gotos AC_MSG_CHECKING(for --with-computed-gotos) AC_ARG_WITH(computed-gotos, AS_HELP_STRING([--with(out)-computed-gotos], [Use

[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread STINNER Victor
STINNER Victor added the comment: > Computed goto are disabled (in my Python 3.3 on Linux with GCC), > I checked by adding #error to ceval.c. Hum, I don't understand how, but I missed the #error failure. Computed goto *are enabled*

[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor
STINNER Victor added the comment: It is a compiler bug in GCC 4.2.1 with -O3. Try to compile attached unicode.c program with gcc -O3. The correct result is: $ gcc -O3 unicode.c -o unicode && ./unicode is ascii? 0 is compact? 1 is compact ascii? 0 _PyUnicode_COMPACT_DATA:

[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Build versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13241> ___ ___ Python-bugs-list mailin

[issue13241] Assertion failed in _PyUnicode_CheckConsistency during build of default branch on Mac OS X

2011-10-21 Thread STINNER Victor
STINNER Victor added the comment: The bug has been fixed in GCC, try a more recent version using ./configure CC=gccX.Y. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13246] Py_UCS4_strlen and friends needn't be public

2011-10-23 Thread STINNER Victor
STINNER Victor added the comment: > It seems there's no reason to document these functions > which operate on null-terminated unicode arrays. It's the easiest way to create a new string with the new Unicode API, when it's difficult to predict the exact output length

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