[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 beyond

[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 : Added file: http://bugs.python.org/file37514/buffers_3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[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 ___ ___ Python-bugs-list mail

[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 d

[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 : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 #230

[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 "", line 1, in V

[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 ___ __

[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 : -- nosy: +pitrou stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.5 ___ Python tracker ___ ___

[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

[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 ___ ___

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

2014-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +pprint doesn't use all width, pprint produces invalid output for long strings versions: +Python 3.5 -Python 3.4 ___ Python tracker __

[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 #19104

[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 _

[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 ___ __

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

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 * _pyio._BufferedIO

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

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 conditio

[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 th

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

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file37519/bench_call_soon.py ___ Python tracker ___ ___ Python-bugs-list mailin

[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 ___ Pyt

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

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[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 behavio

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

2014-12-20 Thread STINNER Victor
Changes by STINNER Victor : -- title: asyncio: race condition in the IOCP code (proactor event loop) -> asyncio: race condition in IocpProactor.wait_for_handle() ___ Python tracker

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

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue7897] Support parametrized tests in unittest

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

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

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2014-12-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[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 ___

[issue19051] Unify buffered readers

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2014-12-20 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[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 Buf

[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 l

[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). Frame