[issue5035] Compilation --without-threads fails

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: _tkinter patch (r70641) was backported to py3k as r70707. py3k compiles fine without threads. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: Commited: r79278+r79280 (trunk), r79281 (py3k), r79282 (3.1), r79283 (2.6). -- ___ Python tracker <http://bugs.python.org/issue1583

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue1583863> ___ ___ Python-bugs-

[issue1503789] Cannot write source code in UTF16

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: This feature was requested only once, 4 years ago, so I don't think that the feature is a "must-have" :-) I think that a lot of code have to be modified in Python parser to support UTF-16-* and UTF-32-* codecs. Since there is no working pa

[issue1069092] segfault on printing nested sequences of None/Ellipsis

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: This issue is 6 years old. Python has some protections against stack overflow, but there is no perfect solution. Since there is no patch, I consider that I can close this issue (as wont fix). -- resolution: -> wont fix status: open ->

[issue4261] The pwd module doesn't distinguish between errors and no user

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: This issue is open since 2 years without any patch. It looks like the feature request is not really important, and I consider that we can close it. Reopen the issue (with a patch!) if you consider that this ticket is important. -- resolution

[issue4261] The pwd module doesn't distinguish between errors and no user

2010-03-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> wont fix ___ Python tracker <http://bugs.python.org/issue4261> ___ ___ Python-bugs-list mailing list Un

[issue6352] Compiler warning in unicodeobject.c

2010-03-23 Thread STINNER Victor
STINNER Victor added the comment: > Apparently this was never backported to 3.1. done: r79335 (py3k). -- ___ Python tracker <http://bugs.python.org/iss

[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-23 Thread STINNER Victor
New submission from STINNER Victor : configure.in uses AC_PROG_CC, extract of the autoconf manual: (http://www.delorie.com/gnu/docs/autoconf/autoconf_64.html) If using the GNU C compiler, set shell variable GCC to `yes'. If output variable CFLAGS was not already set, set it to `-g -O2

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread STINNER Victor
STINNER Victor added the comment: -u is not ignored, but use line buffering: see issue #4705 and commit r68977. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue8213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-23 Thread STINNER Victor
STINNER Victor added the comment: > (or to fix it, but that's a major task - the whole CFLAGS > and LDFLAGS system used in Python's configure has over the > years turned into a complete mess). What do you mean by "a complete mess"? Did you try my patch? Is it

[issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated

2010-03-23 Thread STINNER Victor
New submission from STINNER Victor : http://docs.python.org/py3k/c-api/arg.html contains some ambiguous (string or Unicode object) definitions: what is a string? what is an unicode object? Is it a string or not? The problem is that the documentation is for Python2: the code was changed, but

[issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated

2010-03-23 Thread STINNER Victor
STINNER Victor added the comment: See also issue #2322. -- ___ Python tracker <http://bugs.python.org/issue8215> ___ ___ Python-bugs-list mailing list Unsub

[issue8223] memoryview is not documented in the Python library doc

2010-03-24 Thread STINNER Victor
New submission from STINNER Victor : memoryview() is not documented in the Python Library documentation, only in the C API ("buffer" chapiter) :-/ http://docs.python.org/c-api/buffer.html See also #8215. -- assignee: georg.brandl components: Documentation messages: 1

[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Use : ... print(i, end=' ') ... sys.stdout.flush() ... time.sleep(1) -- ___ Python tracker <http://bugs.python.

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
New submission from STINNER Victor : sys.setfilesystemencoding() doesn't check if the argument is a valid encoding name. If the filesystem encoding is invalid, open("a") goes into an unlimited loop. The default recursion limit is 1000, but the example crash at 930: too bad

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Attached patch raises a LookupError is the specified encoding is invalid. It uses _PyCodec_Lookup() function: is it allowed in bltinmodule.c? -- keywords: +patch Added file: http://bugs.python.org/file16635/setfilesystemencoding.patch

[issue8227] Fix C API documentation: Argument parsing

2010-03-24 Thread STINNER Victor
New submission from STINNER Victor : Patch fixing Doc/c-api/arg.rst: * 'z', 'z#', 'z*' does also accept Unicode * unify types name: replace "string or Unicode objet" by "string or Unicode" (it's shorter ;-)) See also #8215 a

[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: MaL> It unconditionally overrides CFLAGS - even if it is not MaL> set and defined by AC_PROG_CC as "-g -O2". That would need MaL> to be corrected. MaL> MaL> Other than that it does help a little work around the mess :-) I commite

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Commited: r79393 (py3k), r79394 (3.1). -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8076] sys.setfilesystemencoding('foo') causes segmentation fault

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of #8226 (ok, it should be the opposite, but #8226 had a patch ;-)). -- nosy: +haypo resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: > I commited my patch: r79392 (trunk). I'm waiting for the buildbots before > porting to other branches :-) The buildbots look happy => r79401 (py3k), blocked in 2.6 and 3.1 The issue title was "configure: ignore AC_PROG_CC hardcoded CFL

[issue8203] IDLE about dialog credits raises UnicodeDecodeError

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Can you try this patch? The encoding argument was just ignored... -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file16638/idlelib_textView_encoding.patch ___ Python tracker <h

[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: This issue might be documentation is subprocess documentation. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8

[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Oops. I wanted to write: "This issue might be documented in subprocess documentation" :-/ -- ___ Python tracker <http://bugs.python.

[issue8214] Add exception logging function to syslog module

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: syslog_exception() should be declared outside logexceptions(), so it's possible to call it directly. Example: try: ... except Exception: syslog_exception(*sys.exc_info()) -- nosy: +haypo ___ Python tr

[issue6543] traceback presented in wrong encoding

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: > in compile.c, the c_filename member has utf8 encoding The problem is maybe that c_filename should be an unicode object created using the file system default encoding and the surrogateescape error handler, to be able to store undecodable filenames (use

[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-25 Thread STINNER Victor
STINNER Victor added the comment: MaL> The patch you checked in still unconditionally overrides the MaL> CFLAGS setting applied by AC_PROG_CC in case no CFLAGS variable MaL> is set. MaL> MaL> The issue now is: AC_PROG_CC no longer initializes CFLAGS MaL> if not set.

[issue8214] Add exception logging function to syslog module

2010-03-25 Thread STINNER Victor
STINNER Victor added the comment: > Once it's moved into syslog, maybe syslog_exception named > syslog.log_exception. In that case, how would be called the second function? Can write a patch with an unit test? -- ___ Python tra

[issue8214] Add exception logging function to syslog module

2010-03-25 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure which second function you mean. "logexceptions" which replaces sys.excepthook. "log_exception" and "log_exceptions" are very close. cgitb has a funct

[issue7992] Backport capsule object

2010-03-25 Thread STINNER Victor
STINNER Victor added the comment: PyCapsule comes from issues #5630 and #5872. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7992> ___ ___ Pytho

[issue8194] Incompatible API change in xmlrpclib.Transport.parse_response() of Python 2.7 and 3.2

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: In Python 2.6/3.1, xmlrpclib.Transport.parse_response() accepts a file like object. But Python 2.7/3.2 requires a HTTPResponse object because parse_response() calls response.getheader() method. The patch moves the call to .getheader() in single_request() to

[issue6543] traceback presented in wrong encoding

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: > "surrogateescape" characters are not printable stderr uses backslashescape error handler, and so non-decodable characters will be displayed as \xHH. ... see also #8092 :-) -- ___ Python t

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

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

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, the patch only concerns non blocking socket if SSL_write() returns 0? If SSL_write() returns a non zero value, can you use: ssl_socket.send(data[count:])? About the string identifier trick, you should add an assertion to ensure

[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: See also issue #8240 about SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER (ssl.SSLSocket.write may fail on non-blocking sockets). -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8

[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: > letting the C OpenSSL runtime do it for us is certainly more efficient +1 if it's more efficient ;-) -- ___ Python tracker <http://bugs.python.or

[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to add an option to disable SSL_MODE_AUTO_RETRY for a specific socket? Existing applications may rely on / prefer the current behaviour. -- ___ Python tracker <http://bugs.python.

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-03-26 Thread STINNER Victor
New submission from STINNER Victor : If the fullpath to the python3 binary contains a non-ASCII character and the file system encoding is ASCII, Python fails with: --- Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, my patch is also required to import a module having a non-ASCII full path if the file system encoding is ASCII. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-03-26 Thread STINNER Victor
STINNER Victor added the comment: > Initialize Py_FileSystemDefaultEncoding earlier in Py_InitializeEx(), > because its value is required to encode unicode using surrogates to bytes Oh, it doesn't work: get_codeset() returns NULL, because the codec register is empty when get_c

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2010-03-27 Thread STINNER Victor
STINNER Victor added the comment: > ..., the doc says about SSLSocket.write: > > Returns the number of bytes written. > > It actually either returns 0 or len(data), at least as long as we don't > have SSL partial writes. That's a different behaviour from regular &

[issue8227] Fix C API documentation: Argument parsing

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: Commited: r79654 (trunk), r79655 (2.7), blocked in py3k and 3.1 (see #8215 and #2322) -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: > I also found out that, according to RFC 3629, surrogates > are considered invalid and they can't be encoded/decoded, > but the UTF-8 codec actually does it. Python2 does, but Python3 raises an error. Python 2.7a4+ (trunk:79675, Apr 3

[issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: The PEP 3118 describes some points about discontigious buffers, but there is no module nor third party libraries supporting them. PIL 1.1.7 (the last version) doesn't support the buffer API (an image can not be "exported" as a buffer, bu

[issue8305] memoview[0] creates an invalid view if ndim != 1

2010-04-03 Thread STINNER Victor
New submission from STINNER Victor : memory_item() function creates a new memoryview object if ndim is different than 1. Example with numpy: from numpy import array y=array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) y.shape = 3,4 view=memoryview(y) view2 = view[0

[issue8305] memoview[0] creates an invalid view if ndim != 1

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: Full example (using numpy) crashing Python: memoryview_crash.py -- Added file: http://bugs.python.org/file16749/memoryview_crash.py ___ Python tracker <http://bugs.python.org/issue8

[issue8305] memoview[0] creates an invalid view if ndim != 1

2010-04-03 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Interpreter Core type: -> crash ___ Python tracker <http://bugs.python.org/issue8305> ___ ___ Python-bugs-list mai

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: > I can try to cook up a patch fixing this. Did you wrote something? I don't see any patch attached to this issue :-/ -- nosy: +haypo ___ Python tracker <http://bugs.python.or

[issue8305] memoview[0] creates an invalid view if ndim != 1

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: According to #2394, the implementation of the new buffer API is not complete. -- nosy: +teoliphant ___ Python tracker <http://bugs.python.org/issue8

[issue6409] 2to3 -j 4 generates malformed diffs

2010-04-03 Thread STINNER Victor
Changes by STINNER Victor : -- title: 2to3 generates malformed diffs -> 2to3 -j 4 generates malformed diffs ___ Python tracker <http://bugs.python.org/iss

[issue7696] Improve Memoryview/Buffer documentation

2010-04-03 Thread STINNER Victor
STINNER Victor added the comment: memoryview() function is not documented in library/functions.rst, whereas it's a builtin function. -- ___ Python tracker <http://bugs.python.org/i

[issue8322] test_ssl failures with OpenSSL 1.0.0

2010-04-06 Thread STINNER Victor
STINNER Victor added the comment: Extract of SSL_CTX_new manual page: SSLv23_method(void), SSLv23_server_method(void), SSLv23_client_method(void) A TLS/SSL connection established with these methods will understand the SSLv2, SSLv3, and TLSv1 protocol. A client will send out SSLv2

[issue8322] test_ssl failures with OpenSSL 1.0.0

2010-04-06 Thread STINNER Victor
STINNER Victor added the comment: All errors concern SSLv23 at server side, and another protocol at client side (SSLv23 for client and server works as expected). -- ___ Python tracker <http://bugs.python.org/issue8

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-04-07 Thread STINNER Victor
STINNER Victor added the comment: > >> I also found out that, according to RFC 3629, surrogates > >> are considered invalid and they can't be encoded/decoded, > >> but the UTF-8 codec actually does it. > > > > Python2 does, but Python3 raises an er

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2010-04-11 Thread STINNER Victor
STINNER Victor added the comment: I don't have time to write a better patch, please improve mine :-) -- ___ Python tracker <http://bugs.python.org/i

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-12 Thread STINNER Victor
STINNER Victor added the comment: New patch fixing more issues about undecodable filenames. Lib/test/test_subprocess.py |4 - Lib/unittest/runner.py |4 + Modules/_posixsubprocess.c | 21 -- Modules/getpath.c | 90

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-12 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16671/surrogates_bootstrap-4.patch ___ Python tracker <http://bugs.python.org/issue8242> ___ ___ Pytho

[issue8383] pickle is unable to encode unicode surrogates

2010-04-12 Thread STINNER Victor
New submission from STINNER Victor : Python3 uses unicode surrogates to store undecodable filenames. Eg. the filename b"abc\xff.py" is encoded as "abc\xdcff.py" if the file system encoding is ASCII. Pickle is unable to store them: ./python -c 'import pickle

[issue8383] pickle is unable to encode unicode surrogates

2010-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file16904/pickle_surrogates.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8383] pickle is unable to encode unicode surrogates

2010-04-12 Thread STINNER Victor
STINNER Victor added the comment: I found this bug indirectly: test_logging failed on a SocketHandler if LogRecord.pathname contains a surrogate character. SocketHandler uses pickle to serialize the record. -- ___ Python tracker <h

[issue8383] pickle is unable to encode unicode surrogates

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: > Both pickle and marshal will need to use the new error handler > in order to stay compatible with Python 3.0 (and 2.x) > and also to enable creating Unicode literals that include > lone surrogates. Attached patch fixes pickle. Marshal does

[issue8383] pickle is unable to encode unicode surrogates

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: Commited: r80031 (py3k) and r80032 (3.1), fix also pickletools. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: Extract of the Prelude ticket https://dev.prelude-ids.com/issues/show/133 : "commenting out sigprocmask(SIG_SETMASK, &set, NULL) seems to fixes the problem (...)" -- nosy: +haypo ___ Python

[issue8386] test_pickle failing

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: The failing test was introduced by r80031 by me: see issue #8383. I don't understand why the test fails. -- ___ Python tracker <http://bugs.python.org/i

[issue8386] test_pickle failing

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: Does the follow code work on Windows? >>> '\uDC80'.encode("utf8", "surrogatepass") b'\xed\xb2\x80' -- ___

[issue8386] test_pickle failing

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: How did you get these errors? I don't see them in the buildbots (x86 Windows7 3.x, x86 XP-4 3.x): * http://www.python.org/dev/buildbot/builders/x86 Windows7 3.x/builds/408/steps/test/logs/stdio * http://www.python.org/dev/buildbot/builders/x86 XP-4

[issue8386] test_pickle failing

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: he he, ok, no problem. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: signal.__dict__: {... 'NSIG': 65, 'SIGABRT': 6, 'SIGALRM': 14, 'SIGBUS': 7, 'SIGCHLD': 17, 'SIGCLD': 17, 'SIGCONT': 18, 'SIGFPE': 8, 'SIGHUP': 1, 'SIGI

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: There are many references to "unknown signal 32" errors in Google. Gdb mailing list, December 2002: "SIG32/SIGTRAP issues" http://sources.redhat.com/ml/gdb/2002-12/msg00057.html Gdb mailing list, September 2003: "pthread_create

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: NPTL was introduced in Linux kernel 2.6(.0). glibc 2.4 requires NPTL: "The LinuxThreads add-on, providing pthreads on Linux 2.4 kernels, is no longer supported. The new NPTL implementation requires Linux 2.6 kernels. For a libc and libpthread that works

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: > I suggest simply skipping the "offending" test on linuxthread > platforms. Good idea > (perhaps as simple as checking for sys.platform == "linux2" > and signal.SIGRTMIN == 35) I would prefer to rely on confstr(): import

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: > I think it's simply because we didn't test a wrong program path > with execve in 2.X version of test_os. Oh, we should add this test to Python2 ;-) -- ___ Python tracker <http://bugs.p

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +test_xmlrpc fails with non-ascii path ___ Python tracker <http://bugs.python.org/issue8242> ___ ___ Python-bug

[issue8390] tarfile: use surrogates for undecode fields

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor : When reading a tar archive, tarfile decodes fields using "replace" error handler by default. The result is that we loose informations if there is an undecodable character. Since the PEP 383, undecodable filenames are stored using surrogates in

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor : It would be nice to support the PEP 383 (surrogateescape) for environment variables in os.execvpe(). Attached patch uses PyUnicode_AsEncodedString(val, Py_FileSystemDefaultEncoding, "surrogateescape") to encode an environment variable value. I&

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: See also issue #4036. -- ___ Python tracker <http://bugs.python.org/issue8391> ___ ___ Python-bugs-list mailing list Unsub

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +os.execvpe() doesn't support surrogates in env ___ Python tracker <http://bugs.python.org/issue8242> ___ ___

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: all tests pass except of 3 (test_ftplib, test_pep3120, test_traceback). -- Added file: http://bugs.python.org/file16919/surrogates-6.patch ___ Python tracker <http://bugs.python.

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor : In py3k, subprocess uses _posixsubprocess.fork_exec() function. This function uses surrogateescape error handler for most arguments, but not for the current working directory (cwd). Attached patch uses PyUnicode_FSConverter() as done for other arguments. I

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: See also #8391. -- ___ Python tracker <http://bugs.python.org/issue8393> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: See also #8393. -- ___ Python tracker <http://bugs.python.org/issue8391> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +subprocess: support undecodable current working directory on POSIX OS ___ Python tracker <http://bugs.python.org/issue8

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor : The PEP 383 introduces filename using surrogates. ctypes.dlopen() support them. ctypes.cdll.LoadLibrary('libc\uDCff.so.6') fails with: UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +ctypes.dlopen() doesn't support surrogates ___ Python tracker <http://bugs.python.org/issue8242> ___ ___ Pytho

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-13 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16897/surrogates-5.patch ___ Python tracker <http://bugs.python.org/issue8242> ___ ___ Python-bug

[issue8396] tarfile.open does fails with UnicodeDecodeError if parent dir is unicode

2010-04-14 Thread STINNER Victor
STINNER Victor added the comment: It looks like tarfile doesn't support unicode filenames. You should try to encode your input filename to the file system default encoding (sys.getfilesystemencoding()), or avoid using unicode for tar filenames. -- nosy: +

[issue8396] tarfile.open does fails with UnicodeDecodeError if parent dir is unicode

2010-04-14 Thread STINNER Victor
STINNER Victor added the comment: I proposed a workaround, the real bug is that os.path.abspath() doesn't support unicode... And this bug was already fixed 7 weeks ago by r78247 (issue #3426). http://svn.python.org/view/python/trunk/Lib/posixpath.py?r1=78247&r2=78246&pathrev=

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: amaury> Your patch should handle the case when name2 is a bytearray. Ok, fixed. I also tested None: Python does segfault :-) New patch rejects None value. -- Added file: http://bugs.python.org/file16937/ctypes_dlopen_surrogates-2.pa

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16921/ctypes_dlopen_surrogates.patch ___ Python tracker <http://bugs.python.org/issue8394> ___ ___

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16937/ctypes_dlopen_surrogates-2.patch ___ Python tracker <http://bugs.python.org/issue8394> ___ ___

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: (oops, my patch included unrelated changes about trailing spaces) -- Added file: http://bugs.python.org/file16938/ctypes_dlopen_surrogates-2.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: New patch supporting bytearray type (remove the buggy assertion). -- Added file: http://bugs.python.org/file16939/posixsubprocess_cwd-2.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16920/posixsubprocess_cwd.patch ___ Python tracker <http://bugs.python.org/issue8393> ___ ___ Pytho

[issue7606] test_xmlrpc fails with non-ascii path

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: What do you think about my solution (convert the traceback to ASCII to avoid the encoding issue)? If you would like to support non-ASCII characters in HTTP headers, you should open a new issue. For the compatibility, I prefer to use pure ASCII headers

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: My patch doesn't work for types bytes and bytearray. I noticed that py3k uses surrogateescape to encode environment variable values ;-) -- ___ Python tracker <http://bugs.python.org/i

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: Other notes: Environment variable *names* use also surrogateescape "encoding". os.spawnve() and os.spawnvpe() should also be patched (the code should also be factorized). -- ___ Python trac

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - factorize code between execve(), spawnve() and spawnvpe() - support also surrogates in environment variable names - support bytes and bytearray (bytearray cannot be used as a dictionary key, but my patch supports it) - remove

[issue8412] os.system() doesn't support surrogates nor bytes

2010-04-15 Thread STINNER Victor
New submission from STINNER Victor : os.system() doesn't support bytes, bytearray not str containing surrogates. Attached patch uses PyUnicode_FSConverter, bytes2str and release_bytes in (the non-Windows version of) os.system() to support all of this. It locks the buffer because os.s

<    37   38   39   40   41   42   43   44   45   46   >