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

2010-11-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: My build error seems actually unrelated to encoding issues. Working directory is ASCII-only, locale is UTF-8. $ ./configure --with-pydebug [snip] $ make [snip] ranlib libpython3.2dm.a gcc -pthread -Xlinker -export

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

2010-11-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: On Friday 19 November 2010 21:58:25 you wrote: I choosed to use ASCII instead of UTF-8, because an UTF-8 decoder is long (210 lines) and complex (see PyUnicode_DecodeUTF8Stateful()), whereas ASCII decode is just: unicode_char

[issue9771] add an optional default argument to tokenize.detect_encoding

2010-11-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: no cookie found, returns ('utf-8', [line1, line2]) I never understood the usage of the second item. IMO it should be None if no cookie found. -- ___ Python tracker rep

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-11-26 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Python3 doc tells that UTF-16-LE and UTF-16-BE only support BMP characters. What? I think that it is wrong. It was maybe wrong with Python2 and narrow build (unichr() only supports BMP characters), but it is no more true

[issue10541] regrtest.py -T broken

2010-11-26 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10541 ___ ___ Python

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't like macro having a result and using multiple instructions using the evil magic trick (the ,). It's harder to maintain the code and harder to debug than a classical function. Don't you think that modern compilers are able

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: ... it always seems to use the local 8-bit encoding The locale encoding is not necessary a 8-bit encoding, it can by a multibyte like... UTF-8 :-) -- subprocess.patch: You should maybe use io.open(process.stdout.fileno

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: On Windows, the Python interpreter fails to display a result if stdout encoding is unable to encode it. This problem exists since Python 3.0. Eg. see issue #1602. This problem is not specific to Windows. Even if stdout encoding

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is opposed to the PEP 3128: Default error-handler of sys.stdout should be 'backslashreplace'. Stuff written to stdout might be consumed by another program that might misinterpret the escapes. For interactive session

[issue9198] Should repr() print unicode characters outside the BMP?

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I created a new issue for Ezio's proposition to patch sys.displayhook: issue #10601. To answer the initial question, Should repr() print unicode characters outside the BMP?, Marc-Andre, Ezio and me agree that we should keep

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +amaury.forgeotdarc, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10601

[issue9198] Should repr() print unicode characters outside the BMP?

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is opposed to the PEP 3128: Default error-handler of sys.stdout should be 'backslashreplace' Oops sorry, no it is not opposed to the PEP (this issue doesn't propose to change the default error handler

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Use surrogateescape error handler to decode a Windows path is not a good idea. On Windows, the problem is not to decode a path (ANSI = wide char), but to encode a path (wide char = ANSI) to use a function expecting bytes path

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

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10601: sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: If it's an env variable, though, it should be clear that it's CPython-specific, so I'm not sure how to call it. Why do you think that only this variable is CPython-specific? CPython has an option called PYTHONDONTWRITEBYTECODE

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I agree that clamping is a nice solution, and attached patch implements it. About the question of the loop: FileIO.readall() uses while(1) without checking for signals. It looks like new_buffersize() maximum size is not BIGCHUNK

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: (oops, the patch contained unrelated changes: remove trailing spaces) -- Added file: http://bugs.python.org/file19899/read_write_32bits.patch ___ Python tracker rep...@bugs.python.org

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19898/read_write_32bits.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611

[issue10603] __file__ not usable, with certain paths on windows XP.

2010-12-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Great! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10603 ___ ___ Python-bugs

[issue10557] Malformed error message from float()

2010-12-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: -haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10557 ___ ___ Python-bugs

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @Hirokazu: Can you attach a small test archive? Yes, we can add a default_encoding attribute to ZipFile and add an optional default_encoding argument to its constructor. -- nosy: +haypo

[issue10197] subprocess.getoutput fails on win32

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: -def getstatusoutput(cmd): +def getstatusoutput(cmd, shell=True): shell=True is dangerous, it can lead to shell command injection. I would prefer to set its default value to False. The function already exists in Python 3.1

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Dummy question: why don't you use KeyboardInterrupt instead of a custom SIGINT handler? try: for i in range(100): print(i) except KeyboardInterrupt: print(got sigint) Python SIGINT handler raises

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock instead of Lock, but RLock was implemented in Python and were too slow. Today, we have RLock implemented in C and it may be possible to use them. Would

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock instead of Lock, but RLock was implemented in Python and were too slow. Today, we have RLock implemented in C and it may be possible to use them. Would

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- Removed message: http://bugs.python.org/msg123242 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10478

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, so +1 to apply immediatly your patch which fixes the deadlock. If someone is motived to make Buffered* classes reentrant, (s)he can remove this exception. io and signal documentation should also be improved to indicate

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: b'abc'.partition(':') raises a confusing TypeError('expected an object with the buffer interface'): what is a buffer? what is the buffer interface? The error comes from PyObject_AsCharBuffer() which is used by: - bytes methods

[issue6780] startswith error message is incomplete

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10616. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6780

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #6780. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: complex(): raise a better but incomplete error message on error (complex() arg is not a string), incomplete because number is not mentionned Fixed by r86977. -- ___ Python tracker rep

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited to Python 3.2 (r87054). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10601

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-12-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87135. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10546

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you add a test to your patch? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: issue6697-lsprof.diff: - Oh, I did recently a similar change on PyModule: I created PyModule_GetFilenameObject() - PyObject * mod = PyObject *mod - modname is not initialized if fn-m_module (mod) is NULL = initialize modname

[issue10642] site.py crashes on python startup due to defective .pth file

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Yes, I patched the C code to not clear exceptions anymore at startup: r78826 (issue #3137). But this issue is different: here the bug is in the 3rd party module (loaded by site.py), not in Python, and Donald proposes to *ignore

[issue2857] add codec for java modified utf-8

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I wonder if tkinter should use this encoding. Tkinter is used to build graphical interfaces. I don't think that users write nul bytes with their keyboard. But there is maybe a use case

[issue10492] test_doctest fails with iso-8859-15 locale

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You can reproduce the bug with: $ lang=fr_fr.iso885...@euro ./python -c 'import pdb; pdb.Pdb(nosigint=True).run(exec(%r) % x=12)' /home/haypo/prog/SVN/py3k/Lib/encodings/iso8859_15.py(15)decode() - return codecs.charmap_decode

[issue10492] test_doctest fails with iso-8859-15 locale

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See a more complex solution: #3080 (don't decode the filename in the parser, keep unicode strings). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10492

[issue10642] Improve the error message of addpackage() (site.py) for defective .pth file

2010-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: site.py crashes on python startup due to defective .pth file - Improve the error message of addpackage() (site.py) for defective .pth file ___ Python tracker rep...@bugs.python.org

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess-cloexec-atomic-py3k-tests2-close_fds.patch adds a test called to Win32ProcessTestCase which is specific to Windows. And this class has already a test with the same name. You should move your test to ProcessTestCase

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess-cloexec-atomic-py3k-tests2-close_fds.patch adds a test called [test_close_fds] to Win32ProcessTestCase ... Oops, forget my last comment, I didn't applied the patches in the right order. There are too much patches :-p

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess-cloexec-atomic-py3k.patch: +case $ac_sys_system in + GNU*|Linux*) + AC_CHECK_FUNC(pipe2, AC_DEFINE(HAVE_PIPE2, 1, [Define if the OS supports pipe2()]), ) +esac I think that you can remove the test on the OS name

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: test_pipe_cloexec_unix_tools() is specific to UNIX/BSD because it requires cat and grep programs. You should try to reuse the Python interpreter to have a portable test (eg. working on Windows), as you did with fd_status.py

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: fd_status.py: +try: +_MAXFD = os.sysconf(SC_OPEN_MAX) +except: +_MAXFD = 256 It looks like this code (256 constant) comes from subprocess.py. Is that a good value? On Linux, SC_OPEN_MAX is usually 1024, and it can be 4096

[issue3080] Full unicode import system

2010-12-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Haypo describes his complicated patch as useful on Windows, but not critical Usecase on Windows: your japanese friend gives you an USB key (eg. created on Windows with code page 932) with his Python project, you cannot run

[issue3080] Full unicode import system

2010-12-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Haypo describes his complicated patch as useful on Windows, but not critical Usecase on Windows: your japanese friend gives you an USB key (eg. created on Windows with code page 932) with his Python project, you cannot run

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ooops, sorry. I just applied the patch suggested by Marc-Andre Lemburg in msg22885 (#1054943). As the patch worked for the examples given in Unicode PRI 29 and the test suite passed, it was enough for me. I don't understand

[issue2736] datetime needs an epoch method

2010-12-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like it's not possible to choose between float and (int, int) output type for datetime.totimestamp(). One is more practical (and enough for people who doesn't need an exact result), and one is needed to keep the same

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 9 of my patch: - Create PYTHONNOHANDLER environment variable: don't install the signal handler if the variable is set - Rename Segfault by FaultHandler - reverse_string() does nothing if len==0, even if it cannot occur

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19214/segfault_handler-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19227/segfault_handler-6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19288/segfault_handler-7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19289/segfault_handler-8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I'm tired... Summary of the patch: - ...abort the process (call the debugger on Windows) (the debugger is only called if Python is compiled in debug mode) - Add PYTHONNOHANDLER environment variable ... Oops, the correct

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Why was sys.setsegfaultenabled() omitted? Just because I forgot your message, sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 10 of my patch: - the fault handler restores the previous signal handler instead of calling (DebugBreak() and) abort(): the previous signal handler will be called later to keep the orignal behaviour - _testcapi.sigill

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le lundi 20 décembre 2010 07:55:08, vous avez écrit : +#define NFAULT_SIGNALS (sizeof(fault_signals) / sizeof(fault_signals[0])) +static fault_handler_t fault_handlers[4]; , should use NFAULT_SIGNALS instead of 4. Ah yes

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The fault handler is unable to retrieve the thread state if the GIL is released. I will try to fix that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 11 of my patch: - Disable the fault handler (and displaying the backtrace on a fatal error) by default - The fault handle can be enabled by setting the PYTHONFAULTHANDLER environment variable or using -X faulthandler

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20102/segfault_handler-9.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20113/segfault_handler-10.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863 ___ ___ Python

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Does the latest patch address the GIL/multithreading issues? Yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:45 +, Alexander Belopolsky a écrit : As I suggested on python-dev, I also think this belongs to a separate module rather than core or sys. Why do you want to move it outside Python core

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Note: To avoid the signal-safe requirement, another solution is to use sigsetjmp()+siglongjmp(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: If more than one file (stdin, stdout and stderr) are pipes, Popen.communicate() uses threads calling _readerthread() on each pipe. But this method doesn't close the pipes, whereas all other communicate implementations (select

[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10763

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tested the patch version 11 on Windows: all tests pass. But #include unistd.h should be skipped on Windows (Python/fault.c): I will add #ifdef MS_WINDOWS. -- ___ Python tracker rep

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tested the patch version 11 on Windows: all tests pass. Oh, and I forgot to say that the Windows fault handler does catch the fault too (Windows opens a popup with a question like Should the error be reported to Microsoft

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Tested on FreeBSD 8: all tests pass (all of the 4 signals are supported) and FreeBSD dumps a core file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Tested on Ubuntu 10.04: all tests pass and apport intercepts the fault. Apport ignores the faults because I am testing a Python executable compiled from SVN (py3k). Apport logs (/var/log/apport.log): --- apport (pid 18148) Thu Dec

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: p3k_i9313.diff is just a workaround, not the correct fix. The problem is that PyTokenizer_FindEncoding() doesn't get the filename. I wrote tokenizer_encoding_filename.patch which add PyTokenizer_FindEncodingFilename() and patch

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #9738 (Document the encoding of functions bytes arguments of the C API) to check which encoding is expected :-p -- ___ Python tracker rep...@bugs.python.org http

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Georg rejected this patch in Python 3.2: I did say I like the feature, but that was a) before beta 2 was released, now the next release is a release candidate, and b) this thread showed that it is not at all obvious how the feature

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

2010-12-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le vendredi 24 décembre 2010 à 14:46 +, Baptiste Carvello a écrit : the patch solves the bug for me as well (using locale C, the filesystem encoding is utf-8). However, I do not understand why the patch checks

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

2010-12-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Update copy_script patch: add comments to explain why the shebang have to be decodable from UTF-8 and from the script encoding. -- Added file: http://bugs.python.org/file20165/copy_script-2.patch

[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87485 (Python 3.2). I don't want to fix it in 2.7 or 3.1, because maybe someone relies on this bug and it's a minor bug :-) Reopen the issue if you would like a backport. -- resolution: - fixed status: open

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

2010-12-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le samedi 25 décembre 2010 à 22:35 +, Éric Araujo a écrit : Victor: Your patch uses os.fsencode, so porting to distutils2 won’t be easy. In Python 3.1, you can replace name=os.fsencode(name) by name=name.encode

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r87504 documents encodings of error functions. r87505 documents encodings of unicode functions. r87506 documents encodings of AST, compiler, parser and PyRun functions. -- ___ Python

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: decoding_fgets() decodes the input filename from UTF-8 whereas the filename is encoded to the filesystem encoding. PyUnicode_DecodeFSDefault() should be used. decoding_fgets() raises a SyntaxError(Non-UTF-8 code starting

[issue10779] Change filename encoding to FS encoding in PyErr_WarnExplicit()

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: PyErr_WarnExplicit() expects a filename encoded to UTF-8. This function is only called twice in the Python interpreter: compiler_assert() (with assertion is always true, perhaps remove parentheses?) and symtable_warn() (eg

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #10779 (Change filename encoding to FS encoding in PyErr_WarnExplicit()). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10778

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: While documenting encodings, I found two issues: #10778 and #10779. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9738

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: PyErr_SetFromWindowsErrWithFilename() expects a filename encoded to UTF-8. It is called by win32_error() function of the nt (posix) module, and win32_error() is called on an error in the bytes implementation of a function

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: issue10780.patch fixes this issue. -- keywords: +patch Added file: http://bugs.python.org/file20171/issue10780.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: issue10780_mbcs_ignore.patch is a safer but more complex fix: use mbcs decoder with the ignore error handler. Even if issue10780.patch might raise a UnicodeDecodeError, I prefer it because it's shorter, simpler and so easier

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, ignore indenterror() (inconsistent use of tabs and spaces in indentation) and, I forgot to remove it. indenterror() is correct. -- ___ Python tracker rep...@bugs.python.org http

[issue8719] buildbot: segfault on FreeBSD (signal 11)

2010-12-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: https://github.com/haypo/faulthandler/wiki can be tried on this buildbot to get more information about this issue. But the module have to be installed on this host. -- ___ Python

[issue10779] Change filename encoding to FS encoding in PyErr_WarnExplicit()

2010-12-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87517. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10779

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87518. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10778

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87519. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10780

[issue10783] struct.pack() and Unicode strings

2010-12-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This feature was introduced in a big commit from Guido van Rossum (made before Python 3.0): r55500. The changelog is strange because it starts with Make test_zipfile pass. The zipfile module now does all I/O in binary mode using

[issue10783] struct.pack() and Unicode strings

2010-12-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10783

[issue10785] parser: store the filename as an unicode object

2010-12-27 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: The Python parser stores the filename as a byte string. But it decodes the filename on error because most Python functions now use unicode strings. Instead of decoding the filename at error, which may raise a new error, I

[issue10785] parser: store the filename as an unicode object

2010-12-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20179/parse_filename_obj.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10785

[issue10785] parser: store the filename as an unicode object

2010-12-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file20180/parser_filename_obj.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10785

  1   2   3   4   5   6   7   8   9   10   >