[issue23890] assertRaises increases reference counter

2016-03-18 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21130] equivalent functools.partial instances should compare equal

2016-03-18 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 some love.

I would be grateful for people (even just one!) looking at it.

Michael

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)   
 
 -- 
 
 Traceback (most recent call last): 
 
   File "/builddir/build/BUILD/Python-2.7.5/Lib/test/test_ssl.py", line 1143, 
in test__https_verify_envvar
 assert_python_ok("-c", https_is_verified, **extra_env) 
 
   File "/builddir/build/BUILD/Python-2.7.5/Lib/test/script_helper.py", line 
55, in assert_python_ok
 return _assert_python(True, *args, **env_vars) 
 
   File "/builddir/build/BUILD/Python-2.7.5/Lib/test/script_helper.py", line 
47, in _assert_python  
 "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))   
 
 AssertionError: Process return code is 1, stderr follows:

Would be possible to change following code which is being executed:

+https_is_verified = """import ssl, sys;\
+sys.exit(ssl._create_default_https_context is not
+ ssl.create_default_context)"""

into something like

https_is_verified = """import ssl, sys;\
value = ssl._create_default_https_context is not ssl.create_default_context;\
sys.exit('ssl._create_default_https_context should be set to verified' if value 
else value)"""

So traceback will look like this:
...
"stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 1, stderr follows:
ssl._create_default_https_context should be set to verified

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 use_domain=True, use (pointer: void*, domain: 
unsigned int) key for the trace hashtable

--
Added file: http://bugs.python.org/file42211/tracemalloc-3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 internal format function should not 
format different numbers as equal numbers.

Why does it represent number 1 as number 10?

>>> format(1, '<02')
'10'
>>> format(10, '')
'10'
>>>

I guess, there should be a restriction.
Zero padding for numbers should be correct.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 problem more completely later.

If it's a different problem, I prefer to open a new issue. But it's up to you. 
Can you please rephrase the title to put your expectations there? I understood 
that you also want to support frozen module?

--
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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? ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 left a reply to your comment. How do you 
think about these?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 stream?

--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is the corrected patch (tabs removed). name: python.Lib.ctypes.160317.patch

--
Added file: http://bugs.python.org/file42193/python.Lib.ctypes.160317.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 what numpy needs. (Well, it still needs a 
public API like PyMem_Track/Untrack or something, but never mind for now.)

The only reason I'm speaking up now is that if you're adding a manual 
track/untrack API, then a relatively trivial addition now makes tracemalloc 
vastly more powerful, so I don't want to miss this opportunity.

> void* allows to implement the rejected option of also storing the C filename 
> an C line number:

And if you want to attach some extra metadata to traces, then that's an 
interesting idea that I can potentially imagine various use cases for. But it's 
not the idea I'm talking about :-). (FWIW, I think the biggest challenge for 
your idea will be how the allocation sites -- which might be in arbitrary user 
code -- are supposed to figure out what kind of metadata they should be 
attaching. And if it's information that tracemalloc can compute itself -- like 
C backtraces -- then there's no reason for it to be in the public API, which is 
the thing I'm concerned about here.)

What I'm talking about is different: I think it should be possible to re-use 
the tracemalloc infrastructure to track other resources besides "heap 
allocations". So for my use case, it's crucial that we index by (domain, 
pointer), because the address 0xdeadbeef on the heap is different from the 
address 0xdeadbeef on the GPU. We'll never want to group by pointer alone 
without the domain, because that would cause us to actually misinterpret the 
data (if I do PyMem_Track("gpu", 0xdeadbeef); PyMem_Untrack("heap", 
0xdeadbeef), then this should not cause tracemalloc to forget about the gpu 
allocation! I think this is very different than your C backtrace example). And, 
it's always obvious to callers what kind of thing to pass here, because they 
know perfectly well whether they just allocated memory on the heap or on the 
GPU, so the public API is an appropriate place for this information. And, it's 
immediately obvious that for this use case, there will only be a few different 
domains in use a
 t one time, so it's very inefficient to literally store (domain, pointer) 
pairs -- replacing the current pointer => trace design with a domain => 
(pointer => trace) design would indeed require changing tracemalloc's design a 
bit, but not, I think, in any fundamental way?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-03-18 Thread Xiang Zhang

Changes by Xiang Zhang :


--
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 python file object.) I guess one could hack most of these things into 
> pointer bit tricks somehow, but I don't really see the appeal myself :-). 
> It's fine for an internal implementation trick, but a very pythonic public 
> api...

Ok ok, you convinced me. I opened the issue #26588: "_tracemalloc: add support 
for multiple address spaces (domains)".

Hum, the idea of tracking file descriptors is appealing. In practice, I suggest 
to simply use Py_uintptr_t type in the new C API rather than void*. So it's 
more obvious that tracemalloc doesn't care of the value, it only requires the 
value to be unique.

FYI On Windows, handles and file descriptors are also different namespaces. You 
can get a handle and a file descriptor which have the same value but are 
identify different objects.

I don't know shmem.

--

Another different idea would be to annotate a "color" to a memory allocator. 
For example, group memory only used internally, and memory to store user data. 
For a network application, you can imagine an identifier per request and then 
group all allocations of this request.

It sounds very similar to the domain idea, but there is a very important 
difference: the API proposed in issue #26588 requires to pass domain to track 
*and* untrack functions. The problem with coloring allocations is that the 
color is known when the memory is allocated, but the function releasing the 
memory can be very far, and it can simply be the garbage collector. So the 
color must be stored in the hashtable *value* (the trace), whereas the domain 
is stored in the hashtable *key* (a tuple (pointer, domain)).

Since no user directly asked this feature, I propose to defer this issue and 
focus on the concrete issue #26588 to support tracking GPU(s) memory.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42208/code451.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 indirectly resurected a 
destroyed socket (in test_socket).

As I workaround, I reverted my change on socket destructor, but I'm interested 
to enhance socket destructor to be able to use the new tracemalloc feature of 
the warnings module.

--
messages: 262014
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: socket destructor: implement finalizer
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the 
“error_message_format” attribute was modified.

A more practical downside is that if “error_content_type” is set to say 
text/plain, we are adding two somewhat common characters that will get messed 
up. E.g. the “explain” string for 429 Too Many Requests will include the 
double-quoted rate limiting. And an apostrophe could easily be 
given in a custom error message, e.g. “Cant write a clean error message”.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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).
Modules/_io/_iomodule.c: part of Georg’s modules_issue20186.patch, but 
already handled in Issue 20175 (3.5)

Files being worked on:
Modules/_operator.c: patch by Tal, ready for commit?
Modules/_lsprof.c: Georg’s modules_issue20186.patch
Modules/_heapqmodule.c: restored Georg’s patch; looks like he meant to add 
it to the main patch but it got lost
Objects/enumobject.c: patch by Tal
Modules/symtablemodule.c: Georg’s modules_issue20186.patch
Modules/mathmodule.c: patch by Tal
Modules/_tracemalloc.c: modules_issue20186.patch; needs update from review 
comments
Modules/_csv.c: modules_issue20186.patch; couple of review comments

That leaves the following files from OP:
Objects/tupleobject.c: 2 sites
Objects/descrobject.c: 2 sites
Objects/complexobject.c: 2 sites
Objects/weakrefobject.c: 1 sites
Objects/structseq.c: 1 sites
Objects/rangeobject.c: 1 sites
Objects/object.c: 1 sites
Objects/moduleobject.c: 1 sites
Objects/funcobject.c: 1 sites
Objects/fileobject.c: 1 sites
Objects/codeobject.c: 1 sites
Objects/boolobject.c: 1 sites

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16142] ArgumentParser inconsistent with parse_known_args

2016-03-18 Thread Dario Giovannetti

Changes by Dario Giovannetti :


--
nosy: +kynikos

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -> Add a new warnings.showwarnmsg() function taking a 
warnings.WarningMessage object

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-03-18 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 3.5
https://hg.python.org/cpython/rev/e8cab14d8a47

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 b"GET \r\n" and get a response, but Python’s 
server will deadlock waiting for a second blank line or EOF. It looks like this 
deadlock has been there since ~forever (1995).

See Issue 10721 which already proposes to remove 0.9 server support. I would be 
weakly in favour of this (or more strongly if someone can prove my theory that 
the current support is broken).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25609] Add a ContextManager ABC and type

2016-03-18 Thread Jakub Stasiak

Changes by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file42209/contextmanagertype.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
http://pubs.opengroup.org/onlinepubs/009695399/functions/malloc.html
"The pointer returned if the allocation succeeds shall be suitably
aligned so that it may be assigned to a pointer to any type of object
and then used to access such an object in the space allocated (until
the space is explicitly freed or reallocated)."

Linux manual page has a simpler definition: "The malloc() and calloc()
functions return a pointer to the allocated memory, which is suitably
aligned for any built-in type."

malloc of the GNU libc:
"The address of a block returned by malloc or realloc in GNU systems
is always a multiple of eight (or sixteen on 64-bit systems)."
http://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html

Random Google link for GPU:

"cudaMalloc() returns memory which is aligned at 256 bytes." (8 bits)
http://www.dmi.unict.it/~bilotta/gpgpu/notes/09-optimization.html

"Minimum alignment (bytes) for any datatype:128"
http://unix.stackexchange.com/questions/187245/how-to-get-the-size-of-gpu-memory-available-for-opencl

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 pipes in tests. May be it is safe, 
I don't know.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 :-/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com