[issue11998] test_signal cannot test blocked signals if _tkinter is loaded; Tcl_Finalize()

2011-05-04 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_signal cannot test blocked signals if _tkinter is loaded -> test_signal cannot test blocked signals if _tkinter is loaded; Tcl_Finalize() ___ Python tracker <http://bugs.python.org/issu

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

2011-05-04 Thread STINNER Victor
STINNER Victor added the comment: Reopen, test_zlib fails with Python 2.7 on Windows: == ERROR: test_big_buffer (test.test_zlib.ChecksumBigBufferTestCase

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

2011-05-04 Thread STINNER Victor
STINNER Victor added the comment: "x86 debian parallel 2.7", "x86 Ubuntu Shared 2.7" and "x86 Tiger 2.7" fail with mmap.error('[Errno 12] Cannot allocate memory'). http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%202

[issue11994] [2.7/gcc-4.4.3] Segfault under valgrind in string.split()

2011-05-04 Thread STINNER Victor
STINNER Victor added the comment: GCC 4.4.3 is not the last stable version of the 4.4 branch: try maybe GCC 4.4.6... Changes of GCC 4.4.4, 4.4.5 and 4.4.6: http://gcc.gnu.org/gcc-4.4/changes.html#4.4.6 Or try maybe another major version

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

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: @sdaoden(, @pitrou): Antoine proposes to skip the zlib "big buffer" (1 GB) test on 32 bits system. What do you think? On 64 bits system, we check a buffer of 2 GB-1 byte (0x7FFF bytes). Is the test useful or not? What do we test? Can you ch

[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: > If the user base cannot be calculated, paths > starting with ~ should not exist or be used at all in this context. It's not "~" but "{userbase}" substitution variable. Here is a new patch implementing this idea: don't

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race condition or a file system issue, but because of the regex! The regex "ba.*" is applied on the fullname, not only on the basename. If the temporary contains "

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race condition or a file system issue, but because of the regex! The regex "ba.*" is applied on the fullname, not only on the basename. If the temporary contains "

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race condition or a file system issue, but because of the regex! The regex "ba.*" is applied on the fullname, not only on the basename. If the temporary contains "

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg135199 ___ Python tracker <http://bugs.python.org/issue11873> ___ ___ Python-bugs-list m

[issue11888] Add C99's log2() function to the math library

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: Updated patch to use the system log2() if it is available. The test pass with the system log2() on Linux (Debian Sid, eglibc 2.11.2). -- Added file: http://bugs.python.org/file21897/issue11888-2.patch ___ Python

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: +self.assertRunOK('-q', '-x', 'ba[^\/]*$', self.pkgdir) This regex matchs 'ba(...)\'. I think that you wanted to write r'[^\\/]'. -- ___

[issue12011] The signal module should raise OSError for OS-related exceptions, not RuntimeError

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: I asked if I should use RuntimeError or OSError for the new signal functions (#8407) on python-dev. Georg Brandl answered: "If it has an errno, it should be a subclass of EnvironmentError." -- ___ Pyth

[issue12011] The signal module should raise OSError for OS-related exceptions, not RuntimeError

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

[issue12010] Compile fails when sizeof(wchar_t) == 1

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

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

2011-05-05 Thread STINNER Victor
STINNER Victor added the comment: > http://bugs.python.org/review/8407/show Updated patch (version 2). Note: sigpending() doesn't return an error code but -1 on error. -- Added file: http://bugs.python.org/file21901/pending_signals

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-05 Thread STINNER Victor
New submission from STINNER Victor : It looks like OpenSSL can be compiled without SSLv2 (#ifdef OPENSSL_NO_SSL2). See this bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612780 When compiling Python, I get the following error: /home/haypo/prog/HG/cpython/Modules/_ssl.c: In

[issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac

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

[issue11999] sporadic failure in test_mailbox

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: I don't understand anything, but thanks for fixing it :-) (Or at least trying to fix it, buildbots will tell us.) -- status: pending -> open ___ Python tracker <http://bugs.python.org

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > @haypo, @pitrou: Are there any objections to removing test_big_buffer() from Lib/test/test_zlib.py? I now agree Antoine: the test is useless. It can be removed today. About mmap: add a new test for this issue (mmap on Mac OS X and F_FULLSYNC) is a g

[issue11995] test_pydoc loads all Python modules

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Isn’t the root problem that pydoc uses import rather than imp or PEP 302 > things? We could change that. It's possible to get the documentation of some module without loading them: pydoc already supports get_source() method of a module load

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: So the correct result for b'\xff\n'.decode('gb2312', 'replace') is u'?\n'? -- versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tra

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: _codecs_cn implements different multibyte encodings: gb2312, gbkext, gbcommon, gb18030ext, gbk, gb18030. And there are other Asian multibyte encodings: big5 family, ISO 2202 family, JIS family, korean encodings (KSX1001, EUC_KR, CP949, ...), Big5, CP950

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Please avoid "negative" constants. Calling it HAS_SSLv2 would be fine. I reused the term from ssl.h (#ifdef OPENSSL_NO_SSL2), but yes we can use a different name. > Also, there should be some doc update mentioning that PROTOCOL_SSLv2

[issue11888] Add C99's log2() function to the math library

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Thanks, Victor. I suspect we're going to need to be a bit more > careful, though: when the extra tests were added for math.log, it > turned out that it had all sorts of strange special-case behaviour on > various platforms. > > So

[issue11888] Add C99's log2() function to the math library

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: (Oh, I hit the wrong keyboard shortcut and sent my email too fast) You can commit issue11888.patch first if you would like to test it. In this case, here is a patch to use system log2(), patch to apply *after* issue11888.patch. It only uses log2() if x >

[issue11888] Add C99's log2() function to the math library

2011-05-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file21897/issue11888-2.patch ___ Python tracker <http://bugs.python.org/issue11888> ___ ___ Python-bug

[issue11888] Add C99's log2() function to the math library

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: By the way, issue11888.patch is just fine: you can commit it. I like your frexp "trick" to improve the accuracy. -- ___ Python tracker <http://bugs.python.o

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > You are right that I got the regex wrong (I'm bad at regexes), but > in fact it is fine the way it is. Since there's no r, the regex > is actually "ba[^/]$", which is exactly what I meant. What about Windows? tempfile.mkdte

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +benjamin.peterson, georg.brandl priority: normal -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread STINNER Victor
New submission from STINNER Victor : Patch to optimize this: make it 10 times faster. Try attached benchmark script. On a debug build I got the following results: * original: 299.8 ms * patched: 23.2 ms I expected a factor of 10 because it uses a C implementation of rot13 instead of an hand

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file21920/bench.py ___ Python tracker <http://bugs.python.org/issue12027> ___ ___ Python-bugs-list mailin

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +lemburg, pitrou ___ Python tracker <http://bugs.python.org/issue12027> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: > I mistakenly removed your pending_signals-2 patch > I'm really sorry about this, could you re-post it? No problem, anyway I worked on a new version in the train. > So, if anything, you shouldn't check for a pending signal [in sigwait]

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: Note: we might expose pth_raise() which is similar to pthread_kill(), but... pth support was deprecated by the PEP 11 and pth support will be removed from Python 3.3 source code. -- ___ Python tracker <h

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: About signalfd(): this patch doesn't provide any information or tool to decode data written to the file descriptor. We should expose the signalfd_siginfo structure or you cannot handle more than one signal (how do you know which signal numbers were r

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: wakeup_signum.patch: simple patch to write the signal number (as a single byte) instead of just b'\x00' into the wake up file descriptor. It gives the ability to watch more than one signal and be able to know which one was raised. Included tests d

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

2011-05-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file21883/pending_signals.patch ___ Python tracker <http://bugs.python.org/issue8407> ___ ___ Python-bug

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: pending_signals-3.patch: doc nit, the link to Thread.ident doesn't work. The doc should be replaced by something like: *thread_id* can be read from the :attr:`~threading.Thread.ident` attribute of a :class:`threading.Thread` o

[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-07 Thread STINNER Victor
New submission from STINNER Victor : I don't know why threading._get_ident() (which is _thread.get_ident()) is private: this function is safe. This function becomes useful with pthread_kill() which will be added by #8407. -- assignee: docs@python components: Documentation, Li

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: The threading has a function to get directly the identifier of the current thread: threading._get_ident() instead of threading.current_thread().ident. I think that threading._get_ident() is more reliable to threading.current_thread().ident because

[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: I think that threading._get_ident() is more reliable than threading.current_thread().ident because Thread.ident can be None in some cases. -- ___ Python tracker <http://bugs.python.org/issue12

[issue11994] [2.7/gcc-4.4.3] Segfault under valgrind in string.split()

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: GCC does have bugs: see a recent example with a development version of GCC 4.6 => #9880 (the bug was fixed before the final release of GCC 4.6). If you would like to go futher, you should open a bug report in GCC bug tracker (not in the Python bug trac

[issue12027] Optimize import this (patch to make it 10x faster)

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: @Raymond: What do you think? Do you prefer simple or faster code? I think that the speed of "import this" do matter! -- ___ Python tracker <http://bugs.python.o

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

2011-05-07 Thread STINNER Victor
STINNER Victor added the comment: Update the signalfd patch (version 4) against the default branch. Specify the minimum Linux version in signalfd() doc. The patch still lacks a structure to parse the bytes written into the file (see msg135438 for a ctypes example): a struct sequence should

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

2011-05-08 Thread STINNER Victor
STINNER Victor added the comment: > New changeset f8c49a930015 by Victor Stinner in branch 'default': > Issue #8407: The signal handler writes the signal number as a single byte Wakeup test using two pending signals fails on Free

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-08 Thread STINNER Victor
STINNER Victor added the comment: Updated patch. Note: I tried to keep the same enum values for py_ssl_version, it's maybe useless and so "=1" can be removed. -- Added file: http://bugs.python.org/file21938/nosslv2-2.patch ___

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file21902/nosslv2.patch ___ Python tracker <http://bugs.python.org/issue12012> ___ ___ Python-bugs-list m

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

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

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

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

[issue12011] The signal module should raise OSError for OS-related exceptions, not RuntimeError

2011-05-08 Thread STINNER Victor
STINNER Victor added the comment: Patch: signal.signal() and signal.siginterrupt() raise an OSError, instead of a RuntimeError: OSError has an errno attribute. -- keywords: +patch Added file: http://bugs.python.org/file21939/signal_oserror.patch

[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file21640/sysconfig_getuserbase.patch ___ Python tracker <http://bugs.python.org/issue10496> ___ ___ Pytho

[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-08 Thread STINNER Victor
STINNER Victor added the comment: @eric.araujo, @tarek: do you prefer nonexistent_user.patch? I removed sysconfig_getuserbase.patch, because I agree that an expanded path containing "~" is a bug. -- ___ Python tracker <http://bu

[issue9971] Optimize BufferedReader.readinto

2011-05-08 Thread STINNER Victor
STINNER Victor added the comment: It would be nice if you can also patch _pyio. I read sometimes _pyio to check how _io is implemented. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9

[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > Thanks, Victor. You caught me by surprise a bit Oh, I thought that the patch was ready to be commited. > I had some more minor changes to that patch pending, > so I've committed those separately. You should add "Issue #11888: &quo

[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > we have to wait 12 hours or maybe one day to wait for all buildbots Oh, it's faster than expected: test_math passed on FreeBSD 6.4 3.x buildbot. I was waiting for this one because it's an old OS and many tests fail on this buildbot (because

[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: Issue #11888: Use system log2() when available http://hg.python.org/cpython/rev/565f43f6bed4 "I expect the system libc to use more accurate functions than Python." You know what? Mac OS X log2 is less accurate than Python log2! A log2 test fail

[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > we should check that it's not pow that's at fault here Some tests on Mac OS X Tiger: >>> (2.0 ** -255).hex() '0x1.0p-255' => pow is correct >>> import ctypes; import ctypes.util, math >>> li

[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: Main changes of the patch, if the current user has no home directory (no entry in /etc/passwd) and there is HOME environment variable: - sysconfig.get_config_vars() doesn't have a 'userbase' variable. sysconfig.get_config_var('userbase&#

[issue5231] Change format of a memoryview

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: Read a int32 array as a raw byte string is useful, but the opposite is also useful. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue5

[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: If you would like more entry, use a longer filename: >>> (26+10+1) ** 6 > (26+26+10+1) ** 6 False >>> (26+10+1) ** 7 > (26+26+10+1) ** 6 True -- nosy: +haypo ___ Python tracker <http:/

[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: If you care about security, you should not use the Python random module because it is not cryptographic. Oh oh, ssl doesn't expose RAND_bytes(). -- ___ Python tracker <http://bugs.python.org/is

[issue12040] Expose a Process.sentinel property (and fix polling loop in Process.join())

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

[issue11349] _pickle should implement the module finalisation protocol

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

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: It should be fixed. Reopen the issue if it doesn't work, I only tested on Linux. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > Since it's a bugfix, it should probably go into all branches. Fixed in 2.7, 3.1, 3.2, 3.3. -- resolution: -> fixed status: -> closed ___ Python tracker <http://bugs.pyth

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > The patch still does not handle the case where the eof indicator > is already set when calling raw_input. My original patch does. Correct, your example fails, but only in Python 2.7. I don't like the idea of always clearing errors. I prefer to

[issue12049] expose RAND_bytes() function of OpenSSL

2011-05-10 Thread STINNER Victor
New submission from STINNER Victor : The _ssl module has RAND_add() RAND_status() and RAND_egd() functions, but not RAND_bytes(). I would be nice to be able to generate random bytes using RAND_bytes(). And maybe also RAND_pseudo_bytes()? I will work on a patch, it's just a rem

[issue9971] Optimize BufferedReader.readinto

2011-05-10 Thread STINNER Victor
STINNER Victor added the comment: +Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) Why downcasting the size? Can't you store the size into a Py_off_t? I suppose that sizeof(Py_off_t) >= sizeof(Py_ssize_t). -- ___ Python tracke

[issue12011] The signal module should raise OSError for OS-related exceptions, not RuntimeError

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

[issue11888] Add C99's log2() function to the math library

2011-05-10 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 34871c3072c9 by Victor Stinner in branch 'default': > Issue #11888: skip some log2 tests on Mac OS X Tiger Oh... I realized that the test doesn't fail on Mac OS X Tiger PPC, only on Mac OS X Tiger x86. But I am too lazy

[issue6011] python doesn't build if prefix contains non-ascii characters

2011-05-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6ad356525381 by Victor Stinner in branch 'default': Close #10419, issue #6011: build_scripts command of distutils handles correctly http://hg.python.org/cpython/rev/6ad356525381 -- ___ Pyth

[issue6011] python doesn't build if prefix contains non-ascii characters

2011-05-10 Thread STINNER Victor
STINNER Victor added the comment: I fixed #10419 in Python 3.2 and 3.3 (I applied my copy_script-2.patch fix). It is now possible to compile and install Python 3.2 and 3.3 with a non-ASCII prefix, so this issue can be done. If you have issues when compiling Python with a non-ASCII prefix

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-10 Thread STINNER Victor
STINNER Victor added the comment: Issue fixed in Python 3.1, 3.2, 3.3. Thanks to Arfrever, I realized that this issue not only concerns the compilation of Python itself with a non-ASCII prefix (issue #6011), but the installation of any Python script containing a non-ASCII character. So I

[issue9971] Optimize BufferedReader.readinto

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 10 mai 2011 à 19:06 +, John O'Connor a écrit : > Victor: AFAIK its not actually downcasting. On Linux 32 bits, size_t is 32 bits, off_t is 64 bits. If the file size is 4 GB, the downcast may truncate the size of 0 byte. It would be safe

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

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: I asked if the change is correct on iconv mail list. Here is a copy of an answer. De: Bruno Haible À: [iconv mailing list] Cc: Victor Stinner Sujet: Re: [bug-gnu-libiconv] Invalid byte sequences and multiybyte encodings Date: Tue, 10 May 2011

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

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: Oh, the HZ codec has no test! And what is this horrible BLOB, Lib/test/cjkencodings_test.py? -- ___ Python tracker <http://bugs.python.org/issue12

[issue2857] add codec for java modified utf-8

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: utf_8_java.patch: Implement "utf-8-java" encoding. * It has no alias * 'a\0b'.encode('utf-8-java') returns b'a\xc0\x80b' * b'a\xc0\x80b'.decode('utf-8-java') returns 'a\x00b' * I added so

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
New submission from STINNER Victor : All CJK codecs have tests except the chinese HZ codec, I don't know why. But to add a test, I need to add data to Lib/test/cjkencodings_test.py and the format of this file is not documented. It is not too difficult to understand the format by readin

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file21966/convert_cjkencodings.py ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bug

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file21967/cjkencodings.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file21967/cjkencodings.patch ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bug

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file21968/cjkencodings.patch ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bug

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: convert_cjkencodings.py is script to replace Lib/test/cjkencodings_test.py by a Lib/test/cjkencodings/ directory: --- big5hkscs.txt big5hkscs-utf8.txt big5.txt big5-utf8.txt cp949.txt cp949-utf8.txt euc_jisx0213.txt euc_jisx0213-utf8.txt euc_jp.txt euc_jp-utf8

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +HZ codec has no test ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bugs-list mailin

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: -HZ codec has no test ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bugs-list mailin

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

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +HZ codec has no test ___ Python tracker <http://bugs.python.org/issue12016> ___ ___ Python-bugs-list mailin

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: New files should be marked as binary in Mercurial: add "Lib/test/cjkencodings/* = BIN" in .hgeol. -- ___ Python tracker <http://bugs.python.o

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: > Looking at cjkencodings.py the format is pretty clear. The file > consists of one statement that creates one dict that maps encoding > names to a pair of (encoded) byte strings. The bytes literals are > entirely hex escapes, with a maximum of

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: Le mercredi 11 mai 2011 à 17:27 +, Marc-Andre Lemburg a écrit : > Victor, could you please contact Hye-Shik Chang > before making significant changes to the test suite. Good idea, done. > Wouldn't it be better to just use example strings fr

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: Lib/test/cjkencodings_test.py was created when CJK were introduced in Python: changeset 31386 by Hye-Shik Chang . "Add CJK codecs support as discussed on python-dev. (SF #873597) Several style fixes are suggested by Martin v. Loewis and Marc-Andre Le

[issue1028] Tkinter binding involving Control-spacebar raises unicode error

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: I'm working on #2857 which adds the "Modified UTF-8" ("utf-8-java"?) codec to Python. We can maybe use it instead of raising an error in 3.3? -- nosy: +haypo ___ Python tracker <http

[issue2857] add codec for java modified utf-8

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: See also issue #1028. -- ___ Python tracker <http://bugs.python.org/issue2857> ___ ___ Python-bugs-list mailing list Unsub

[issue12057] HZ codec has no test

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +hyeshik.chang ___ Python tracker <http://bugs.python.org/issue12057> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +hyeshik.chang ___ Python tracker <http://bugs.python.org/issue12016> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2857] add codec for java modified utf-8

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: Benchmark: a) ./python -m timeit "(b'\xc3\xa9' * 1).decode('utf-8')" b)./python -m timeit "(''.join( map(chr, range(0, 128)) )*1000).encode('utf-8')" c) ./python -m timeit "f=open('Misc/

[issue11888] Add C99's log2() function to the math library

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: > I wait for the following build to close this issue. > http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2507 Oh, it's the wrong build. The correct build is: http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/

[issue12049] expose RAND_bytes() function of OpenSSL

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: ssl_rand.patch adds RAND_bytes() and RAND_pseudo_bytes() functions to the ssl module. I moved /dev/urandom to /dev/urandom.xxx and /dev/random to /dev/random.xxx to test RAND_bytes() error path. In this case, RAND_pseudo_bytes() generates non-cryptographic

[issue12060] Python doesn't support real time signals

2011-05-11 Thread STINNER Victor
New submission from STINNER Victor : If a real time signal is raised 2 times whereas the signal is blocked, unblock the signal will call the signal handler twice. The C signal handler of the Python signal module only stores a boolean to say if the Python signal handler should be called or not

[issue12060] Python doesn't support real time signals

2011-05-11 Thread STINNER Victor
STINNER Victor added the comment: example.py: example to demonstrate the problem. The Python signal handler is only called once, it should be called twice. -- Added file: http://bugs.python.org/file21977/example.py ___ Python tracker <h

<    26   27   28   29   30   31   32   33   34   35   >