[issue26200] SETREF adds unnecessary work in some cases

2016-04-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you. Can this be closed now? -- ___ Python tracker ___ ___

[issue26585] Use html.escape to replace _quote_html in http.server

2016-04-10 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Xiang -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2016-04-10 Thread Martin Panter
Martin Panter added the comment: In patch v2 I integrated a version of the test into test_wsgiref. I swapped the sleep() calls for a threading.Event object. Because my patch is such a large change, it would be good to get other people’s opinions or reviews. -- Added file:

[issue25187] bdist_rpm fails due to wrong hardcoded assumption about RPM filename format

2016-04-10 Thread David Ward
David Ward added the comment: Ping to review patch please... -- ___ Python tracker ___ ___ Python-bugs-list

[issue26685] Raise errors from socket.close()

2016-04-10 Thread Martin Panter
Martin Panter added the comment: I tweaked the test again for Windows, anticipating that it will raise ENOTSOCK rather than EBADF. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue14456] Relation between threads and signals unclear

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73050563053f by Martin Panter in branch '3.5': Issue #14456: Remove contradiction about blocking signals from bad merge https://hg.python.org/cpython/rev/73050563053f New changeset a8dbe6016a31 by Martin Panter in branch 'default': Issue #14456:

[issue26685] Raise errors from socket.close()

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd665613ed67 by Martin Panter in branch 'default': Issue #26685: Raise OSError if closing a socket fails https://hg.python.org/cpython/rev/bd665613ed67 -- nosy: +python-dev ___ Python tracker

[issue26585] Use html.escape to replace _quote_html in http.server

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf44913588b7 by Martin Panter in branch 'default': Issue #26585: Eliminate _quote_html() and use html.escape(quote=False) https://hg.python.org/cpython/rev/bf44913588b7 -- nosy: +python-dev ___ Python

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2016-04-10 Thread Martin Panter
Martin Panter added the comment: David: I guess the seek() is to support rollover() when you are positioned halfway through the file. Serhiy’s patch seems to be about the best we can do, although it does break the documented promise that the “ ‘_file’ attribute is either an io.BytesIO or

[issue26731] subprocess on windows leaks stdout/stderr handle to child process when stdout/stderr overridden

2016-04-10 Thread Sai
Sai added the comment: You can workaround this problem by adding a middleman process that sets close_fds=True: ### childworkaround.py # import os import subprocess with open(os.devnull, 'w') as devnull: script = "import subprocess; import sys;

[issue26729] Incorrect __text_signature__ for sorted

2016-04-10 Thread Martin Panter
Martin Panter added the comment: This is a strange case. It looks like “iterable” is half-supported as a keyword argument. So Silent Ghost’s patch fixes the signature, but the code still tries to accept keyword arguments: >>> sorted(iterable=None) TypeError: 'NoneType' object is not iterable

[issue26732] multiprocessing sentinel resource leak

2016-04-10 Thread Davin Potts
Changes by Davin Potts : -- nosy: +davin ___ Python tracker ___ ___

[issue26732] multiprocessing sentinel resource leak

2016-04-10 Thread Kevin Quick
Kevin Quick added the comment: (Sorry, an unnamed pipe, but a pipe nonetheless.) -- ___ Python tracker ___

[issue26732] multiprocessing sentinel resource leak

2016-04-10 Thread Kevin Quick
New submission from Kevin Quick: The sentinel creates a named pipe, but the parent's end of the pipe is inherited by subsequently created children. import multiprocessing,signal,sys def sproc(x): signal.pause() for each in range(int(sys.argv[1])): multiprocessing.Process(target=sproc,

[issue25609] Add a ContextManager ABC and type

2016-04-10 Thread Brett Cannon
Brett Cannon added the comment: Thanks for fixing the doc bug, Martin. Too much Markdown lately. :) -- ___ Python tracker ___

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: I see the backwards compatibility issue. I have two suggestion's how to improve the code without breaking backwards compatibility: 1. Add a new Handler class named SafeHandler that will implement handle in the way suggested in the previous patch. All the

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file42426/logging-handleException.patch ___ Python tracker ___

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that fixes SpooledTemporaryFile by getting rid of StringIO. -- keywords: +patch nosy: +serhiy.storchaka stage: needs patch -> patch review Added file: http://bugs.python.org/file42424/spooled_text_tempfile.patch

[issue26731] subprocess on windows leaks stdout/stderr handle to child process when stdout/stderr overridden

2016-04-10 Thread Matt Peters
New submission from Matt Peters: Tested in on Windows 8.1 with python 2.7.5. I have a parent process that creates a child process and calls communicate to get stdout/stderr from the child. The child process calls a persistent process, with stdout/stderr/stdin set to os.devnull, and then

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2016-04-10 Thread R. David Murray
R. David Murray added the comment: I can't see why it even does the seek. The existing tests pass without it. Does your example? Either way, the first step here is for someone to turn this into a unit test for the tempfile module (in test_tempfile). -- nosy: +r.david.murray stage:

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2016-04-10 Thread James Hennessy
New submission from James Hennessy: The tempfile.SpooledTemporaryFile class doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written. The attached program demonstrates the failure. It creates a SpooledTemporaryFile object, writes

[issue24557] Refactor LibreSSL / EGD detection

2016-04-10 Thread Bernard Spil
Bernard Spil added the comment: This is now also required for the upcoming OpenSSL 1.1.0 which also removed EGD by default -- ___ Python tracker ___

[issue26729] Incorrect __text_signature__ for sorted

2016-04-10 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core -Extension Modules, Library (Lib) nosy: +ncoghlan stage: -> patch review versions: +Python 3.6 ___ Python tracker

[issue26729] Incorrect __text_signature__ for sorted

2016-04-10 Thread Erik Welch
New submission from Erik Welch: The first argument to sorted is positional-only, so the text signature should be: sorted($module, iterable, /, key=None, reverse=False) instead of sorted($module, iterable, key=None, reverse=False) To reproduce the issue, attempt to use "iterable" as a

[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-04-10 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue26200] SETREF adds unnecessary work in some cases

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cf8572abe58 by Serhiy Storchaka in branch '2.7': Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF https://hg.python.org/cpython/rev/9cf8572abe58 New changeset 66fafa13a711 by Serhiy Storchaka in branch '3.5': Issue #26200:

[issue26728] make pdb.set_trace() accept debugger commands as arguments and run them after entering the debugger

2016-04-10 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules, Library (Lib) -Interpreter Core nosy: +georg.brandl ___ Python tracker

[issue26727] ctypes.util.find_msvcrt() does not work in python 3.5.1

2016-04-10 Thread Steve Dower
Steve Dower added the comment: See issue23606. Not only is your expectation incorrect, you wouldn't get sensible behavior if it was. You should generally avoid using this function, and use the msvcrt module or ctypes.cdll.msvcrt (if you don't need to interoperate with CPython itself).

[issue26722] Fold compare operators on constants (peephole)

2016-04-10 Thread Demur Rumed
Demur Rumed added the comment: I submitted a patch years ago that addressses the ''x,y = 1, 2' case: http://bugs.python.org/issue10648 & it was not met with enthusiasm 2016-04-10 5:08 GMT+00:00 Alexander Marshalov : > > Alexander Marshalov added the comment: > > Hi all,

[issue26623] JSON encode: more informative error

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb1ad434f10e by Serhiy Storchaka in branch 'default': Issue #26623: TypeError message for JSON unserializible object now contains https://hg.python.org/cpython/rev/cb1ad434f10e -- nosy: +python-dev ___

[issue26623] JSON encode: more informative error

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Is there a use case where the representation is too long? For example large bytes, bytearray or set object. -- ___ Python tracker

[issue26623] JSON encode: more informative error

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Mahmoud. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue26623] JSON encode: more informative error

2016-04-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-04-10 Thread Stefan Krah
Stefan Krah added the comment: Normally I hate environment variables, but perhaps in this case PYTHON_DISABLE_MODULES="foo,bar,quux" would be sufficient? Setup.py already has the "disabled_module_list" variable, it's just a matter of setting this variable somehow. This is really something for

[issue13410] String formatting bug in interactive mode

2016-04-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue15516] exception-handling bug in PyString_Format

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a06654ca0134 by Serhiy Storchaka in branch '2.7': Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properly https://hg.python.org/cpython/rev/a06654ca0134 -- ___ Python tracker

[issue13410] String formatting bug in interactive mode

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a06654ca0134 by Serhiy Storchaka in branch '2.7': Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properly https://hg.python.org/cpython/rev/a06654ca0134 -- nosy: +python-dev ___ Python

[issue26728] make pdb.set_trace() accept debugger commands as arguments and run them after entering the debugger

2016-04-10 Thread irdb
New submission from irdb: I usually insert the following line in the middle of code to start the debugger from there: import pdb; pdb.set_trace() More often than not, I need to run some commands immediately after entering the debug mode, e.g. watch (display) some variables, create some

[issue26716] EINTR handling in fcntl

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The signal handler doesn't raise an exception in the example on StackOverflow. [1] I think it would be nice to publish somewhere (on ActoveState receipts, on StackOverflow) well-searchable correct example. [1]

[issue26719] More efficient formatting of ints and floats in json

2016-04-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue17339] bytes() TypeError message is misleadingly narrow

2016-04-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.5 ___ Python tracker ___ ___

[issue17339] bytes() TypeError message is misleadingly narrow

2016-04-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue25339] sys.stdout.errors is set to "surrogateescape"

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Victor. I have added yet one minor change in tests because -I doesn't suppress PYTHONIOENCODING. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue25339] sys.stdout.errors is set to "surrogateescape"

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56eca1c08738 by Serhiy Storchaka in branch '3.5': Issue #25339: PYTHONIOENCODING now has priority over locale in setting the https://hg.python.org/cpython/rev/56eca1c08738 New changeset 9c6623099da1 by Serhiy Storchaka in branch 'default': Issue

[issue26719] More efficient formatting of ints and floats in json

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d4febb76864 by Serhiy Storchaka in branch '3.5': Issue #26719: More efficient formatting of ints and floats in json. https://hg.python.org/cpython/rev/4d4febb76864 New changeset 36b15a9776ae by Serhiy Storchaka in branch 'default': Issue #26719:

[issue17339] bytes() TypeError message is misleadingly narrow

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b16eec56854 by Serhiy Storchaka in branch 'default': Issue #17339: Improved TypeError message in bytes constructor. https://hg.python.org/cpython/rev/6b16eec56854 -- nosy: +python-dev ___ Python tracker

[issue15984] Wrong documentation for PyUnicode_FromObject() and PyUnicode_FromEncodedObject()

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added a comment on Rietveld. -- ___ Python tracker ___ ___

[issue26057] Avoid nonneeded use of PyUnicode_FromObject()

2016-04-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martin's comments. -- Added file: http://bugs.python.org/file42421/no_unicode_copy_2.patch ___ Python tracker

[issue26706] Update OpenSSL version in readme

2016-04-10 Thread Ned Deily
Changes by Ned Deily : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 15cbeb389f17 by Martin Panter in branch '3.5': Issue #26712: Unify (r)split, (l/r)strip tests into string_tests https://hg.python.org/cpython/rev/15cbeb389f17 New changeset bb3cfca9c431 by Martin Panter in branch 'default': Issue #26712: Merge

[issue26727] ctypes.util.find_msvcrt() does not work in python 3.5.1

2016-04-10 Thread Henri Starmans
New submission from Henri Starmans: Function find_msvcrt() returns None in Python 3.5.1, I expected 'msvcr100.dll'. test code: from ctypes.util import find_msvcrt print(find_msvcrt()) -- components: Windows messages: 263126 nosy: Henri Starmans, paul.moore, steve.dower, tim.golden,

[issue26726] Incomplete Internationalization in Argparse Module

2016-04-10 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +berker.peksag stage: -> patch review ___ Python tracker ___

[issue26057] Avoid nonneeded use of PyUnicode_FromObject()

2016-04-10 Thread Martin Panter
Martin Panter added the comment: Left some comments -- nosy: +martin.panter ___ Python tracker ___ ___