[issue26824] Make some macros use Py_TYPE

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No problems! You are welcome. I never read PEP3123 and it was a good opportunity to read this part of Python history. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: patch review -> commit review versions: +Python 3.5 ___ Python tracker

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 188af2b4945a by Benjamin Peterson in branch '3.5': fix python 3 mod init function declaration (closes #26827) https://hg.python.org/cpython/rev/188af2b4945a New changeset df0e900b8860 by Benjamin Peterson in branch 'default': merge 3.5 (#26827)

[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

[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

[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

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Xiang Zhang. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26634] recursive_repr forgets to override __qualname__ of wrapper

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. I would commit the patch to 3.5 too. -- nosy: +serhiy.storchaka stage: -> commit review versions: +Python 3.5 ___ Python tracker

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

[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

[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

[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

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

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

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d14ea3964590 by Serhiy Storchaka in branch '3.5': Issue #26733: Disassembling a class now disassembles class and static methods. https://hg.python.org/cpython/rev/d14ea3964590 New changeset f96fec10cf25 by Serhiy Storchaka in branch 'default':

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d6bd32a56a8 by Benjamin Peterson in branch '2.7': fix python 3 mod init function declaration (closes #26827) https://hg.python.org/cpython/rev/8d6bd32a56a8 -- ___ Python tracker

[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

[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

[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 !=

[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

[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(),

[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

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

[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

[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

[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

[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

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

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

[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

[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

[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

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

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

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

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

[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

[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

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

[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

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

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

[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

[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

[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

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

[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

[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

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

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

[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

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

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

[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

[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

[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

[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

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