[issue6625] UnicodeEncodeError on pydoc's CLI

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

[issue10310] signed:1 bitfields rarely make sense

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10310> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10308] Modules/getpath.c bugs

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10308> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10309> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10133] multiprocessing: conn_recv_string() broken error handling

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10133> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10086] test_sysconfig failure with site-packages

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2921] enable embedding: declare/#define only py* symbols in #includes

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue2921> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10231] SimpleHTTPRequestHandler directory bugs

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10231> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue960325] "--require " option for configure/make (fail if building not possible)

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue960325> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1602] windows console doesn't print utf8 (Py30a2)

2010-11-04 Thread STINNER Victor
STINNER Victor added the comment: I wrote a small function to call WriteConsoleOutputA() and WriteConsoleOutputW() in Python to do some tests. It works correclty, except if I change the code page using chcp command. It looks like the problem is that the chcp command changes the console code

[issue1602] windows console doesn't print utf8 (Py30a2)

2010-11-04 Thread STINNER Victor
STINNER Victor added the comment: sys_write_stdtout.patch: Create sys.write_stdout() test function to call WriteConsoleOutputA() or WriteConsoleOutputW() depending on the input types (bytes or str). -- keywords: +patch Added file: http://bugs.python.org/file19493

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-06 Thread STINNER Victor
New submission from STINNER Victor : In Python3, the following pattern becomes common: with open(fullname, 'rb') as fp: coding, line = tokenize.detect_encoding(fp.readline) with open(fullname, 'r', encoding=coding) as fp: ... It open

[issue10329] trace.py and unicode in Python 3

2010-11-06 Thread STINNER Victor
STINNER Victor added the comment: > 1. It opens the source file one more time. This is probably acceptable > because existing code already opens it at least four times when -m (show > missing) option is selected. (Twice in find_executable_linenos() and > twice in linecache.getline

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-06 Thread STINNER Victor
New submission from STINNER Victor : On "NetBSD 5 i386 3.x" buildbot, testTanh() of test_math fails because the sign of wrong. configure scripts has a test to check if tanh(-0.0) keeps the sign or no, and on this buildbot the result is "no". pyconfig.h contains a TANH

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue10337> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-06 Thread STINNER Victor
STINNER Victor added the comment: test_cmath does also fail: http://www.python.org/dev/buildbot/builders/NetBSD%205%20i386%203.x/builds/237/steps/test/logs/stdio == FAIL: test_specific_values (test.test_cmath.CMathTests

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue10337> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10338] test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root()

2010-11-06 Thread STINNER Victor
New submission from STINNER Victor : http://www.python.org/dev/buildbot/builders/x86%20debian%20parallel%203.x/builds/806/steps/test/logs/stdio test test_lib2to3 failed -- multiple errors occurred == ERROR: test_bom (lib2to3

[issue10338] test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root()

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

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-06 Thread STINNER Victor
STINNER Victor added the comment: > In the test, do you have to remove the TESTFN file manually? Isn’t that > handled by unittest or regrtest? The test uses TESTFN+'.py', not TESTFN ;-) > I think the name of the function could be better but I don’t have a > proposal.

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: > what about open(.., encoding="fromcookie")? Please don't do that. It remembers me the magical str.encode() method of Python2. I prefer simple API with limited features: if you want to open a Python script, use tokenize.open(), if you w

[issue10335] tokenize.open_python(): open a Python file with the right encoding

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: On Saturday 06 November 2010 17:00:15 you wrote: > Note that it is useful for opening any text file with an encoding cookie, > not only python source code, so "tokenize.open()" sounds attractive. Ok, the new patch (tokenize_open-2.patch) us

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch skipping math and cmath tests if TANH_PRESERVES_ZERO_SIGN is 0. -- keywords: +patch Added file: http://bugs.python.org/file19532/skip_tanh_sign.patch ___ Python tracker <http://bugs.python.

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-07 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file19533/skip_tanh_sign-2.patch ___ Python tracker <http://bugs.python.org/issue10337> ___ ___ Python-bug

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: Commited to Python 3.2 (r86299) after a review of Mark Dickson on IRC. Thanks Mark ;-) -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: > P.S. Greg, as the owner of the buildbot, do you feel like reporting this > upstream? I get the impression that it's easier to do the reporting > directly from the NetBSD machine in question... I already reported the bug upstream: "Thank y

[issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: NetBSD bug report: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44057 -- ___ Python tracker <http://bugs.python.org/issue10

[issue9561] distutils: set encoding to utf-8 for input and output files

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: This issue might be splitted in multiple issue: one issue per file type (eg. Makefile, RPM spec file, etc.). -- ___ Python tracker <http://bugs.python.org/issue9

[issue10329] trace.py and unicode in Python 3

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: $ LANG=C ./python -m test.regrtest test_imp test_trace [1/2] test_imp [2/2] test_trace ... UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 5: ordinal not in range(128) issue10329.diff fixes this failure.

[issue10342] trace module cannot produce coverage reports for zipped modules

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: I commited Alexander's fix for #10329: r86303. The trace module now uses the input Python script encoding, instead of the locale encoding. -- ___ Python tracker <http://bugs.python.org/is

[issue1602] windows console doesn't print utf8 (Py30a2)

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: I don't understand exactly the goal of this issue. Different people described various bugs of the Windows console, but I don't see any problem with Python here. It looks like it's just not possible to display correctly unicode with the Windo

[issue10342] trace module cannot produce coverage reports for zipped modules

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: +try: +with open(filename, 'rb') as fp: +encoding, _ = tokenize.detect_encoding(fp.readline) +except IOError: +encoding = None You should use 'utf-8' instead of N

[issue10348] multiprocessing: use SYSV semaphores on FreeBSD

2010-11-07 Thread STINNER Victor
New submission from STINNER Victor : Support POSIX semaphore on FreeBSD is recent, optional (eg. disabled by default in FreeBSD 7) and limited (30 semaphores). SYSV should be used instead because they are less limited or more adjustable (at runtime: POSIX semaphore requires to recompile the

[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: It looks like SysV semaphores are also preferred on Darwin. So I suppose that Mac OS X would also benefit of this issue. Maybe also other OSes (Solaris?). See also issue #7272. -- nosy: +jnoller title: multiprocessing: use SYSV semaphores on FreeBSD

[issue10308] Modules/getpath.c bugs

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: 3.2a3 chunk#2 cannot fail because PyUnicode_AsWideChar() only returns -1 if the first argument is NULL, whereas we just checked that decoded is not NULL. But it would be better to fix the variable type to avoid future bugs

[issue6058] Add cp65001 to encodings/aliases.py

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: Different tests proved that cp65001 can *not* be set as an alias to utf-8, and that's why I'm closing this issue. Anyway, I don't think that cp65001 is configured by default on any Windows setup. It is only set by the user, using the chcp com

[issue10329] trace.py and unicode in Python 3

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: > ... it complicates handling of the output of trace.py. > For each file you have to do the encoding detection dance again ... What? You just have to call one function! tokenize.open() :-) Well, ok, it's not commited yet, but it looks like most p

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

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: > Fatal Python error: Py_Initialize: Unable to get the locale encoding > SystemError: NULL result without error in PyObject_Call Gotcha! r86341 fixes PyUnicode_EncodeFS(): raise an error if _Py_char2wchar_() fails. The real problem is that PREFIX

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

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: > The real problem is that PREFIX is not decoded using _Py_charw2char() ... Fixed by r86345. -- ___ Python tracker <http://bugs.python.org/iss

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

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: Now I get an error in copy_scripts() function of Lib/distutils/command/build_scripts.py: this function adjusts Python shebang of installed Python scripts. The problem is that the shebang contains a non-ASCII character whereas the script is written into the

[issue10335] tokenize.open(): open a file with encoding detected from a coding cookie

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: Commited to Python 3.2 (r86346 + r86347). Thanks for your reviews. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10370] py3 readlines() reports wrong offset for UnicodeDecodeError

2010-11-08 Thread STINNER Victor
STINNER Victor added the comment: The error occurs in .readline(): .readline() fills a buffer by reading the file chunk by chunk. Each time a chunk is read, it is decoded by the stateful decoder. The problem is that the decoder doesn't know the file offset. Even if it knew, start an

[issue10359] ISO C cleanup

2010-11-09 Thread STINNER Victor
STINNER Victor added the comment: I commited a part of your patches: r86353 Remove ";" after function definition, invalid in ISO C r86354: [array] int => Py_UNICODE (my commit is a little bit different, but it is based on your patch) r86355: [_pickle] Remove useless comma, inv

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-09 Thread STINNER Victor
STINNER Victor added the comment: Oh, I also wrote a patch for the warnings error silently ignored: import_warnings_error.patch. -- Added file: http://bugs.python.org/file19561/import_warnings_error.patch ___ Python tracker <http://bugs.python.

[issue10308] Modules/getpath.c bugs

2010-11-11 Thread STINNER Victor
STINNER Victor added the comment: r86399 fixes the code checking PyUnicode_AsWideChar() failure. The following change is useless, it cannot overflow: -if (n + k > MAXPATHLEN) +if (k > MAXPATHLEN - n) k = MAXPATHLEN - n; n and k maximum values are MAXPATHLEN (and the m

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-11 Thread STINNER Victor
STINNER Victor added the comment: > Here is a patch. It moves warnings initialization after > io initialization (the latter being arguably more critical > than the former). Also adds two tests. initstdio() and initmain() may emit warnings. Eg. issue #8766 (which now have a

[issue10382] Command line error marker misplaced on unicode entry

2010-11-11 Thread STINNER Victor
STINNER Victor added the comment: See also #2382: I wrote patches two years ago for this issue. -- ___ Python tracker <http://bugs.python.org/issue10382> ___ ___

[issue10070] 2to3 wishes for already-2to3'ed files

2010-11-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker <http://bugs.python.org/issue10070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10134] test_email failures on Windows: end of line issue?

2010-11-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker <http://bugs.python.org/issue10134> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-16 Thread STINNER Victor
STINNER Victor added the comment: In Python 3, sys.stderr uses the 'backslashreplace' error handler. With C locale, sys.stderr uses the ASCII encoding and so the é unicode character is printed as \xe9. In Python 2, sys.stderr.errors is strict by default. It works if you specify

[issue3080] Full unicode import system

2011-02-22 Thread STINNER Victor
STINNER Victor added the comment: I started to commit some parts of the huge patch: r88515: Mark PyWin_FindRegisteredModule() as private r88516: Remove unused argument of _PyImport_GetDynLoadFunc() r88517 (3.3), r88518 (3.2): document encoding used by import functions

[issue3080] Full unicode import system

2011-02-22 Thread STINNER Victor
STINNER Victor added the comment: r88519: Mark _PyImport_FindBuiltin() argument as constant r88520: Add PyModule_GetNameObject() -- ___ Python tracker <http://bugs.python.org/issue3

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

2011-02-22 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch to fix input() on Windows: strip also \r. -- keywords: +patch Added file: http://bugs.python.org/file20852/input_rn.patch ___ Python tracker <http://bugs.python.org/issue11

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

2011-02-22 Thread STINNER Victor
STINNER Victor added the comment: C:\Python32>python Python 3.2 ... on win32 >>> import sys >>> for line in sys.stdin: ... print(repr(line)) ... hello 'hello\r\n' ^Z Oh yes, I confirm that there is a second bug: sys.stdi

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

2011-02-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20852/input_rn.patch ___ Python tracker <http://bugs.python.org/issue11272> ___ ___ Python-bugs-list m

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

2011-02-23 Thread STINNER Victor
STINNER Victor added the comment: Fixed in 3.3 (r88530) and 3.2 (r88531). Others versions are not affected. Thanks Duncan Booth, I added tests based on your stdintests.py script. I used directly stdin argument of Popen() instead of using cmd.exe to create the pipe (which is not portable

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

2011-02-23 Thread STINNER Victor
STINNER Victor added the comment: Fixed in 3.2 too (r88532). -- resolution: -> fixed status: pending -> closed ___ Python tracker <http://bugs.python.org/i

[issue3080] Full unicode import system

2011-02-23 Thread STINNER Victor
STINNER Victor added the comment: > This new failure is perhaps related: (...) test_reprlib Ah yes, yesterday, I tried to remember which test was impacted by the module change, but all tests passed on Linux. Anyway, it's now fixed b

[issue10791] Wrapping TextIOWrapper around gzip files

2011-02-23 Thread STINNER Victor
STINNER Victor added the comment: What is the problem with Python 3.2? It works correctly here: $ cat bla.txt bli blo bla $ gzip bla.txt $ ./python Python 3.3a0 (unknown, Feb 23 2011, 13:03:50) >>> import gzip, io >>> f = io.TextIOWrapper(gzip.open("bla.txt.gz"),

[issue10791] Wrapping TextIOWrapper around gzip files

2011-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Yes, a clear definition of the minimum requirements for being wrapped > by TextIOWrapper sounds like a necessary thing to have About that: is read1() argument mandatory or not? In _pyio, BufferedIOBase.read1() argument is optional (default

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

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

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: I think that the normalization function in unicodeobject.c (only used for internal functions) can skip any character different than a-z, A-Z and 0-9. Something like: >>> import re >>> def normalize(name): return re.sub("[^a

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: Patch implementing my suggestion. -- Added file: http://bugs.python.org/file20875/aggressive_normalization.patch ___ Python tracker <http://bugs.python.org/issue11

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20875/aggressive_normalization.patch ___ Python tracker <http://bugs.python.org/issue11303> ___ ___

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: Ooops, I attached the wrong patch. Here is the new fixed patch. Without the patch: >>> import timeit >>> timeit.Timer("'a'.encode('latin1')").timeit() 3.8540711402893066 >>> timeit.Timer("'

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: Python 3.2 has a _posixsubprocess: some parts of subprocess are implemented in C. Can you try it? Python 3.2 uses also pipe2(), if available, to avoid the extra fcntl(4, F_GETFD)+fcntl(4, F_SETFD, FD_CLOEXEC). I suppose that the pipe and mmap(NULL, 1052672

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: >> That won't work, Victor, since it makes invalid encoding >> names valid, e.g. 'utf(=)-8'. > .. but this *is* valid: ... Ah yes, it's because of encodings.normalize_encoding(). It's funny: we have 3 functions

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-24 Thread STINNER Victor
STINNER Victor added the comment: > more_aggressive_normalization.patch Woops, normalizestring() comment points to itself. normalize_encoding() might also points to the C implementations, at least in a "# comment". -- ___ Python t

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread STINNER Victor
STINNER Victor added the comment: > r88586: Normalized the encoding names for Latin-1 and UTF-8 to > 'latin-1' and 'utf-8' in the stdlib. Why did you do that? We are trying to find a solution together, and you change directly the code without any review. Your commi

[issue11322] encoding package's normalize_encoding() function is too slow

2011-02-25 Thread STINNER Victor
STINNER Victor added the comment: We should first implement the same algorithm of the 3 normalization functions and add tests for them (at least for the function in normalization): - normalize_encoding() in encodings: it doesn't convert to lowercase and keep non-ASCII le

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread STINNER Victor
STINNER Victor added the comment: > For other spellings like "utf8" or "latin1", I wonder > if it would be useful to emit a warning/suggestion to use > the standard spelling. Why do you want to emit a warning?

[issue11329] PyEval_InitThreads() not safe before Py_Initialize()

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

[issue11329] PyEval_InitThreads() not safe before Py_Initialize()

2011-02-27 Thread STINNER Victor
STINNER Victor added the comment: Can you write a patch for the documentation? -- ___ Python tracker <http://bugs.python.org/issue11329> ___ ___ Python-bug

[issue11358] Please replace the use of pickle in multiprocessing with json.

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

[issue11359] Please replace the use of pickle in subprocess with json.

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Why do you want to replace pickle by json? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11359> ___ ___ Pytho

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
New submission from STINNER Victor : "Buildroot: Making Embedded Linux easy" has patches for Python 2.7 to simplify the cross-compilation of Python: http://git.buildroot.net/buildroot/tree/package/python The maintainer, Thomas Petazzoni, told me that the 12 first patches are

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: buildroot-python-patches.tar.gz: today checkout of the git repository (package/python). -- Added file: http://bugs.python.org/file20965/buildroot-python-patches.tar.gz ___ Python tracker <http://bugs.python.

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: buildboot.patch: the 12 patches combined into a single patch for Python 2.7. Note: python-2.7-001-support-for-build.patch doesn't apply cleanly on release27-maint. -- keywords: +patch Added file: http://bugs.python.org/file20966/buildroot.

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: I uploaded the patch to Rietveld for a review: http://codereview.appspot.com/4253047 > Well, the patches should be first ported to 3.3 Ok, I will ask the author if he can do this job. I uploaded the patches for Python 2.7 for a review and to open

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

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Fixed in Python 3.3 (r88697) and 3.2 (r88698). Thank you Ray. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10911] cgi: add more tests

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: I commited your patch with minor changes (e.g. I kept f.close()) to Python 3.3 (r88700) and 3.2 (r88701). Thank you Pierre. -- ___ Python tracker <http://bugs.python.org/issue10

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

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Fixed in Python 3.3 (r88702+r88703). I don't really want to backport it to 3.2, 3.1 or 2.7, because the patch is complex, changes a very important function, and the fixed bug (don't crash on invalid format strings) is minor. If you would like the f

[issue10831] PyUnicode_FromFormatV() doesn't support %li, %lli, %zi

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Done in Python 3.3 (r88704+r88705). It was easier after fixing #10829. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: I still consider that ASCII format strings should be enough for everyone. > > If someone does that, (s)he should open a new issue for that :-) > > Why new issue? Ok, so I just remove myself from t

[issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString()

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Fixed in Python 3.3: r88708 removes errors argument of _PyUnicode_AsDefaultEncodedString(), r88709 caches the result of str.encode(). > replace all uses of _PyUnicode_AsDefaultEncodedString() > with PyUnicode_AsUTF8String() It makes the code more c

[issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString()

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

[issue8967] Create PyErr_GetWindowsMessage() function

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: This issue doesn't solve any real issue. I prefer to close it because I don't need it anymore. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.p

[issue10338] test_lib2to3 failure on buildbot x86 debian parallel 3.x: node is None in find_root()

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: There is no more such bug on this buildbot. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

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

[issue10911] cgi: add more tests

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

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: subprocess_errpipe_buffer.patch: Patch for 2.7 which improve by 30% the dummy benchmark (run /bin/false 10,000 times). It avoids the creation of the 1 MB buffer: start with a buffer of a single byte (just to check if there is data or if the pipe was closed

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: Quick benchmark: - fork(), execv(), waitpid(): 19081.1 ms - os.popen(): 25769.8 ms - subprocess.Popen(): 40025.8 ms - subprocess.Popen() patched: 26155.2 ms I tested Python 2.7 (debug build) on Linux (Debian Sid) with a Pentium 4 (Hyperthreading, 2 fake

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: pitrou> Victor, your patch doesn't even apply on 3.x. pitrou> That code doesn't exist anymore... subprocess.Popen() does still read errpipe_read, but using a buffer of 50,000 bytes instead of 1 MB (the traceback is not more send to th

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: > os.popen is 41% is slower than subprocess: I suppose that it > is the usage of stdout=PIPE (creation of the pipe) which make > it slower Oh no, it's because os.popen() calls subprocess.Popen() with shell=True: the overhead is the shell. Noth

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: As written by Charles-Francois Natali (msg129890), we can use closefrom(). Pseudo-code: find the biggest fd than that be kept open, call closefrom(highest+1), and then use close() (os.closerange) for fd in 0..highest that have to be closed. closefrom() is

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: Benchmark on subprocess with a less trivial example. Run 100x python -c pass: 8.63 sec without my patch, 8.53 sec with my patch => only 1% faster, so the patch is just useless on a real world example. Finally, I think that there is just nothing to do

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: Benchmark extracted from #11314, Python 3.2 on Linux: subprocess("/bin/false", close_fds=True) is 22% slower than subprocess("/bin/false", close_fds=False). -- stage: -> patch review __

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread STINNER Victor
New submission from STINNER Victor : Extract of the documentation: 15.14.3.1. Win95/98 specific platform.popen(cmd, mode='r', bufsize=None) Portable popen() interface. Find a working popen implementation preferring win32pipe.popen(). On Windows NT, win32pipe.popen() shoul

<    21   22   23   24   25   26   27   28   29   30   >