[issue23890] assertRaises increases reference counter

2016-03-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue26563] PyMem_Malloc(): check that the GIL is hold in debug hooks

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: Hum ok, all buildbots look to be happy again :-) I close the issue (again). -- ___ Python tracker ___

[issue21130] equivalent functools.partial instances should compare equal

2016-03-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-03-18 Thread Michael Felt
Michael Felt added the comment: Ah, good news - the build is successful ONCE I open the file ./Lib/ctypes/util.py and find the (hiding) tab characters and replace them with 8 space characters. (And I had tried so hard to check for that in advance). So, if you apply the patch - it may need

[issue23857] Make default HTTPS certificate verification setting configurable

2016-03-18 Thread Robert Kuska
Robert Kuska added the comment: If test fail it will print out non-telling message which make debugging a little bit hard: FAIL: test__https_verify_envvar (test.test_ssl.ContextTests)

[issue26576] Tweak wording of decorator docos

2016-03-18 Thread Chris Angelico
Chris Angelico added the comment: Question: Is it worth having an explanation somewhere of exactly what *does* happen? To what extent is it guaranteed by the language? -- ___ Python tracker

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-03-18 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +gregory.p.smith, martin.panter ___ Python tracker ___

[issue26040] Improve coverage and rigour of test.test_math

2016-03-18 Thread Jeff Allen
Changes by Jeff Allen : Added file: http://bugs.python.org/file42190/stat_math.py ___ Python tracker ___

[issue26588] _tracemalloc: add support for multiple address spaces (domains)

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: Patch 3: - avoid the memory overhead of storing domain if domains are not used - add optional use_domain parameter to tracemalloc.start() - by default, no change: use a C void* (pointer) as key for the trace hashtable - if start() is called with

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-18 Thread py.user
py.user added the comment: There is a funny thing in 3.6.0a0 >>> '{:<09}'.format(1) '1' >>> '{:<09}'.format(10) '1' >>> '{:<09}'.format(100) '1' >>> Actually, it behaves like a string, but the format should call internal format function of the passed number and the

[issue26553] Write HTTP in uppercase

2016-03-18 Thread Martin Panter
Martin Panter added the comment: The three fix_x.y patches look good to me. I pointed out one more fix on the review. I think there are plenty more similar changes that could be made if somebody wanted to. -- nosy: +martin.panter stage: needs patch -> patch review

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: > Well, your patch is correct even if not ideal. :) Landing it as a short-term > solution is fine. Ok, done. Sorry, I didn't write an unit test. I only tested manually by removing Lib/test/__init__.py. > Just keep this issue open so we can address the

[issue26563] PyMem_Malloc(): check that the GIL is hold in debug hooks

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae76a1046bb9 by Victor Stinner in branch 'default': Fix usage of PyMem_Malloc() in os.stat() https://hg.python.org/cpython/rev/ae76a1046bb9 -- ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 18/03/2016 08:09, STINNER Victor a écrit : > > If it's the minimum is 2 bytes, good. Use the lowest bit as a "GPU" flag! > pointer|1. So you guarantee tracemalloc itself won't use such a hack for other purposes? ;-) --

[issue26553] Write HTTP in uppercase

2016-03-18 Thread Aatish Neupane
Changes by Aatish Neupane : Added file: http://bugs.python.org/file42201/2_fix_2.7.patch ___ Python tracker ___

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

2016-03-18 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your review. Set quote to False when html.escape is OK to me. But except for the usage in BaseHTTPRequestHandler, I think we should also set quote to False for the usage in SimpleHTTPRequestHandler since they do not appear in attribute either. And I

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-18 Thread Eric Snow
Eric Snow added the comment: Oh, and spec.loader for namespace package is set to None. -- ___ Python tracker ___

[issue26270] Support for read()/write()/select() on asyncio

2016-03-18 Thread Guido van Rossum
Guido van Rossum added the comment: Regular are left behind because select() won't work on them. However we do support certain file descriptors (e.g. pipes) and it makes sense to support device "files". Can you come up with a new API that lets you pass a file descriptor and wrap it in a

[issue26576] Tweak wording of decorator docos

2016-03-18 Thread Georg Brandl
Georg Brandl added the comment: The patch is definitely an improvement. What about a remark like ", except that `deco` is evaluated before the function `f` is created"? That should cover the remaining difference. -- nosy: +georg.brandl ___ Python

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-03-18 Thread Michael Felt
Michael Felt added the comment: fyi: just completed a test both as 32 and 64 bit build. However, openssl-1.0.1.514 does not work in 64-bit mode (packaging error). Fortunately, openssl-1.0.1.515 (released 02-March-2016) fixes that. In short, 64-bit build is dependent on openssl-1.0.1.515 Here

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-03-18 Thread Nathaniel Smith
Nathaniel Smith added the comment: I think we're talking past each other :-). > If I change tracemalloc, it's not to fullfit numpy requirements, it must > remain very generic Nothing about what I'm saying is relevant to numpy -- the patch attached to this bug report is already plenty for

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-03-18 Thread Xiang Zhang
Changes by Xiang Zhang : -- type: -> behavior ___ Python tracker ___ ___

[issue13601] sys.stderr should be line-buffered when stderr is not a TTY

2016-03-18 Thread STINNER Victor
Changes by STINNER Victor : -- title: sys.stderr should always be line-buffered -> sys.stderr should be line-buffered when stderr is not a TTY ___ Python tracker

[issue26564] Malloc debug hooks: display memory block traceback on error

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b079adb0774 by Victor Stinner in branch 'default': Enhance documentation on malloc debug hooks https://hg.python.org/cpython/rev/7b079adb0774 -- ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: Nathaniel Smith: > There are other leakable resources besides heap and GPU memory -- shmem > segments and file descriptors are two that I thought of earlier, but there > are probably others too. (Note that not all file descriptors are associated > with a

[issue26567] ResourceWarning: Use tracemalloc to display the traceback where an object was allocated when a ResourceWarning is emitted

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset b8acf98beca9 by Victor Stinner in branch 'default': Try to fix test_warnings on Windows https://hg.python.org/cpython/rev/b8acf98beca9 -- ___ Python tracker

[issue26589] Add HTTP Response code 451

2016-03-18 Thread Raymond Hettinger
New submission from Raymond Hettinger: https://tools.ietf.org/html/rfc7725 -- components: Library (Lib) files: code451.diff keywords: patch messages: 262000 nosy: rhettinger priority: normal severity: normal stage: patch review status: open title: Add HTTP Response code 451 type:

[issue26590] socket destructor: implement finalizer

2016-03-18 Thread STINNER Victor
New submission from STINNER Victor: The PEP 442 helped to make object finalization safer, but it's just an API, it's not widely used in the Python core yet. io.FileIO has a nice implementation, but socket.socket and os.scandir don't. I noticed this while working on the issue #26567 which

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-18 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker ___

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

2016-03-18 Thread Martin Panter
Martin Panter added the comment: Thanks for the tests. I left a couple comments. About encoding quotes: Personally I don’t see much value unless you are encoding an attribute value, in which case I would prefer to use xml.sax.saxutils.quoteattr(). Encoded quotes would only become useful if

[issue26554] PC\bdist_wininst\install.c: Missing call to fclose()

2016-03-18 Thread Aatish Neupane
Changes by Aatish Neupane : -- keywords: +patch Added file: http://bugs.python.org/file42212/issue26554.patch ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-18 Thread Martin Panter
Martin Panter added the comment: Summary of the work here as I pass through :) Files already done: Objects/memoryobject.c: converted to signatures without Arg Clinic (Py 3.5) Modules/_opcode.c: Issue 19674 (3.4). Only one function I can see there (Larry’s original post says two sites).

[issue16142] ArgumentParser inconsistent with parse_known_args

2016-03-18 Thread Dario Giovannetti
Changes by Dario Giovannetti : -- nosy: +kynikos ___ Python tracker ___ ___

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-03-18 Thread SilentGhost
SilentGhost added the comment: Could you provide a code example of your using addsitedir that results in duplicates? -- nosy: +SilentGhost stage: -> test needed versions: -Python 3.4 ___ Python tracker

[issue26568] Add a new warnings.showwarnmsg() function taking a warnings.WarningMessage object

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: I pushed a change which adds a private _showwarnmsg(), but I'm still interested to make this new function public! I pushed the change to unblock the issue #26567. -- title: Add a new warnings.showmsg() function taking a warnings.WarningMessage object

[issue26567] ResourceWarning: Use tracemalloc to display the traceback where an object was allocated when a ResourceWarning is emitted

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: For socket & scandir, I opened the issue #26590: "socket destructor: implement finalizer". -- ___ Python tracker ___

[issue26573] Method Parameters can be Accepted as Keyword Arguments?

2016-03-18 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-03-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue26583] test_timestamp_overflow of test_importlib fails if PYTHONDONTWRITEBYTECODE is set

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 915f158633f4 by Ned Deily in branch '3.5': Issue #26583: Skip test_timestamp_overflow in test_import if bytecode https://hg.python.org/cpython/rev/915f158633f4 New changeset e8cab14d8a47 by Ned Deily in branch 'default': Issue #26583: merge from

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-03-18 Thread Martin Panter
Martin Panter added the comment: As I understand it, you are saying if you override the undocumented (but publicly-named) default_request_version attribute, HTTP 0.9 requests no longer work. I suspect it is even broken by default. My understanding is with HTTP 0.9 you should be able to send

[issue26568] Add a new warnings.showmsg() function taking a warnings.WarningMessage object

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79888b970cc4 by Victor Stinner in branch 'default': Add _showwarnmsg() and _formatwarnmsg() to warnings https://hg.python.org/cpython/rev/79888b970cc4 -- nosy: +python-dev ___ Python tracker

[issue26553] Write HTTP in uppercase

2016-03-18 Thread Aatish Neupane
Changes by Aatish Neupane : Added file: http://bugs.python.org/file42199/fix_3.6.patch ___ Python tracker ___

[issue26576] Tweak wording of decorator docos

2016-03-18 Thread Georg Brandl
Georg Brandl added the comment: That is definitely supported. Whether it's actually useful to document, I'm not sure. "except that the original function is not temporarily bound to the name `f`" could work. -- ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-03-18 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___

[issue26553] Write HTTP in uppercase

2016-03-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Aatish, please sign the CLA https://www.python.org/psf/contrib/ https://www.python.org/psf/contrib/contrib-form/ -- nosy: +terry.reedy ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-03-18 Thread Brett Cannon
Brett Cannon added the comment: Here is an initial patch to add AbstractContextManager and ContextManagerType to contextlib. There are no tests yet as I want to make sure this looks okay first. -- keywords: +patch stage: needs patch -> patch review Added file:

[issue26563] PyMem_Malloc(): check that the GIL is hold in debug hooks

2016-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b079adb0774 by Victor Stinner in branch 'default': Enhance documentation on malloc debug hooks https://hg.python.org/cpython/rev/7b079adb0774 -- ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: If you consider that using least signifiant bits to store an identifier of the address space is a bad idea, I'm open to discuss how tracemalloc should be extended to support this use case. -- malloc in POSIX standard:

[issue26553] Write HTTP in uppercase

2016-03-18 Thread Aatish Neupane
Aatish Neupane added the comment: I already did that. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26586] Simple enhancement to BaseHTTPRequestHandler

2016-03-18 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch, it looks good in general. I left some comments and suggestions. -- nosy: +martin.panter stage: -> patch review ___ Python tracker

[issue22854] Documentation/implementation out of sync for IO

2016-03-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have doubts about changing OSError to UnsupportedOperation in the documentation of readable() and writable(). Some implementations can try to do an IO operation without checking readable() and writable() flags. I have lesser doubt about using half-closed

[issue26588] _tracemalloc: add support for multiple address spaces (domains)

2016-03-18 Thread STINNER Victor
STINNER Victor added the comment: Hum, on OpenStack it's common for me to work on a patch serie. Since our development workflow doesn't support that, I used a single patch. It's hard to review it, all changes are merged into one big patch :-/ --