[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-05-23 Thread STINNER Victor
STINNER Victor added the comment: @grahamd: Can you try the development version of Python 3.3, or try to patch your version using device_encoding.patch? You will not get cp0 encoding anymore. If the patch fixes your issue, I will backport it. I don't see anything interesting to do for

[issue8796] Deprecate codecs.open(), codecs.StreamReader and codecs.StreamWriter

2011-05-23 Thread STINNER Victor
STINNER Victor added the comment: Le lundi 23 mai 2011 à 16:11 +, Marc-Andre Lemburg a écrit : > We still need codecs.open() to support applications that target Python 2.x > and 3.x. io.TextIOWrapper exists in Python 2.6 and 2.7, and 2to3 can simply replace codecs.open() b

[issue12074] regrtest: display the current number of failures

2011-05-23 Thread STINNER Victor
STINNER Victor added the comment: > How about instead changing [1/4], [2/4] etc > to be [1/4/0], [2/4/0], etc? Great, I like it, and it's commited. -- resolution: -> fixed status: open -> closed ___ Python tracker <ht

[issue12155] queue example doesn't stop worker threads

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > Is it unclear to you what those mean? Well, it's clear, but I like when I can simply copy/paste the example and it does just work: > If you post a high-quality self-contained example somewhere > on the net, I would be happy to link to it.

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > I think it's better to use a StringIO instance for the tests. For which test excatly? An encoder produces bytes, I don't the relation with StringIO. -- ___ Python tracker <http://bugs.pytho

[issue12049] expose RAND_bytes() function of OpenSSL

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

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

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: threading_get_ident.patch: make get_ident() public, replace threading._get_ident() by threading.get_ident(). According to this patch, get_ident() function *is* used: it is used by the logging and reprlib modules (and many tests). My patch avoids the usage of

[issue12089] regrtest.py doesn't check for unexpected output anymore?

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: @Antoine: What's your opinion? -- ___ Python tracker <http://bugs.python.org/issue12089> ___ ___ Python-bugs-list m

[issue12167] test_packaging reference leak

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: DistributionTestCase.test_hooks_get_run() leaks some references, I'm trying to understand where exactly. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/is

[issue12070] Unlimited loop in sysconfig._parse_makefile()

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: distutils.sysconfig has also a parse_makefile() function, but it doesn't have the bug. Attached patch fixes this issue: keep "bogus" variables unchanged and adds tests for _parse_makefile(). -- keywords: +patch versions: +Python 3.2 A

[issue12113] test_packaging fails when run twice

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

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

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: I implemented signal.pthread_kill(), so it's now possible to test pending signals in test_signal, even if _tkinter is loaded. I don't think that we need the _finalize() hack anymore. -- resolution: -> wont fix status: o

[issue11242] urllib.request.url_open() doesn't support SSLContext

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: url_open_ssl_context.patch: add optinal ssl_context argument to urllib.request.url_open(). (ca_file, ca_path) and ssl_context are mutual exclusive. -- keywords: +patch Added file: http://bugs.python.org/file22092/url_open_ssl_context.patch

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

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > It's a bit of a rite of passage for new developers to > break the buildbots. :) How long is this rite? -- ___ Python tracker <http://bugs.python

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 24 mai 2011 à 18:13 +, Martin a écrit : > Martin added the comment: > > Does Victor Stinner have a psychic link with Armin Rigo? :) > > https://bitbucket.org/pypy/pypy/src/7f593e7877d4/pypy/module/_multibytecodec/app_mu

[issue12171] Reset method of the incremental encoders of CJK codecs calls the decoder reset function

2011-05-24 Thread STINNER Victor
New submission from STINNER Victor : HZ and ISO-2022 family codecs may generate an escape sequence at the end of a stream. For example, the HZ codec uses '~{' to switchs from ASCII to GB2312, and '~}' resets the encoding to ASCII. At the end of a stream, the encoding shou

[issue12070] Unlimited loop in sysconfig._parse_makefile()

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

[issue12057] HZ codec has no test

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > Haypo, since you've created a new directory there are makefile > (and PC build file, I think) updates that will need to be made. Can you review attached cjkencodings_dir.patch? > (This should be documented in the dev guide if it isn'

[issue12057] HZ codec has no test

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: iso2022_tests.patch: add some tests for ISO2022 encodings: - testcase for iso2022_jp and iso2022_kr, iso2022_jp2 reuses iso2022_jp testcase - test some invalid byte sequences -- Added file: http://bugs.python.org/file22099/iso2022_tests.patch

[issue11377] Deprecate platform.popen()

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

[issue9382] os.popen referenced but not documented in Python 3.x

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > The entire os.popen*() family is supposed be gone in Python 3.x os.popen2(), os.popen3() and os.popen4() were removed in Python 3.0, but os.popen() was kept. Guido wants to keep it because it has a nicer API than subprocess.Popen. I'm too lazy to

[issue10818] pydoc: Remove old server and tk panel

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > The old server was depreciated in 3.2 and is supposed to be removed > along with the tk panel for 3.3. Ok, fine. I applied your patch and removed the serve() function. -- resolution: -> fixed status: open

[issue10832] Add support of bytes objects in PyBytes_FromFormatV()

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: The "%y" format is useless for the posixmodule.c example (it doesn't simplify the code), and I cannot find another usage of this feature. So let's forget it :-) -- resolution: -> invalid

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

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: I started to patch packaging to fix this issue in the packaging module: issue #12112. We might leave distutils unchanged and improve the packaging module instead (because previous experiments proved that distutils should not be touched or it break random

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

2011-05-24 Thread STINNER Victor
STINNER Victor added the comment: > There's a race. If a signal is received while is_tripped is set, > the signal number won't be written to the wakeup FD. Oh, nice catch. The "bug" is not new, Python behaves like that since Python 3.1. But in Python < 3.3, it

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

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > On my pc with both architecture (x86 and x64) the bug > is still presentes Which version of Python are you using? Python 3.1, Python 3.2.1 and Python 3.3 doesn't have the bug, Python 3.2.0 has the bug. Python 3.2.1 doesn't have the b

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
New submission from STINNER Victor : FileIO.readall() reads the file position and size before each call to read(), to adjust the buffer size. Moreover FileIO.readall() calls lseek() on Windows: it should use _lseeki64() instead, to handle correctly file bigger than 2 GB (or maybe 4 GB? I

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: Oh, FileIO.readall() doesn't raise a ValueError if the file is closed => patch attached to fix this. -- Added file: http://bugs.python.org/file22107/fileio_readall_closed.patch ___ Python tracke

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: RawIOBase.readall() fails if .read() returns None: fix attached. -- Added file: http://bugs.python.org/file22108/rawiobase_readall.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: bufferedreader_readall.patch: BufferedReader.read(None) calls raw.readall() if available. bufferedreader_readall.patch requires fileio_readall_closed.patch and rawiobase_readall.patch fixes. -- Added file: http://bugs.python.org/file22109

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: Number of syscalls without the patch -> with the patch: - read the README file, text mode: 17 -> 12 syscalls (-5) - read the README file, binary mode: 15 -> 11 syscalls (-4) - read a binary file of 10 MB: 17 -> 12 syscalls (-5) Quick benchmark

[issue12179] Race condition using PyGILState_Ensure on a new thread

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +charles-francois.natali, haypo, pitrou ___ Python tracker <http://bugs.python.org/issue12179> ___ ___ Python-bugs-list mailin

[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 3e3cd0ed82bb by Senthil Kumaran in branch 'default': > News entry for issue11109. > http://hg.python.org/cpython/rev/3e3cd0ed82bb Please try to format NEWS entries using "Issue #xxx: xxx" instead of "Issue #xx

[issue12180] test_packaging: failures --without-threads

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

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > Don't hesitate to ask me if you need information. It looks like the crash occurs on r[0].data in testPair() of test_kqueue. Can you confirm this? Comment the line in test_kqueue.py to check if it works around the crash. What is the size of intp

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > Attached patch [fileio_readall.patch] fixes both problems. > Looks ok to me. Did you test under Windows? Yes, test_io pass on Windows Vista 64 bits. > Did you run some benchmarks? Yes, see msg136853. Do you mean that I should not touch FileIO.rea

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > You must Py_DECREF(all) first. > Also, you should check that "all" is either None or a bytes object. Right, fixed in bufferedreader_readall-2.patch. By the way, thanks for your reviews. So, do you think that fileio_readall.patch and buffer

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22117/bufferedreader_readall-2.patch ___ Python tracker <http://bugs.python.org/issue12175> ___ ___

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file22118/bufferedreader_readall-2.patch ___ Python tracker <http://bugs.python.org/issue12175> ___ ___

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22109/bufferedreader_readall.patch ___ Python tracker <http://bugs.python.org/issue12175> ___ ___

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22107/fileio_readall_closed.patch ___ Python tracker <http://bugs.python.org/issue12175> ___ ___ Pytho

[issue12175] FileIO.readall() read the file position and size at each read

2011-05-25 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22108/rawiobase_readall.patch ___ Python tracker <http://bugs.python.org/issue12175> ___ ___ Pytho

[issue12071] test_concurrent_futures.test_context_manager_shutdown() hangs on OpenIndiana

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > Since it's a OOM issue, can we close? Yes, I don't want to investigate, and I already changed the size of my swap partition, so I cannot reproduce the bug anymore. -- resolution: -> wont fix status

[issue12171] Reset method of the incremental encoders of CJK codecs calls the decoder reset function

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: Le mercredi 25 mai 2011 à 08:23 +, Marc-Andre Lemburg a écrit : > > Do we need an additional method? It seems that this reset() could > > also be written encoder.encode('', final=True) > > +1 > > I think that'

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: The initial problem (reset() at each call to .encode()) is fixed in Python 2.7, 3.1, 3.2 and 3.3. I opened a new issue, #12171, for the second problem noticed by Armin (decreset vs encreset). -- resolution: -> fixed status: open ->

[issue12171] Reset method of the incremental encoders of CJK codecs calls the decoder reset function

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: cjk_encreset.patch: Fix multibytecodec.MultibyteIncrementalEncoder.reset(), call encreset() instead of decreset(). Improve also incremental encoder tests: reset the encoder using .encode('', final=True) and check the output. I also prefer to

[issue12171] Reset method of the incremental encoders of CJK codecs calls the decoder reset function

2011-05-25 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure what you mean by "discard the output". > > Calling .reset() should still add the closing sequence to the output > buffer, if needed. Incremental encoders don't have any buffer. Python 3.3a0 (default:3c77

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: We can use a class attribute to set the attribute before calling __init__: diff --git a/Lib/subprocess.py b/Lib/subprocess.py --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -664,6 +664,8 @@ _PLATFORM_DEFAULT_CLOSE_FDS = object() class Popen(object

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: > True, this is clever. Will you commit? I'm not sure that it's the pythonic way to solve such problem. Can you work on a patch including a test? -- ___ Python tracker <http://bugs.pytho

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: Does your filesystem store the modification time? Why don't you have/want fstat()? Do you have stat() or a similar function? -- ___ Python tracker <http://bugs.python.org/is

[issue12182] pydoc.py integer division problem

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: Patch applied, thanks for your patch! -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue12182> ___ ___ Python-bug

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: > Should I attempt to modify my patch to include a comment and a test? Yes please, you can use support.captured_stderr() tool. -- ___ Python tracker <http://bugs.python.org/issu

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-05-26 Thread STINNER Victor
New submission from STINNER Victor : Polling should be avoided when it's possible. For subprocess.wait(), we can do something with signals (SIGCHLD and/or SIGCLD). sigtimedwait() can be used to wait a the "a child process terminated" with a timeout, but not wait a specific pro

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: On Linux, the clone() syscall allows the change the signal send by the child to the parent when it terminates. It's also possible to choose to not send a signal when at child exit... But I don't think that subprocess uses suc

[issue9654] merge PC/getpathp.c into Modules/getpath.c

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: > I propose to merge both files, this would ease maintenance > and understanding of how these paths are determined. You mean to have only one function? I would prefer to keep two functions, but one should call the another one :) (you should factorize th

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-26 Thread STINNER Victor
STINNER Victor added the comment: Le jeudi 26 mai 2011 à 14:54 +, Charles-François Natali a écrit : > Charles-François Natali added the comment: > > OpenBSD's struct kevent definition looks fishy: > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/event.h?rev=1.15;

[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 and Python 2.7 succeed

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: The bug is specific to compile(), the import machinery supports Windows newlines on Linux for example. marge$ python2.6 Type "help", "copyright", "credits" or "license" for more information. >>> code=open(&quo

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: If there are only two versions of the structure on all operating systems, we can add a check in configure (e.g. test the size of the ident attribute, =int or >=void*?) to define a macro (e.g. HAVE_OPENBSD_KEVENT_STRUCT). You might be able to change the t

[issue12196] add pipe2() to the os module

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: +self.assertRaises(TypeError, os.pipe2, (0, 0)) Do you want to call the function with two arguments or one tuple with 2 items? You may test both :-) +# try a write big enough to fill-up the pipe (64K on most kernels): this +# should

[issue12196] add pipe2() to the os module

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: +# A constant likely larger than the underlying OS pipe buffer size. +# Windows limit seems to be around 512B, and most Unix kernels have a 64K pipe +# buffer size: take 1MB to be sure. +PIPE_MAX_SIZE = 1024 * 1024 Hum, I am not sure that the comment is

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

2011-05-27 Thread STINNER Victor
STINNER Victor added the comment: Oh, sigwait() doesn't accept a timeout! I would be nice to have also sigwaitinfo().. and maybe also its friend, sigwaitinfo() (if we implement the former, it's trivial to implement the latter). Python 3.3 adds optional timeout to subpr

[issue12196] add pipe2() to the os module

2011-05-29 Thread STINNER Victor
STINNER Victor added the comment: > If've added a test to skip this test on Linux kernels older than 2.6.27: > like O_CLOEXEC, the problem is that the libc defines pipe2() while the > kernel doesn't support it, so when syscall() is called it bails out with > ENOSYS. (This

[issue12209] Minor edits to faulthandler doc

2011-05-29 Thread STINNER Victor
STINNER Victor added the comment: What do you call a "stack trace"? I use this term in the C language, especially when using the "where" command of gdb. In Python, the stack trace is called a "traceback". Anyway, faulthandler prints the Python trace, not the C tr

[issue12175] FileIO.readall() read the file position and size at each read

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

[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor
New submission from STINNER Victor : The following code displays "Xbc" using io, and "bc" using _pyio (or an unbuffered file, e.g. io.FileIO): - import _pyio, io with io.BytesIO(b'abc') as raw: #with _pyio.BufferedRandom(raw) as f: wi

[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor
Changes by STINNER Victor : -- components: +IO ___ Python tracker <http://bugs.python.org/issue12213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12213] BufferedRandom: write(); read() gives different result using io and _pyio

2011-05-29 Thread STINNER Victor
STINNER Victor added the comment: > I already noticed the implement difference of BufferedRandom.write(), > but I don't remember if I reported it or not!? Yes, I already reported the difference: http://bugs.python.org/issue1206

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

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

[issue12151] test_logging fails sometimes

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > The last change appears to have fixed the problem; > AFAIK there have been no test_logging failures on the buildbots > for several days. Great job, thanks! -- ___ Python tracker <http://bug

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- title: BufferedRandom: write(); read() gives different result using io and _pyio -> BufferedRandom, BufferedRWPair: issues with interlaced read-write ___ Python tracker <http://bugs.python.org/issu

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: io_interlaced_read_write.patch: - add interlaced read/write tests for BufferedRandom and BufferedRWPair - _pyio: move "undo readahead" code into BufferedReader.flush() - io: BufferedRandom.flush() doesn't undo readahead if the write buffer is

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
New submission from STINNER Victor : The following code fails on an assertion error (Python exception for _pyio, C assertion for io): -- with io.BytesIO(b'abcd') as raw: with _pyio.TextIOWrapper(raw, encoding='ascii') as f: f.read(1

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: See also issue #12215: TextIOWrapper has also issues on interlaced read-write. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: textiowrapper_interlaced_read_write.patch: TextIOWrapper.write() calls self.seek(self.tell()) if it has a decoder or if snapshot is not None. I suppose that we can do better, but at least it does fix this issue. "read(); write(); write()"

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue12215> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue12215> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue12213> ___ ___ Python-bugs-list mailing list Unsub

[issue12209] Minor edits to faulthandler doc

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > dumping the traceback on CPython crashes? faulthandler is no more specific to crashes: you can dump the tracebacks while Python is running using a signal or an explicit call to faulthandler.dump_traceb

[issue12216] future imports change the reporting of syntaxerrors

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

[issue1322] platform.dist() has unpredictable result under Linux

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: http://patch-tracker.debian.org/patch/series/view/python3.2/3.2.1~rc1-1/platform-lsbrelease.diff This patch fails if "(?:DISTRIB_CODENAME\s*=)\s*(.*)" regex doesn't match (_u_id variable is not set).

[issue12188] PEP 7, C style: add ++ policy and explanation

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

[issue9382] os.popen referenced but not documented in Python 3.x

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > Its documentation in both 2.6 and 2.7 notes: > > Deprecated since version 2.6: This function is obsolete. > Use the subprocess module. The deprecation should be removed from Python 2.7: os.popen() will not be removed from Python 2 because 2.7

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > Should the .pyc/.pyo file writing be disabled altogether > if stat() and/or fstat() is not available. If we cannot get the file modification time, .pyc/.pyo writing must be disabled. If your OS/libc/filesystem doesn't have fstat(), you don&

[issue6490] os.popen documentation in 2.6 is probably wrong

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > Victor: did you notice that getoutput and friends call os.popen? Yes, because I wrote a patch to call directly subprocess :-) => see the issue #10197. I don't want to remove os.popen() anymore, it's too much work for a minor gain (we w

[issue12196] add pipe2() to the os module

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > See the patch attached. I like your patch, it removes many duplicate code :-) Some comments: - I don't like an if surrounding the whole function, I prefer "if not ...: return" to avoid the (useless) indentation. Well, it's my coding

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > Should I go on and write a patch? Yes please, write a patch, I will review it. To emulate a system without stat or fstat, you may use: #define fstat dont_have_fstat #define stat dont_have_stat The link will fail if the code still refer to fstat() or s

[issue8533] regrtest: use backslashreplace error handler for stdout

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: The original issue (use backslashreplace for stdout in regrtest) is now fixed, and so I closed it. @ocean-city: Can you please open a new issue for unittest? (for py3k_also_no_unicode_error_on_direct_test_run.patch) -- resolution: -> fixed sta

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

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > Here is an interesting case for your collection: PyDict_GetItemString. It's easier to guess the encoding of such function: Python 3 always use UTF-8, but yes, the encoding should be documented. I documented many functions, directly in the header fi

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

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

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

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: Ooops, I specified the wrong issue number in my commits :-/ New changeset 3b1b06570cf9 by Victor Stinner in branch '2.7': Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix http://hg.python.org/cpython/rev/3b1b06570cf9 New

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

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > The patch still does not handle the case where the eof indicator > is already set when calling raw_input. My original patch does. I commited your original patch but I kept mine because it doesn't hurt to clear the error on EOF at exit. Reopen t

[issue12057] HZ codec has no test

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: We have know tests for some ISO 2022 codecs and the HZ codec, it's much better! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.

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

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: - I added tests for the HZ codec and some ISO 2022 codecs: #12057 - I fixed IncrementalEncoder.encode() (of multibytecodec ): #12100 - I fixed IncrementalEncoder.reset() (of multibytecodec): #12171 I can now work confidently on this issue. I will try to

[issue12224] problem with siginterrupt

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: Extract of manpage signal(7): "The following interfaces are never restarted after being interrupted by a signal handler, regardless of the use of SA_RESTART; they always fail with the error EINTR when interrupted by a signal handler: * ... *

[issue7978] SocketServer doesn't handle syscall interruption

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: Using signalfd() (require Linux 2.6.22+), specified signals are written in a file and don't interrupt system calls (select). Bonus: we can wait for a signal using select! Using pthread_sigmask(), you can also block signals before calling select, but

[issue7978] SocketServer doesn't handle syscall interruption

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: I think that #12224 is a duplicate of this issue. -- ___ Python tracker <http://bugs.python.org/issue7978> ___ ___ Python-bug

[issue12221] segfaults with unexpanded $Revision$ id's in release candidate tarballs

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

[issue12196] add pipe2() to the os module

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: support_linux_version.diff: cool, it's even better than the previous patch. You can commit it, except if you are motived for a last change: display the write also version in the SkipTest message (as it is done actually). pipe2_whatsnew.diff: I don'

[issue12229] Remove unused variable in bufferedio.c

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: I applied your fix, thanks. -- ___ Python tracker <http://bugs.python.org/issue12229> ___ ___ Python-bugs-list mailin

[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-05-31 Thread STINNER Victor
New submission from STINNER Victor : test_subprocess.test_pass_fds() failed on x86 Tiger 3.x: test test_subprocess failed -- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_subprocess.py", line 1296, in test_pass_fds "

<    10   11   12   13   14   15   16   17   18   19   >