[issue12231] regrtest: add -k and -K options to filter tests by function/file names

2011-05-31 Thread STINNER Victor
New submission from STINNER Victor : Attached patch adds -k/--func-regex and -K/--file-regex options to filter tests by function/file names. It modifies makeSuite() and getTestCaseNames() functions of unittest.loader to add an optional filter argument: callback taking a function name as

[issue12231] regrtest: add -k and -K options to filter tests by function/file names

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: > Attached patch adds -k/--func-regex and -K/--file-regex options to filter > tests by function/file names. We need maybe a third option to filter tests by their class name. And we need also maybe the opposite option: exclude tests matching a regex. A

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: Cool, "x86 FreeBSD 6.4 3.x" is green for the first time since a long time, thanks to my commit 29e08a98281d (test_signal doesn't check signal delivery order). -- ___ Python tracker <http

[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-06-01 Thread STINNER Victor
STINNER Victor added the comment: I ran the test more than 1000 times on Linux (using -m test -F test_io, and manually patched test_io to only run this test, see also #12231 !!!) without being able to reproduce the failure. So it may be specific to Mac OS X Tiger

[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-06-01 Thread STINNER Victor
STINNER Victor added the comment: > Could this be related to http://bugs.python.org/issue6559#msg123958? > Or Issue10826? These failures were specific to Solaris/OpenIndiana: they were "door files". Extract of fd_status.py: 1.34 +# Ignore Solaris door files

[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-06-01 Thread STINNER Victor
STINNER Victor added the comment: The leaking file descriptor is a the read end of a pipe created in the test (the test creates 5 pipes, 10 file descriptors). On creation (in the parent process), this file descriptor has the mode : st_mode=4528. In the child process, the file descriptor has

[issue12196] add pipe2() to the os module

2011-06-01 Thread STINNER Victor
STINNER Victor added the comment: > support_linux_version.diff: cool, it's even better than the previous patch. > You can commit it, except if you are motived for a last change: display > the write also version in the SkipTest message (as it is done actually). I just added

[issue12196] add pipe2() to the os module

2011-06-01 Thread STINNER Victor
STINNER Victor added the comment: Your last support_linux_version.diff patch looks good. If you are motivated, this new function can also be added to test.support of Python 3.2 (test_socket.py has the original linux_version() function

[issue12250] regrtest: make --timeout explicit

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 03 juin 2011 10:02:12, vous avez écrit : > The implicit timeout in regrtest.py makes it harder to write automated > test scripts for 3rd party modules. First, you have to remember to > set --timeout=0 for long running tests. Ah? Which te

[issue12251] subprocess(..., stdout=sys.stderr) closes stderr for child

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

[issue12231] regrtest: add -k and -K options to filter tests by function/file names

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: > How about reusing unittest discovery in regrtest? Does this feature support filtering by keyword for file names and function names? -- ___ Python tracker <http://bugs.python.org/issu

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: > If I understand, the essence of the patch is to do > the file positioning automatically internally when needed. My patch is just a proposition to fix the issue. I wrote "I suppose that we can do better": self.seek(self.tell()) is more a w

[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: cjk_decode.patch: - patch *all* CJK decoders to replace only the first byte of an invalid byte sequence (by U+FFFD). Example from the issue title: b'\xff\n'.decode('gb2312', 'replace') gives now '�\n' instead of ju

[issue12224] problem with siginterrupt

2011-06-04 Thread STINNER Victor
STINNER Victor added the comment: > Victor, I understand your response as saying that there is no bug, > which would suggest closing this. Correct? If not, what is > the requested action? siginterrupt(False) has no effect on select(). I listed some solutions to not interrupt sele

[issue12263] punycode codec ignores the error handler argument

2011-06-04 Thread STINNER Victor
New submission from STINNER Victor : b'abc\xff'.decode('punycode', 'ignore') raises the same error than b'abc\xff'.decode('punycode', 'replace') or b'abc\xff'.decode('punycode'): it uses the strict error han

[issue12263] punycode codec ignores the error handler argument

2011-06-04 Thread STINNER Victor
STINNER Victor added the comment: base64_codec.py uses an assertion to check the error handler: it should use an if+raise (assertions are ignored in optimized mode, python -O). -- ___ Python tracker <http://bugs.python.org/issue12

[issue12264] parser.expr(): reference count error if more than one argument is passed

2011-06-04 Thread STINNER Victor
New submission from STINNER Victor : import parser; parser.expr("a", "b") raises a TypeError('expr() takes at most 1 argument (2 given)') but corrupt also the reference count of an object (I don't know which one): "python: Modules/gcmodule.c:327: visit

[issue12276] 3.x ignores sys.tracebacklimit=0

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

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-07 Thread STINNER Victor
STINNER Victor added the comment: issue12084.diff: - test_os pass with patched Python 3.3 on Windows 7 64 bits (and on Linux, Debian Sid) - in test_os: "finally: os.remove(file1)" fails with file1 doesn't exist: a new try/finally should be used after "with open(file1, &

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-07 Thread STINNER Victor
STINNER Victor added the comment: Win32SymlinkTests.test_rmdir_on_directory_link_to_missing_target() pass on my Windows 7 64 bits VM (with and without the patch), but is skipped: @unittest.skip("currently fails; consider for improvement"

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-07 Thread STINNER Victor
STINNER Victor added the comment: Oh oh. The situation is not a simple as expected. 3 functions only accept Unicode strings and 3 other functions decode "manually" byte strings from the ANSI code page. -- chdir(), rmdir(), unlink(), access(), chmod(), link(), listdir(), _g

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

2011-06-07 Thread STINNER Victor
New submission from STINNER Victor : Starting at Python 3.2, the MBCS codec uses MultiByteToWideChar() to decode bytes using flags=MB_ERR_INVALID_CHARS by default (strict error handler), flags=0 for the ignore error handler, and raise a ValueError for other error handlers. The problem is

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

2011-06-07 Thread STINNER Victor
STINNER Victor added the comment: MBCS codec was changed by #850997. Martin von Loewis proposed solutions to implement other error handlers in msg19180. -- ___ Python tracker <http://bugs.python.org/issue12

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

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

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-06-07 Thread STINNER Victor
STINNER Victor added the comment: Yes, you should check the Mac OS X version at runtime (as you should check the Linux kernel at runtime). platform.mac_ver() uses something like: sysv = _gestalt.gestalt('sysv') if sysv: major = (sysv & 0xFF00) >> 8 minor = (sysv &a

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

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: mbcs.patch fixes PyUnicode_DecodeMBCS(): - only use flags=0 if errors="replace" on Windows >= Vista or if errors="ignore" on Windows < Vista - support any error handler - support any code page (but the code page is hardcoded t

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

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: Example with ANSI=cp932 (on Windows Seven): - b'abc\xffdef'.decode('mbcs', 'replace') gives 'abc\uf8f3def' - b'abc\xffdef'.decode('mbcs', 'ignore') gives 'abcdef' --

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

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: > Example with ANSI=cp932 (on Windows Seven): > - b'abc\xffdef'.decode('mbcs', 'replace') gives 'abc\uf8f3def' > - b'abc\xffdef'.decode('mbcs', 'ignore') gives 'abcdef'

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: fatalhook-2.patch: I don't understand the documentation. It says "Cause :cfunc:`Py_FatalError` to invoke the given function instead of printing to standard error and aborting out of the process.", but if the callback does nothing, the messa

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: You don't check that 0 <= fd (e.g. oss.close()). The select has a specific code for Visual Studio (don't check v < FD_SETSIZE): #if defined(_MSC_VER) max = 0; /* not used for Win32 */ #else /* !_MSC_VER

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: > To be portable, we would need to ... Antoine is right: we don't have to be portable. We can write an "optimized" implementations (without polling) for a specific OS, even for a specific version of an OS (e.g. like Linux kernel >= 2.6

[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable

2011-06-08 Thread STINNER Victor
New submission from STINNER Victor : CGIHTTPRequestHandler.run_cgi() only checks if the script processing the request is executable if the file is not a Python script, but later it uses os.execve(scriptfile, ...) if os has a fork() function. Moreover, the executable() functions checks if

[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: multiprocessing_pool.patch: raise a ValueError if processes is less than 1. A test should be added. -- keywords: +patch nosy: +haypo versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 Added file: http://bugs.python.org/file22287

[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable

2011-06-08 Thread STINNER Victor
STINNER Victor added the comment: cgi.patch: fix the test checking that the script file is executable. The patch removes the executable() function. This function is not documented but is public. The patch can be easily modified to keep this function if needed. -- keywords: +patch

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: > Oh, sigwait() doesn't accept a timeout! I would be nice to have > also sigwaitinfo().. and maybe also its friend, sigwaitinfo() Oops, I mean sigtimedwait() and sigwaitinfo(). -- ___ Python tra

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: (I should not answer in this issue, but in #8407) > > See also issue #8407 for sigtimedwait() and signalfd() in Python. > > You didn't commit the signalfd part? Not yet because I would like to provide something to decode the data written

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: > So, this _PyCheckSelectable_fd ? function/macro would: > - return true (1) on Visual Studio or if > Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE is defined > - return false (0) if the file descriptor is greater than FD_SETSIZE otherwise > Do w

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-09 Thread STINNER Victor
New submission from STINNER Victor : Python 3.3 adds timeout arguments to communicate() and wait() methods of subprocess.Popen, acquire() method of threading.Lock, and maybe more. I like (optional) timeouts, and so it would be nice to have sigtimedwait(). If we expose sigtimedwait(), it&#

[issue12304] expose signalfd(2) in the signal module

2011-06-09 Thread STINNER Victor
New submission from STINNER Victor : "Linux offers the signalfd syscall since 2.6.22 (with minor changes afterwards). This call allows signals to be handled as bytes read out of a file descriptor, rather than as interruptions to the flow of a program. Quite usefully, this file descr

[issue12304] expose signalfd(2) in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: signalfd-4.patch: my more recent patch exposing signalfd(). It lacks a structure to decode the bytes read from the signalfd file descriptor. Example in ctypes (msg135438): class signalfd_siginfo(Structure): _fields_ = ( ('ssi_signo'

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: > This whole thread is becoming quite confusing. You are complelty right, sorry to pollute this issue. Changes related to this issue: - expose pthread_sigmask(), pthread_kill(), sigpending(), sigwait() - wakeup fd now contains the file descriptor

[issue12304] expose signalfd(2) in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: #8407 changed the wakeup fd: it now contains the signal number. pthread_sigmask() is now part of Python 3.3 (see also #8407). signalfd() has advantages over the wakeup fd (msg103326): - it is handled in the kernel, the process is not interrupted. For

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor added the comment: > I just noticed something "funny": signal_sigwait doesn't release > the GIL, which means that it's pretty much useless :-) sigwait() is not useless: the signal is not necessary send by another thread. The signal can be send by ala

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: > On Linux, it works well with more than one thread. > I added a test using a thread, we will see if it works > on buildbots. The test hangs on FreeBSD 8.2: [235/356] test_signal Timeout (1:00:00)! Thread 0x000800e041c0: File "/usr

[issue12309] os.environ was modified by test_packaging

2011-06-10 Thread STINNER Victor
New submission from STINNER Victor : [ 20/356] test_packaging (...) Warning -- os.environ was modified by test_packaging Seen on x86 Tiger buildbot: http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2723/steps/test/logs/stdio There is also a resource warning: .../Lib

[issue12310] Segfault in test_multiprocessing

2011-06-10 Thread STINNER Victor
New submission from STINNER Victor : test_multiprocessing segfaults in a loop. The crash occurs in _Condition.release() on waiter.release(), called from Queue._finalize_close(). Possible related changes: - a5c8b6ebe895: new sigwait() test using thread (issue #8407) - 6d6099f7fe89: add

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: > The test hangs on FreeBSD 8.2: (...) See also #12310 which may be related. -- ___ Python tracker <http://bugs.python.org/iss

[issue12310] Segfault in test_multiprocessing

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: > a5c8b6ebe895: new sigwait() test using thread (issue #8407) > 6d6099f7fe89: add sentinels to multiprocessing (issue #9205) The first segfaults occured in build #2719 (cedceeb45030): http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: test_multiprocessing crashs ~700 times on Mac OS X Tiger, regression likely introduced by this issue (6d6099f7fe89): I created issue #12310 for that. -- ___ Python tracker <http://bugs.python.org/issue9

[issue12310] Segfault in test_multiprocessing

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: > Victor, how can there be hundreds of crashes? > Isn't the process supposed to terminate when a crash occurs? Yes, a process does terminate on SIGSEGV, but multiprocessing creates subprocesses: I suppose that crashes occur in child proc

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: neologix> Patch attached. I wrote a different patch based on your patch. The main change is that I chose to keep signal.alarm(1) instead of sending the signal from the parent process to the child process, because I don't think that time.sleep(0

[issue12310] Segfault in test_multiprocessing

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 10 juin 2011 à 09:40 +, Antoine Pitrou a écrit : > There are several crashes in test_signal Commit a17710e27ea2 should fix some (all?) test_signal crashes. -- ___ Python tracker &l

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

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: Version 2 of my patch (mbcs2.patch): - patch also the encoder: fix ignore/replace depending on the Windows version, support any error handler: encode character per character if encoding in strict mode fails - Add PyUnicode_DecodeCodePageStateful() and

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

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: Example on Windows Vista with ANSI=cp932: >>> import codecs >>> codecs.code_page_encode(1252, '\xe9') (b'\xe9', 1) >>> codecs.mbcs_encode('\xe9') ... UnicodeEncodeError: 'mbcs'

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

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: Decode examples, ANSI=cp932: >>> codecs.code_page_decode(1252, b'\x80') ('\u20ac', 1) >>> codecs.code_page_decode(932, b'\x82') ... UnicodeDecodeError: 'mbcs' codec can't decode bytes in position 0

[issue12310] Segfault in test_multiprocessing

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: It looks like the sentinel doesn't handle fatal death of the child process: test test_multiprocessing crashed -- Traceback (most recent call last): File "./Lib/test/regrtest.py", line 1043, in runtest_inner File "/Users/db3l/build

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: Comments on is_selectable.diff. > +#define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || > s->sock_timeout <= 0.0) You may add parenthesis around the second s (even if it's unrelated to this issue and not a regression of you

[issue12316] test_signal: test_sigwait_thread failure on FreeBSD 6.4 buildbot

2011-06-10 Thread STINNER Victor
STINNER Victor added the comment: > In a multi-threaded program, we're only allowed to call async-safe > functions between fork() and exec() in the child process Oh, I don't know that. The test should be modified to create a new clean Python process using subprocess

[issue12310] Segfault in test_multiprocessing

2011-06-11 Thread STINNER Victor
STINNER Victor added the comment: > Would it be possible to try this on the buildbot to see if it fixes > the segfaults? You can fork cpython, modify the code, and run a custom buildbot on your clone. -- ___ Python tracker <http://bugs.p

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

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: Patch version 3: - add unit tests for code pages 932, 1252, CP_UTF7 and CP_UTF8 - fix encode/decode flags for CP_UTF7/CP_UTF8 - fix encode name on UnicodeDecodeError, support also "CP_UTF7" and "CP_UTF8" code page names TODO: - The

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

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: Using my patch, it is possible create a codec for any code page on demand: register a function checking if the encoding name starts with "cp" and ends with a valid code page number. Even if it is bad idea to set the OEM code page to 65001, impleme

[issue12316] test_signal: test_sigwait_thread failure on FreeBSD 6.4 buildbot

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: > Patch attached The patch looks correct, but only FreeBSD 6.4 can tell us if it "works" or not, so I commited your new version of the test. I inlined check_sigwait() because the function was only called by

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: Why should be used instead? - sys.platform.startswith('linux') - os.uname()[0] == 'Linux' - platform.system() == 'Linux' - other? Tests like sys.platform in ('linux2', 'darwin') can be replaced by sys.pl

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: sys.platform comes from Py_GetPlatform() which comes from PLATFORM define. On Linux, this define comes from Makefile: MACHDEP variable which comes from configure. Finally, MACHDEP is defined by: ac_sys_system=`uname -s` if test

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: issue12084_v2.diff doesn't patch os.lstat(bytes): os.lstat(bytes) should call win32_lstat() (which is removed by this patch) instead of stat(). test_os doesn't test os.stat()/os.lstat() with byte filenames. You can for examp

[issue12316] test_signal: test_sigwait_thread failure on FreeBSD 6.4 buildbot

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: test_signal passed in build #1577 of x86 FreeBSD 6.4 3.x: I close this issue. Thanks neologix! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: > os.lstat(bytes) should call win32_lstat() > (which is removed by this patch) instead of stat() Short history: - 0a1baa619171: Fix #10027. st_nlink not set on Windows calls to os.stat/lstat - 730b728e5aef: Implement #1578269. Patch by Jason R.

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

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

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-06-13 Thread STINNER Victor
STINNER Victor added the comment: > Here's a cleaned up patch which includes the test and lstat change > Victor mentioned. The test pass on Windows Seven 64 bits. -- ___ Python tracker <http://bugs.python.

[issue10527] multiprocessing.Pipe problem: "handle out of range in select()"

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

[issue12336] tkinter.test.test_ttk.test_widgets.test_select() failure on FreeBSD 6.4 3.x

2011-06-14 Thread STINNER Victor
New submission from STINNER Victor : test test_ttk_guionly failed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 674, in test_select self.assertTrue(success) AssertionError: [] i

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: I think that this issue is a duplicate of the issue #11272: Python 3.2.1 has been released recently and contains the fix. Can you try this version Fan? -- ___ Python tracker <http://bugs.python.org/issue12

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Note: Python 3.2 has another regression related to the Windows console (issue #11395), bug fixed in 3.2.1. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: U+1 is not the most common character in fonts. You should try another character in U+1-U+10 range (non-BMP characters). The new funny emoticon are in this range, but I don't know if your Ubuntu setup includes a font supporting this range.

[issue12133] ResourceWarning in urllib.request

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Oh, I wrote a similar patch to kill the ResourceWarning of test_pypi_simple (except that I didn't patch test_urllib2). -- nosy: +haypo versions: +Python 2.7, Python 3.2 ___ Python tracker <http://bugs.py

[issue10883] urllib: socket is not closed explicitly

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Is there still something to do in this issue? The initial report is fixed. -- versions: -Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.org/issue10

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: > From the discussions here, http://wiki.tcl.tk/1364, it appears that Tcl > 8.5 (and earlier) does not support Unicode code points outside > the BMP range as in this example. Extract of http://wiki.tcl.tk/1364 : "RS 2008-07-09: Unicode out of

[issue12167] test_packaging reference leak

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: test_dist and test_bdist_dumb leak because of the _path_created global variable of packaging.util, used indirectly by copy_tree(). # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating /foo/bar/baz" m

[issue12167] test_packaging reference leak

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Note: #12133 has a patch to fix the ResourceWarning of test_pypi_simple. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12263] punycode codec ignores the error handler argument

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: punycode_errors.patch: - raise an error if errors="replace": only accept strict and ignore - use errors to encode/decode to/from ASCII - add unit tests I don't think that the change should be documented, because punycode has no section

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

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4 (mbcs4.patch): - fix encode and decode flags depending on the code page and Windows version, e.g. use WC_ERR_INVALID_CHARS instead of WC_NO_BEST_FIT_CHARS for CP_UTF8 on Windows Vista and later - fix usage of the default character on

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

2011-06-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22282/mbcs.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-06-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22315/mbcs2.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-06-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22340/mbcs3.patch ___ Python tracker <http://bugs.python.org/issue12281> ___ ___ Python-bugs-list m

[issue12345] Add math.tau

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: I like this issue number, but I don't think that Python needs this new constant: it's trivial to add it to your own project. We have pi and e, it's enough. If we begin to add a new constant, others will ask to add much more constants, and th

[issue12345] Add math.tau

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: > Actually, I've heard there are an infinity of them. Can you prove that? -- status: pending -> open ___ Python tracker <http://bugs.python.

[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: It's maybe because Python 2.7.2 is faster/slower? :-) -- nosy: +haypo ___ Python tracker <http://bugs.python.org/is

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

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: Patch version 5 fixes the encode/decode flags on Windows XP. The codecs give different result on XP and Seven in some cases: Seven: - b'\x81\x00abc'.decode('cp932', 'replace') returns '\u30fb\x00abc' - &

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

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: TODO: add more tests CP_UTF8: if self.vista_or_later: tests.append(('\udc80', 'strict', None)) tests.append(('\udc80', 'ignore', b'')) tests.append((&

[issue12320] test_packaging failures

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: See also: http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/1516 http://www.python.org/dev/buildbot/all/builders/sparc%20solaris10%20gcc%203.x/builds/3276 There are many OSError(22, 'Invalid argument: ...') error

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

2011-06-16 Thread STINNER Victor
STINNER Victor added the comment: > What is the use of these code_page_encode() functions? I wrote them to be able to write tests. We can maybe use them to implement the Python code page codecs using a custom codec register function: see msg138246. Windows codecs seem to be less relia

[issue12310] Segfault in test_multiprocessing

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: Let's try on "real" buildbots. If the commit fixes the issue on 3.x, I will port the fix to Python 2.7. -- ___ Python tracker <http://bugs.pyt

[issue12333] test_packaging failures under Solaris

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: 276530424350 fixed the failures on "x86 OpenIndiana 3.x" buildbot. -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.py

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: Instead of ValueError: unsupported character I suggest: ValueError: unsupported character (U+1): Tcl doesn't support characters outside U+-U+ range What do you think? -- ___ Python tracker

[issue12263] punycode codec ignores the error handler argument

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: @Martin: Can you review my patch? -- ___ Python tracker <http://bugs.python.org/issue12263> ___ ___ Python-bugs-list mailin

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: I tested the patch on Python 3.3: the full test suite pass on Linux. I applied your patch on Python 2.7, 3.2 and 3.3, thanks Ezio. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue12309] os.environ was modified by test_packaging

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: A patch fixing os.environ warning for test_command_build_ext.py: diff --git a/Lib/packaging/tests/test_command_build_ext.py b/Lib/packaging/tests/test_command_build_ext.py --- a/Lib/packaging/tests/test_command_build_ext.py +++ b/Lib/packaging/tests

[issue10883] urllib: socket is not closed explicitly

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: ftp_close.patch: - (in passive mode) FTP.ntransfercmd() closes explicitly the socket on error: the caller has not access to the socket on error - OtherNetworkTests of test_urllib2net clears CacheFTPHandler cache: add a CacheFTPHandler.clear_cache() for that

[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: Simpler patch replacing 1026 constant by MAXPATHLEN. On my Linux box, MAXPATHLEN is 4096 and os.pathconf('/', 'PC_PATH_MAX') returns 4096. I am able to get a path of 4095 bytes using the patch. -- Added file: http://bugs.

[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: You may use get_current_dir_name() which allocates the memory for us. I can adapt os_getcwd_buffer-2.patch to support Solaris/OpenBSD, but do we need a dynamic buffer? (do we need to support OS without PATH_MAX

<    11   12   13   14   15   16   17   18   19   20   >