[issue5319] stdout error at interpreter shutdown fails to return OS error status

2014-12-20 Thread Martin Panter
Martin Panter added the comment: Here is a patch that changes Py_Finalize() to return -1 on error, and then sets the exit status to 1. It did not introduce any failures in the test suite for me. However I suspect it deserves more consideration about backwards compatibility etc, which is

[issue22896] Don't use PyObject_As*Buffer() functions

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is simplified patch. _PyBuffer_Converter() and simple_buffer converter are gone. Fixed few leaks found by Martin. Fixed potential crash in ctypes. Fixed minor bugs and cleaned up ctypes tests for from_buffer(). --

[issue22896] Don't use PyObject_As*Buffer() functions

2014-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37514/buffers_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22896 ___

[issue23090] fix test_doctest relying on refcounting to close files

2014-12-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: See also issue22831. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23090 ___ ___

[issue22671] Typo in class io.BufferedIOBase docs

2014-12-20 Thread Martin Panter
Martin Panter added the comment: The documentation was technically correct but too scanty. RawIOBase.read(-1) does defer to readall(), but with a proper size passed, it defers to readinto() instead. Here is a patch which hopefully clarifies this, and also explains which methods have a usable

[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Martin Panter
New submission from Martin Panter: Patch to fix the underlying issue I mentioned in msg230955. After calling detach() on one of the BufferedIOBase wrappers or a TextIOWrapper, most operations will raise an exception. My patch ensures the following operations are still usable, because they are

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23071 ___ ___

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6491d91d59a by Serhiy Storchaka in branch '2.7': Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter. https://hg.python.org/cpython/rev/c6491d91d59a New changeset 2b642f2ca391 by Serhiy Storchaka in branch '3.4': Issue

[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is still here. f = open('/dev/null') f _io.TextIOWrapper name='/dev/null' mode='r' encoding='UTF-8' f.buffer.detach() _io.FileIO name='/dev/null' mode='rb' closefd=True f Traceback (most recent call last): File stdin, line 1, in module

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patch Martin. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23071

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Berker Peksag
Berker Peksag added the comment: In 3.4, namereplace_errors needs to be removed in the test: https://hg.python.org/cpython/rev/2b642f2ca391#l2.17 == FAIL: test_all (test.test_codecs.CodecsModuleTest)

[issue22350] nntplib file write failure causes exception from QUIT command

2014-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou stage: - patch review type: - behavior versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22350

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ab04bcd03bf by Serhiy Storchaka in branch '3.4': Issue #23071: namereplace_errors was added only in 3.5. https://hg.python.org/cpython/rev/1ab04bcd03bf -- ___ Python tracker rep...@bugs.python.org

[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, I have no ideas how I missed this when ran tests. Thank you Berker. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23071 ___

[issue17530] pprint could use line continuation for long bytes literals

2014-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +pprint doesn't use all width, pprint produces invalid output for long strings versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 872f048f0403 by Serhiy Storchaka in branch '3.4': Issue #19104: pprint now produces evaluable output for wrapped strings. https://hg.python.org/cpython/rev/872f048f0403 New changeset 4d3066d4a5df by Serhiy Storchaka in branch 'default': Issue

[issue1763] Get path to shell/known folders on Windows

2014-12-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: +1 from me for supporting this functionality in Python natively. I tried winpaths but it doesn't yet support Python 3. I've e-mailed the author so it might be considered for a future release. -- nosy: +jason.coombs

[issue23090] fix test_doctest relying on refcounting to close files

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset f00412d32b41 by Benjamin Peterson in branch '2.7': explicitly close files (closes #23090) https://hg.python.org/cpython/rev/f00412d32b41 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Antoine for your review. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue19105] pprint doesn't use all width

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Resolved conflicts with issue19104. -- Added file: http://bugs.python.org/file37517/pprint_all_width_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19105

[issue1763] Get path to shell/known folders on Windows

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1763 ___ ___ Python-bugs-list

[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Martin Panter
Martin Panter added the comment: Damn, detaching the intermediate buffered stream is a bit more awkward. The difference between the “io” and “_pyio” implementations boils down to: * io.BufferedReader/Writer/RWPair.name properties raise a ValueError if the stream is detached *

[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread CensoredUsername
New submission from CensoredUsername: If a pickle frame ends at the end of a pickle._Unframer.readline() call then an UnpicklingError(pickle exhausted before end of frame) will unconditionally be raised due to a faulty check if the frame ended before the line ended. It concerns this

[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-20 Thread STINNER Victor
STINNER Victor added the comment: Rebased patch which now always check the thread, even in release mode. Summary of the current version of the patch (check_thread-2.patch): - call_soon/call_at now checks if they are called from the thread running the event loop - the check is only done when

[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file37519/bench_call_soon.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22926 ___

[issue22585] os.urandom() should use getentropy() of OpenBSD 5.6

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75ede5bec8db by Victor Stinner in branch 'default': Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), https://hg.python.org/cpython/rev/75ede5bec8db -- nosy: +python-dev ___

[issue22585] os.urandom() should use getentropy() of OpenBSD 5.6

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22585 ___

[issue23095] asyncio: race condition in the IOCP code (proactor event loop)

2014-12-20 Thread STINNER Victor
New submission from STINNER Victor: On Windows using the IOCP (proactor) event loop, I noticed race conditions when running the test suite of Trollius. For examples, sometimes the returncode of a process is None, which should never happen. It looks like wait_for_handle() has an invalid

[issue23095] asyncio: race condition in IocpProactor.wait_for_handle()

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: race condition in the IOCP code (proactor event loop) - asyncio: race condition in IocpProactor.wait_for_handle() ___ Python tracker rep...@bugs.python.org

[issue12600] Add example of using load_tests to parameterise Test Cases

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12600 ___ ___ Python-bugs-list

[issue7897] Support parametrized tests in unittest

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7897 ___ ___ Python-bugs-list

[issue22673] document the special features (eg: fdclose=False) of the standard streams

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22673 ___ ___ Python-bugs-list

[issue23095] asyncio: race condition in IocpProactor.wait_for_handle()

2014-12-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23095 ___ ___ Python-bugs-list mailing list

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the report. Do you have actual data that can exhibit the problem? -- nosy: +pitrou, serhiy.storchaka versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23094

[issue19051] Unify buffered readers

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19051 ___ ___ Python-bugs-list

[issue12053] Add prefetch() for Buffered IO (experiment)

2014-12-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12053 ___ ___ Python-bugs-list

[issue22854] Documentation/implementation out of sync for IO

2014-12-20 Thread Martin Panter
Martin Panter added the comment: Some of the docstrings already mention UnsupportedOperation. This patch updates the rest of the documentation. Also adds some tests to verify this on all the concrete classes I could think of. Some discoveries in the process: * BufferedWriter.readable() and

[issue18590] Found text not always highlighted by Replace dialog on Windows

2014-12-20 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: I tested for the behaviour described in msg193895 before and after your patch. Everything remains same except as what you mentioned. Currently, Replace dialog Find hits are tagged with both the 'hit' and the 'sel' tag, which does not show on Windows as

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: readline() is used only when unpickle opcodes PERSID, INT, LONG, FLOAT, STRING, UNICODE, INST, GLOBAL, GET, PUT. These opcodes are not used with protocol 4 (all opcodes except GLOBAL is used only with protocol 0, and GLOBAL is used with protocol = 3).