[issue12114] packaging.util._find_exe_version(): potential deadlock

2011-05-19 Thread STINNER Victor
New submission from STINNER Victor : The following code does deadlock if the subprocess writes a lot of output to stdout and stderr: pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) try: stdout, stderr = pipe.stdout.read(), pipe.stderr.read() finally

[issue12112] The new packaging module should not use the locale encoding

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: I ported a distutils fix (for non-ASCII path) into packaging: New changeset cc5cfeaa4a8d by Victor Stinner in branch 'default': Issue #10419, issue #6011: port 6ad356525381 fix from distutils to packaging http://hg.python.org/cpython/rev/cc

[issue12116] io.Buffer*.seek() doesn't seek if "seeking leaves us inside the current buffer"

2011-05-19 Thread STINNER Victor
New submission from STINNER Victor : Example: with open("setup.py", "rb") as f: # read smaller than the file size to fill the readahead buffer f.read(1) # seek doesn't seek f.seek(0) print("f pos=", f.tell()) print("f.raw pos="

[issue12116] io.Buffer*.seek() doesn't seek if "seeking leaves us inside the current buffer"

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Note: _pyio.BufferedReader(), _pyio.BufferedWriter(), _pyio.BufferedRandom() don't use this optimization. They might be patched too. -- ___ Python tracker <http://bugs.python.org/is

[issue12116] io.Buffer*.seek() doesn't seek if "seeking leaves us inside the current buffer"

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: And how can I seek the raw file to zero? Using buffer.raw.seek(0), buffer.tell() becomes inconsistent: $ ./python Python 3.2.1b1 (3.2:bd5e4d8c8080, May 15 2011, 10:22:54) >>> buffer=open('setup.py', 'rb') >>&

[issue12112] The new packaging module should not use the locale encoding

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: What is the MainProgram.inspect_file() function in packaging.create? Which kind of file should it process? => What is the encoding of the input files? -- ___ Python tracker <http://bugs.python.org/issu

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Using spawn_python() to check that os.O_CLOEXEC flag is correctly set seems overkill. Why not just testing fcntl.fcntl(f.fileno(), fcntl.F_GETFL) & FD_CLOEXEC)? I don't think that there are OSes with O_CLOEXEC but without fcntl(F_GETFL). > Note

[issue12124] python -m test test_packaging test_zipimport failure

2011-05-19 Thread STINNER Victor
New submission from STINNER Victor : "python -m test test_packaging test_zipimport" fails with: == FAIL: testAFakeZlib (test.test_zipimport.CompressedZipImpo

[issue12124] python -m test test_packaging test_zipimport failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: OMG! I understood why the bug was not seen before: "python -m test test_zipimport test_zipimport" succeed because test_zipimport REMOVES testAFakeZlib tests after the first run! New patch to remove this ugly hack (it is no more needed with my pa

[issue12124] python -m test test_packaging test_zipimport failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: "test_zipimport REMOVES testAFakeZlib tests after the first run" hack was introduced by a commit supposed to "test zipimport a bit more" :-) changeset: 36383:7b3d915b6e9d branch: legacy-trunk user:Neal Norwitz date:

[issue12125] test_sysconfig fails on OpenIndiana because of test_packaging

2011-05-19 Thread STINNER Victor
New submission from STINNER Victor : It looks like a test of test_packaging removes some data from sysconfig._SCHEMES: http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/1239/steps/test/logs/stdio

[issue12118] test_imp failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #12117. -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12119] test_distutils failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #12117. -- nosy: +haypo resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12123] test_import failures

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #12117. -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12122] test_runpy failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #12117. -- nosy: +haypo resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12120] test_packaging failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #12117. -- nosy: +haypo resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12117] test_importlib failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: The following issues has been marked as a duplicate of this issue: - issue #12118 (test_imp) - issue #12119 (test_distutils) - issue #12120 (test_packaging) - issue #12122 (test_runpy) - issue #12123 (test_import) Tarek did the following commit to try to

[issue12117] test_importlib failure

2011-05-19 Thread STINNER Victor
STINNER Victor added the comment: Traceback of the duplicate issues: == ERROR: test_issue5604 (test.test_imp.ImportTests) -- Traceback (most recent call last

[issue12117] test_importlib failure

2011-05-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +alexis, eric.araujo ___ Python tracker <http://bugs.python.org/issue12117> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12117] Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import

2011-05-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_importlib failure -> Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import ___ Python tracker <http://bugs.python.org/issu

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-20 Thread STINNER Victor
STINNER Victor added the comment: > Why not to implement 'e' letter in py3k ? > > In systems where O_CLOEXEC is not supported in open(), flag should be set > non-atomically using fcntl. Having an atomic or non-atomic behaviour depending on the

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread STINNER Victor
STINNER Victor added the comment: > that patch looks good I tested it with non-ASCII interface names: it works as expected with ASCII and UTF-8 locales. It's the first time that I see the "O&" format for Py_BuildValue(), I didn't know this one. The patch looks good.

[issue12124] python -m test test_packaging test_zipimport failure

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

[issue4558] with_stdc89

2011-05-20 Thread STINNER Victor
STINNER Victor added the comment: Is it still useful to ensure that ISO C89 compilers are supported in 2011? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue4

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-05-20 Thread STINNER Victor
STINNER Victor added the comment: +kill(getpid(), SIGINT); kill() doesn't exist on Windows: use raise() which is more portable and doesn't require a PID argument. We may need to do something on Windows for console applications: see SetConsoleCtrlHandler(), http://msdn.mic

[issue12057] HZ codec has no test

2011-05-20 Thread STINNER Victor
STINNER Victor added the comment: I think that issue #12100 should be fixed (wontfix/fixed) before this one. -- dependencies: +Incremental encoders of CJK codecs reset the codec at each call to encode() ___ Python tracker <http://bugs.python.

[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

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

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

2011-05-22 Thread STINNER Victor
STINNER Victor added the comment: > Victor, you broke the Solaris gcc buildbot on 2.7. It should be fixed by d5771ed4ec4e. -- status: open -> closed ___ Python tracker <http://bugs.python.org/i

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

2010-11-19 Thread STINNER Victor
STINNER Victor added the comment: On Friday 19 November 2010 20:42:53 you wrote: > Alexander Belopolsky added the comment: > > I don't understand Victor's argument in msg115889. According to UTF-8 RFC, > <http://www.ietf.org/rfc/rfc2279.txt>: > >

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

2010-11-19 Thread STINNER Victor
STINNER Victor 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 -expor

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

2010-11-19 Thread STINNER Victor
STINNER Victor 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_

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

2010-11-22 Thread STINNER Victor
STINNER Victor 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 <http://bugs.pyth

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

2010-11-26 Thread STINNER Victor
New submission from STINNER Victor : 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 in Python3. -- assignee: d

[issue10541] regrtest.py -T broken

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

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread STINNER Victor
STINNER Victor 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 abl

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

2010-12-01 Thread STINNER Victor
STINNER Victor added the comment: About the topic: > subprocess seems to use local 8-bit encoding and gives no choice I don't understand that: by default, Python 2 and Python 3 use byte strings, so there is no encoding (nor error handler). I don't see how you can get unicode f

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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(), encoding=..., err

[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 : 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 is UTF-8 (which is the

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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, it is

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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 the current b

[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 : -- nosy: +amaury.forgeotdarc, lemburg ___ Python tracker <http://bugs.python.org/issue10601> ___ ___ Python-bugs-list mailin

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

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue9198> ___ ___ Python-bugs-list

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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 defau

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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 encoded to the ANSI cod

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

2010-12-01 Thread STINNER Victor
STINNER Victor added the comment: See also #10601: "sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout". -- ___ Python tracker <http://bugs.python.o

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

2010-12-01 Thread STINNER Victor
STINNER Victor 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, bu

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor 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 but (BIGCHUNK-1)*2

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor 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 <http://bugs.python.org/issue9

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19898/read_write_32bits.patch ___ Python tracker <http://bugs.python.org/issue9611> ___ ___ Python-bug

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

2010-12-02 Thread STINNER Victor
STINNER Victor added the comment: Great! -- ___ Python tracker <http://bugs.python.org/issue10603> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10557] Malformed error message from float()

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

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread STINNER Victor
STINNER Victor 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 ___ Python trac

[issue10197] subprocess.getoutput fails on win32

2010-12-03 Thread STINNER Victor
STINNER Victor 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, but it is not used in Python

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor 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 a KeyboardInterrupt

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor 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 it solve this issue

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor 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 it solve this issue

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg123242 ___ Python tracker <http://bugs.python.org/issue10478> ___ ___ Python-bugs-list m

[issue10478] Ctrl-C locks up the interpreter

2010-12-03 Thread STINNER Victor
STINNER Victor 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 that using buffere

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
New submission from STINNER Victor : 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 method

[issue6780] startswith error message is incomplete

2010-12-03 Thread STINNER Victor
STINNER Victor added the comment: See also #10616. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue6780> ___ ___ Python-bugs-list mailin

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
STINNER Victor added the comment: See also #6780. -- ___ Python tracker <http://bugs.python.org/issue10616> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-03 Thread STINNER Victor
STINNER Victor 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 <

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

2010-12-04 Thread STINNER Victor
STINNER Victor added the comment: Commited to Python 3.2 (r87054). -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

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

2010-12-08 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r87135. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue10546> ___ __

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread STINNER Victor
STINNER Victor added the comment: Can you add a test to your patch? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7213> ___ ___ Python-bug

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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* errors (where I did the

[issue2857] add codec for java modified utf-8

2010-12-10 Thread STINNER Victor
STINNER Victor 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? -- ___ Python

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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() -> retur

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

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

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

2010-12-11 Thread STINNER Victor
Changes by STINNER Victor : -- 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 <http://bugs.python.org/issu

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor 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 (and so it will test the C

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor 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 Can you try to

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor 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. AC_CHECK_FUNC() doesn&#

[issue7213] Popen.subprocess change close_fds default to True

2010-12-11 Thread STINNER Victor
STINNER Victor 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. +data

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

2010-12-12 Thread STINNER Victor
STINNER Victor 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. Should we

[issue3080] Full unicode import system

2010-12-14 Thread STINNER Victor
STINNER Victor 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 it on your

[issue3080] Full unicode import system

2010-12-14 Thread STINNER Victor
STINNER Victor 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 it on your

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

2010-12-16 Thread STINNER Victor
STINNER Victor 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 the normaliza

[issue2736] datetime needs an "epoch" method

2010-12-17 Thread STINNER Victor
STINNER Victor 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 resolution than th

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

2010-12-17 Thread STINNER Victor
STINNER Victor 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 o

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

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19214/segfault_handler-5.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19227/segfault_handler-6.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19288/segfault_handler-7.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19289/segfault_handler-8.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-17 Thread STINNER Victor
STINNER Victor 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 c

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

2010-12-19 Thread STINNER Victor
STINNER Victor added the comment: > Why was sys.setsegfaultenabled() omitted? Just because I forgot your message, sorry. -- ___ Python tracker <http://bugs.python.org/iss

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

2010-12-19 Thread STINNER Victor
STINNER Victor 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() and _testcapi.sigbus() send

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

2010-12-20 Thread STINNER Victor
STINNER Victor 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&quo

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

2010-12-20 Thread STINNER Victor
STINNER Victor 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 <http://bugs.python.org/issue8

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

2010-12-22 Thread STINNER Victor
STINNER Victor 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" command line optio

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20102/segfault_handler-9.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20113/segfault_handler-10.patch ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Pytho

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue8863> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2010-12-22 Thread STINNER Victor
STINNER Victor added the comment: > Does the latest patch address the GIL/multithreading issues? Yes. -- ___ Python tracker <http://bugs.python.org/iss

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

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

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

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

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

2010-12-22 Thread STINNER Victor
STINNER Victor 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? It is very dependent of

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

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

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

2010-12-23 Thread STINNER Victor
New submission from STINNER Victor : 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, poll and the optimizati

<    28   29   30   31   32   33   34   35   36   37   >