[issue25341] File mode wb+ appears as rb+

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> But this behaviour treating wb+ and rb+ as the same is well tested and
seems to intended to do so.

I think this is not intended behavior. Tests just test that the current 
behavior is not changed accidentally. If I'm right, the patch LGTM. But since 
third-party code can depend on this behavior, I would fix it only in 3.6.

Tests were added in issue4362 and Barry asked the same question about "w+" 
(msg76134).

Barry, Benjamin, what are you think about this now?

--
nosy: +barry, serhiy.storchaka

___
Python tracker 

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



[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-23 Thread STINNER Victor

STINNER Victor added the comment:

I checked Python 2 for map(): it gets the length hint of all iterables and
use the maximum, with a default of 8. I'm not sure of what you mean by
errors, the function to get the length hint already catchs and ignores
errors no?

--

___
Python tracker 

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



[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

map and zip should use the minimum, zip_longest should use the maximum, and 
filter shouldn't have __length_hint__().

--

___
Python tracker 

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



[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 16461a0016bf by Serhiy Storchaka in branch '3.5':
Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
https://hg.python.org/cpython/rev/16461a0016bf

New changeset 9b565815079a by Serhiy Storchaka in branch '2.7':
Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
https://hg.python.org/cpython/rev/9b565815079a

New changeset 5faccb403ad8 by Serhiy Storchaka in branch 'default':
Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
https://hg.python.org/cpython/rev/5faccb403ad8

--
nosy: +python-dev

___
Python tracker 

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



[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-23 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I uploaded a patch that skips these tests if optimizations are available.

--
keywords: +patch
Added file: http://bugs.python.org/file42574/issue26788.patch

___
Python tracker 

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



[issue26833] returning ctypes._SimpleCData objects from callbacks

2016-04-23 Thread Thomas

New submission from Thomas:

If a callback function returns a ctypes._SimpleCData object, it will fail with 
a type error and complain that it expects a basic type.

Using the qsort example:

def py_cmp_func(a, b):
print(a.contents, b.contents)
return c_int(0)

> TypeError: an integer is required (got type c_int)
> Exception ignored in: 

This is somewhat surprising as it is totally fine to pass a c_int (or an int) 
as an c_int argument. But this is really an issue for subclasses of fundamental 
data types:

(sticking with qsort for simplicity, full example attached)

class CmpRet(c_int):
pass

cmp_ctype = CFUNCTYPE(CmpRet, POINTER(c_int), POINTER(c_int))

def py_cmp_func(a, b):
print(a.contents, b.contents)
return CmpRet(0)

> TypeError: an integer is required (got type CmpRet)
> Exception ignored in: 

This is inconsistent with the no transparent argument/return type conversion 
rule for subclasses.

Consider for instance an enum with a specific underlying type. A subclass (with 
__eq__ on value) from the corresponding ctype can be useful to provide a 
typesafe way to pass / receive those from C. Due to the described behavior, 
this doesn't work for callbacks.

This is related to #5710, that discusses composite types.

--
files: callback_ret_sub.py
messages: 264056
nosy: tilsche
priority: normal
severity: normal
status: open
title: returning ctypes._SimpleCData objects from callbacks
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42575/callback_ret_sub.py

___
Python tracker 

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



[issue17233] http.client header debug output format

2016-04-23 Thread Kim Gräsman

Kim Gräsman added the comment:

Thanks! I filed this so long ago that I'd forgotten about it.

I ran the code in question with your patch manually hacked into my Python 
installation (3.4.1) and output is much easier to digest now.

I don't have a strong opinion on key names -- I haven't needed this code path 
since I filed the bug :) -- it's probably fine as-is if nobody wants to take a 
stab at it.

Anyway, thanks for this, I can confirm that it solves my problem, and it would 
be nice if it went into trunk.

--

___
Python tracker 

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



[issue26359] CPython build options for out-of-the box performance

2016-04-23 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I've added the --with-optimizations option to configure, for CPython3 only at 
this point. If it looks good I'll create a version also for CPython2.

--
Added file: 
http://bugs.python.org/file42576/cpython3_with_optimizations_v01.patch

___
Python tracker 

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



[issue26831] ConfigParser parsing failures with default_section and ExtendedInterpolation options

2016-04-23 Thread SilentGhost

SilentGhost added the comment:

I think there is some misunderstanding of what default_section is supposed to 
do, in fact in provides default values for *other* section, as the 
documentation says, it doesn't mangle section separation.

In case of ExtendedInterpolation, the interpolation argument needs to be 
instantiated, i.e. the call should be:
ConfigParser(interpolation=ExtendedInterpolation())

--
nosy: +SilentGhost, lukasz.langa
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue26811] segfault due to null pointer in tuple

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be using _PyObject_GC_UNTRACK() is more correct than setting the size to 0 
or setting the item to None. But property_descr_get_gc_untrack.patch makes the 
code a little slower. Here is optimized version of Victor's patch.

--
Added file: 
http://bugs.python.org/file42577/property_descr_get_gc_untrack_2.patch

___
Python tracker 

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



[issue23507] Tuple creation is too slow

2016-04-23 Thread Demur Rumed

Demur Rumed added the comment:

This code could be made to look a lot less hackish if the potential tuple reuse 
was abstracted by a PyTuple_UniqueOrNew(PyTuple) which returns its argument if 
REFCNT==1 otherwise allocates a tuple of the same size & returns that. It 
decrefs PyTuple if REFCNT != 1

--
nosy: +Demur Rumed

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-04-23 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Martin, Serhiy: Am I right that it would be unacceptable to change the test, 
and I therefore need to find a way to allow writestr while a reading-mode 
handle is open?

--

___
Python tracker 

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



[issue26800] Don't accept bytearray as filenames part 2

2016-04-23 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm a little bit worried about removing support for bytearray in these cases. 
It used to be quite easy to support bytes and bytearray (just say you support 
the buffer API), and I even added language to PEP 484 suggesting that type 
checkers should consider bytearray (and memoryview) as valid arguments to 
anything that's declared as taking bytes. I know this is not universally true 
(a trivial example is a dict with bytes keys) but the existence of the buffer 
API makes it easy to do in most cases. Why are we moving away from this? If we 
do, we should probably remove that language from PEP 484 (and the code from 
mypy, but that's a separate thing).

--

___
Python tracker 

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



[issue26830] Refactor Tools/scripts/google.py

2016-04-23 Thread Francisco Couzo

Francisco Couzo added the comment:

I was also going to refactor the other demo scripts, but first I wanted to make 
sure there was at least some kind of interest in it.

--

___
Python tracker 

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



[issue26800] Don't accept bytearray as filenames part 2

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Side comment about "bytes-like" and "byte string". As for language from PEP 
484, I think it is too permissive. bytes and bytearray have are "bytes strings" 
because they are not only sequences of bytes, but have a lot of str-like 
methods: lower(), split(), startswith(), strip(), etc. Many Python functions 
that work with "bytes strings" expect the support some of these methods. 
memoryview() has no these methods, it is even not always the sequence of bytes. 
Other objects that support the buffer protocol can even be not sequences. This 
is a problem when we want to support all objects with the buffer protocol in 
functions written in Python. We need to wrap them in memoryview and cast to the 
'B' format. But in many cases the term "byte-like" means that bytes and 
bytearray are accepted. There are different levels of "byte-likelity", and 
unfortunately there is no good terminology.

As for moving away from accepting non-bytes paths, I think the arguments are 
similar to arguments about why Path is not str subclass. Or why we don't 
convert any path argument to string by calling str(). Because it can hide 
errors and cause unexpected behavior instead of exception. For example on 
Windows array('u', '扡摣晥') represents not Unicode name '扡摣晥', but bytes name 
b'abcdef'.

--

___
Python tracker 

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



[issue23516] pip: urllib3 does not encode userinfo section of URL with authentication credentials

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

This was reported on urllib3 issue tracker: 
https://github.com/shazow/urllib3/issues/814

--
nosy: +berker.peksag
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread Marcos Dione

Marcos Dione added the comment:

Debian Sid, arch Linux and Fedora FC24 (alpha) already have linux-4.5, others 
would certainly follow soon. Meanwhile, I could start developing the patch and 
we could review it when you think it's appropriate.

--

___
Python tracker 

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



[issue26834] Add truncated SHA512/224 and SHA512/256

2016-04-23 Thread Christian Heimes

New submission from Christian Heimes:

SHA512/224 and SHA512/256 are truncated versions of SHA512. Just like SHA384 
they use the same algorithm but different initial values and a smaller digest. 
I took the start vectors and test values from libtomcrypt.

Like in my blake2 branch I have add tp_new to the types and removed the old 
factory methods. Now it is possible to instantiate the types.

The code is also in my github fork 
https://github.com/tiran/cpython/tree/feature/sha512truncated

--
components: Extension Modules
files: 
cpython-cheimes-0001-Add-truncate-SHA512-224-and-SHA512-256-hash-algorith.patch
keywords: patch
messages: 264068
nosy: christian.heimes, gregory.p.smith
priority: normal
severity: normal
stage: patch review
status: open
title: Add truncated SHA512/224 and SHA512/256
type: enhancement
versions: Python 3.6
Added file: 
http://bugs.python.org/file42578/cpython-cheimes-0001-Add-truncate-SHA512-224-and-SHA512-256-hash-algorith.patch

___
Python tracker 

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



[issue1283110] Give __len__() advice for "don't know"

2016-04-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue14713] PEP 414 installation hook fails with an AssertionError

2016-04-23 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue11645] "Expand 10 after" on rietveld shows a duplicate line

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

I can't reproduce this with Chrome 49.0.2623.112 (64-bit). I guess this has 
already been fixed since 2011 (our fork's commit logs can be found at 
https://hg.python.org/tracker/rietveld/shortlog/bugs.python.org)

--
nosy: +berker.peksag
status: open -> closed

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

test_write_after_read was added in issue14099. It doesn't test intended 
behavior, it tests existing behavior just in case to not change it 
unintentionally. It is desirable to preserve it, but if there is no simple way, 
may be we can change it.

--

___
Python tracker 

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



[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread STINNER Victor

STINNER Victor added the comment:

Kerbel support ok, but what about the libc support? Do you know if it is
planned? Or do you want to use the syscall() low-level API. If we take the
syscall() path, I suggest to make the function private in the os module.
Wait until the API is standardized in the libc. Sometimes the libc changes
minor things, ir's not always a thin wrapper to the syscall.

--

___
Python tracker 

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



[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread Marcos Dione

Marcos Dione added the comment:

Already there:

http://man7.org/linux/man-pages/man2/copy_file_range.2.html

--

___
Python tracker 

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



[issue20112] The documentation for http.server error_message_format is inadequate.

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a912ca4f507b by Berker Peksag in branch '3.5':
Issue #20112: Improve BaseHTTPRequestHandler.error_message_format documentation
https://hg.python.org/cpython/rev/a912ca4f507b

New changeset baed33df1aed by Berker Peksag in branch 'default':
Issue #20112: Improve BaseHTTPRequestHandler.error_message_format documentation
https://hg.python.org/cpython/rev/baed33df1aed

--
nosy: +python-dev

___
Python tracker 

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



[issue20112] The documentation for http.server error_message_format is inadequate.

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Anastasia.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue26089] Duplicated keyword in distutils metadata

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 21e522177ca0 by Berker Peksag in branch 'default':
Issue #26089: Remove duplicate field 'license' from DistributionMetadata
https://hg.python.org/cpython/rev/21e522177ca0

--
nosy: +python-dev

___
Python tracker 

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



[issue26089] Duplicated keyword in distutils metadata

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

I just committed Ezio's patch. Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21382] Signal module doesnt raises ValueError Exception

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1fcf68e6f4c7 by Berker Peksag in branch '3.5':
Issue #21382: Clarify signal.signal() documentation on Windows
https://hg.python.org/cpython/rev/1fcf68e6f4c7

New changeset 3e27b21e3a7d by Berker Peksag in branch 'default':
Issue #21382: Clarify signal.signal() documentation on Windows
https://hg.python.org/cpython/rev/3e27b21e3a7d

--
nosy: +python-dev

___
Python tracker 

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



[issue21382] Signal module doesnt raises ValueError Exception

2016-04-23 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue18353] PyUnicode_WRITE_CHAR macro definition missing

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29e555e5956b by Berker Peksag in branch '3.5':
Issue #18353: Remove PyUnicode_WRITE_CHAR macro link from c-api/unicode.rst
https://hg.python.org/cpython/rev/29e555e5956b

New changeset 8c53fdc011a3 by Berker Peksag in branch 'default':
Issue #18353: Remove PyUnicode_WRITE_CHAR macro link from c-api/unicode.rst
https://hg.python.org/cpython/rev/8c53fdc011a3

--
nosy: +python-dev

___
Python tracker 

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



[issue18353] PyUnicode_WRITE_CHAR macro definition missing

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report Wolf and thanks for the patch Corey.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: compile error -> behavior
versions: +Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

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



[issue18572] Remove redundant note about surrogates in string escape doc

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79e7808c3941 by Berker Peksag in branch '3.5':
Issue #18572: Remove redundant note about surrogates in string escape doc
https://hg.python.org/cpython/rev/79e7808c3941

New changeset ee815d3535f5 by Berker Peksag in branch 'default':
Issue #18572: Remove redundant note about surrogates in string escape doc
https://hg.python.org/cpython/rev/ee815d3535f5

--
nosy: +python-dev

___
Python tracker 

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



[issue18572] Remove redundant note about surrogates in string escape doc

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

I removed the sentence in 3.5 and default branches.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

Do we still want to remove the endtime parameter?

--
nosy: +berker.peksag
status: open -> pending

___
Python tracker 

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



[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2016-04-23 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue19731] Fix copyright footer

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7cb3364952d5 by Berker Peksag in branch '3.5':
Issue #19731: Update copyright year in docs.p.o footer
https://hg.python.org/cpython/rev/7cb3364952d5

New changeset fa0a941728a8 by Berker Peksag in branch 'default':
Issue #19731: Update copyright year in docs.p.o footer
https://hg.python.org/cpython/rev/fa0a941728a8

--
nosy: +python-dev

___
Python tracker 

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



[issue19731] Fix copyright footer

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

2001 is also appears in python.org footer.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f7b317124d6 by Berker Peksag in branch '3.5':
Issue #26041: Remove "will be removed in Python 3.7" from description messages
https://hg.python.org/cpython/rev/8f7b317124d6

New changeset 5d9f961edc30 by Berker Peksag in branch 'default':
Issue #26041: Remove "will be removed in Python 3.7" from description messages
https://hg.python.org/cpython/rev/5d9f961edc30

--
nosy: +python-dev

___
Python tracker 

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



[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-23 Thread STINNER Victor

STINNER Victor added the comment:

That's the manual page of the Linux kernel, not the glibc. It doesn't
mean that the glibc implemented it.

--

___
Python tracker 

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



[issue26549] co_stacksize is calculated from unoptimized code

2016-04-23 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This also affects co_consts, which includes constants that are no longer used 
by the optimized code:

In [8]: def f():
return (1, 2, 3, 4, 5)
   ...: 

In [9]: f.func_code.co_consts
Out[9]: (None, 1, 2, 3, 4, 5, (1, 2, 3, 4, 5))

In [12]: dis.dis(f)
  2   0 LOAD_CONST   6 ((1, 2, 3, 4, 5))
  3 RETURN_VALUE

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue22359] Remove incorrect uses of recursive make

2016-04-23 Thread Martin Panter

Martin Panter added the comment:

Thanks for your help with this Xavier.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5ad93528c39c by Martin Panter in branch '3.5':
Issue #23806: Update susp-ignored.csv
https://hg.python.org/cpython/rev/5ad93528c39c

New changeset cb38785acc8d by Martin Panter in branch 'default':
Issue #23806: Merge susp-ignored.csv from 3.5
https://hg.python.org/cpython/rev/cb38785acc8d

--

___
Python tracker 

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



[issue23277] Cleanup unused and duplicate imports in tests

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6958bbf7f0ec by Berker Peksag in branch 'default':
Issue #23277: Remove unused sys and os imports
https://hg.python.org/cpython/rev/6958bbf7f0ec

--
nosy: +python-dev

___
Python tracker 

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



[issue23277] Cleanup unused and duplicate imports in tests

2016-04-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Jon.

I only removed sys and os since they were the most unused modules.

--
resolution:  -> fixed
status: open -> closed
versions: +Python 3.6 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread Martin Panter

Martin Panter added the comment:

Serhiy’s patch looks worthwhile to me, though I still think a comment would 
help. There are lots of different cases being handled by those few lines:

try:
   size = os.get_terminal_size(sys.__stdout__.fileno())
except (AttributeError, ValueError, OSError)

--

___
Python tracker 

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



[issue24911] Context manager of socket.socket is not documented

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5f7980dd654 by Martin Panter in branch '3.5':
Issue #24911: All socket objects are context managers; update examples
https://hg.python.org/cpython/rev/d5f7980dd654

New changeset 711201953505 by Martin Panter in branch 'default':
Issue #24911: Merge socket context manager doc from 3.5
https://hg.python.org/cpython/rev/711201953505

--
nosy: +python-dev

___
Python tracker 

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



[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you suggest concrete wording?

--

___
Python tracker 

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



[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread Martin Panter

Martin Panter added the comment:

How about:

try:
size = os.get_terminal_size(sys.__stdout__.fileno())
except (AttributeError, ValueError, OSError):
# stdout is None, closed, detached, or not a terminal, or
# os.get_terminal_size() is unsupported
size = os.terminal_size(fallback)

--

___
Python tracker 

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



[issue24911] Context manager of socket.socket is not documented

2016-04-23 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-04-23 Thread STINNER Victor

STINNER Victor added the comment:

Martin's comment is helpful and LGTM.

--

___
Python tracker 

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



[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have collected statistics about using CALL_FUNCTION* opcodes in compliled 
code during running CPython testsuite. According to it, 99.4% emitted opcodes 
is the CALL_FUNCTION opcode, and 89% of emitted CALL_FUNCTION opcodes have only 
positional arguments, and 98% of them have not more than 3 arguments.

That was about calls from Python code. All convenient C API functions (like 
PyObject_CallFunction and PyObject_CallFunctionObjArgs) used for direct calling 
in C code use only positional arguments.

Thus I think we need to optimize only cases of calling with small number (0-3) 
of positional arguments.

--

___
Python tracker 

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