[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f0af69faee902d4b80c07c100dbd528fd8df6832 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999) (GH-7000)

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f5e7b1999f46e592d42dfab51563ea5411946fb7 by Serhiy Storchaka in branch 'master': bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread miss-islington
miss-islington added the comment: New changeset 10a122c0d55b01b053126ef3fd4d9e05ab8f2372 by Miss Islington (bot) in branch '3.6': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6654 ___ Python tracker ___

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6653 ___ Python tracker ___

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8ae8e6af37f29163ee263e293570cb892dc5b5d5 by Serhiy Storchaka in branch 'master': bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6652 ___ Python tracker ___ ___

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: I think the reference to RuntimeWarning in the docs is a typo (if it was only going to be a warning, it could have been that from the start), and that reference to RuntimeError in the code comment is correct. So there's also a docs fix to

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 09a5c077bd8d444e9701b4d1314160b8904434e0 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (GH-6997) https://github.com/python/cpython/commit/09a5c077bd8d444e9701b4d1314160b8904434e0

[issue32996] Improve What's New in 3.7

2018-05-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 15f3d0cc7660ee62c7a1c0420afaee18c26a2a1f by Yury Selivanov (Elvis Pranskevichus) in branch '3.7': [3.7] bpo-32996: The bulk of What's New in Python 3.7 (GH-6978). (GH-6998)

[issue32996] Improve What's New in 3.7

2018-05-19 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- pull_requests: +6651 ___ Python tracker ___ ___

[issue32996] Improve What's New in 3.7

2018-05-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 63536bd286097e770909052052a21804a5e09b66 by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-32996: The bulk of What's New in Python 3.7 (GH-6978)

[issue28167] remove platform.linux_distribution()

2018-05-19 Thread Andrey Bychkov
Change by Andrey Bychkov : -- pull_requests: +6650 ___ Python tracker ___ ___

[issue33479] Document tkinter and threads

2018-05-19 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: I'm currently rewriting the docs, too, according to the plan @ #msg316492. WIP @ https://github.com/native-api/cpython/tree/tkinter_docs . You PR lines up fine though is made redundant by

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +6649 ___ Python tracker ___ ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 222ae1eccc819d82fcadbb3c9e1fba83339cc5c6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (#6996)

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6648 ___ Python tracker ___

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 6b0d09b8f06e6967fa3d41425cecf6499a353a6d by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt. (#6995) https://github.com/python/cpython/commit/6b0d09b8f06e6967fa3d41425cecf6499a353a6d --

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-05-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +6647 ___ Python tracker ___ ___

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-19 Thread Jimmy Lai
Jimmy Lai added the comment: @pitrou We'll measure the wins of gather when we implement it in C. Before that, we need to get all helpers ready in C. -- ___ Python tracker

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Martin Panter
Martin Panter added the comment: According to Wikipedia, there were 24 leap seconds before Feb 2009. So my guess is Eitan’s “gmtime” implementation is calculating the date as if the timestamp (1234567899) includes leap seconds, as in

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the good set of tests. -- ___ Python tracker ___

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33576] Make exception wrapping less intrusive for __set_name__ calls

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, the "transparent exception chaining" code falls into the category of code that I'm both proud of (since it works really well in typical cases [1]) and somewhat horrified by (since the *way* it works tramples over several principles of

[issue33582] formatargspec deprecated but does nto emit DeprecationWarning.

2018-05-19 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +6646 stage: -> patch review ___ Python tracker ___

[issue33582] formatargspec deprecated but does nto emit DeprecationWarning.

2018-05-19 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : Documentation says formatargspec is deprecated since 3.5, but no DeprecationWarnings are emitted, the docstring also does not mention this fact. -- assignee: docs@python components: Documentation messages: 317142

[issue1792] o(n*n) marshal.dumps performance for largish objects with patch

2018-05-19 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- pull_requests: +6645 ___ Python tracker ___

[issue17972] inspect module docs omits many functions

2018-05-19 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +6644 stage: needs patch -> patch review ___ Python tracker

[issue17972] inspect module docs omits many functions

2018-05-19 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Just came across the same issue. It think that the exact behavior may depend on functions. IT is also unclear when to use what sometime. For example, `getsource` seem to be preferable to findsource, getsource cannot be

[issue33581] Document "optional components that are commonly included in Python distributions."

2018-05-19 Thread Antony Lee
New submission from Antony Lee : The stdlib docs intro include the following sentences: It also describes some of the optional components that are commonly included in Python distributions. For Unix-like operating systems Python is normally provided as a

[issue2504] Add gettext.pgettext() and variants support

2018-05-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: Éric, Was your last comment intended as a todo for yourself or an outline of the steps needed for someone else to move this along (maybe it was a reply to Jonathan Schoonhoven's question)? If the latter, I'd be happy to try to work

[issue18099] wsgiref sets Content-Length: 0 on 304 Not Modified

2018-05-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: @flox declared this as 'good to merge' in 2014, but I don't believe the merge happened. Should a PR be created for this patch? Thanks! -- nosy: +cheryl.sabella ___ Python tracker

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread miss-islington
miss-islington added the comment: New changeset 0efa1353b756bd61d4e852ff4ef146735bef5522 by Miss Islington (bot) in branch '3.7': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638)

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread miss-islington
miss-islington added the comment: New changeset 83aedc4d9ae36fb7bc05fd8b2caec55697b3efd2 by Miss Islington (bot) in branch '3.6': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638)

[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-19 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6643 stage: -> patch review ___ Python tracker ___

[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-19 Thread Andrés Delfino
New submission from Andrés Delfino : While most entries don't show "see also" as a separate block, binary/text file entries do. I'm proposing to change this. -- assignee: docs@python components: Documentation messages: 317135 nosy: adelfino, docs@python priority:

[issue33479] Document tkinter and threads

2018-05-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +6642 ___ Python tracker ___

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6640 ___ Python tracker ___

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +6641 ___ Python tracker ___

[issue32831] IDLE: Add docstrings and tests for codecontext

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 654038d896d78a8373b60184f335acd516215acd by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638)

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Tim Peters
Tim Peters added the comment: They both look wrong to me. Under 3.6.5 on Win10, `one` and `three` are the same. Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 time.struct_time(tm_year=2009, tm_mon=2, tm_mday=13, tm_hour=23,

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Then it would be nice to post benchmarks using asyncio.gather() (on something not too trivial perhaps). -- ___ Python tracker

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-19 Thread Jimmy Lai
Jimmy Lai added the comment: @pitrou This change is part of optimization for asyncio.gather(). gather -> ensure_future -> isfuture/iscoroutine/isawaitable We need C implementation for all those function to make gather really efficient for large scale application (e.g.

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the impact on a regular application? The fact that a micro-benchmark becomes X% faster isn't very interesting itself, especially as the original function, at less than 1µs per call, is already very fast. -- nosy: +pitrou

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-19 Thread Jimmy Lai
Jimmy Lai added the comment: @vstinner Thanks for the new benchmark, it provides more detailed wins: It's 1.64x faster for future object and 1.23x faster for non-future object. $ ./python.exe -m perf compare_to isfuture_original_2.json isfuture_optimized_2.json future: Mean

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wait, I didn't notice the change to the format of raw timings. It looks as a regression to me. -- status: closed -> open ___ Python tracker

[issue33528] os.getentropy support

2018-05-19 Thread Christian Heimes
Christian Heimes added the comment: I'm -1 on this feature. It's both confusing and unnecessary to have this feature in the standard library. In general we prefer portable functions or expose platform-specific functions for unique features. The getentropy function is

[issue19251] bitwise ops for bytes of equal length

2018-05-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Carl Meyer
Carl Meyer added the comment: Awkwardly, the motivating use case in issue21145 is a TypeError that we wanted to raise within __set_name__, and not have replaced. It feels a little ugly to special case TypeError this way. I like the _PyErr_TrySetFromCause idea. That

[issue33573] statistics.median does not work with ordinal scale

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: What do you think of adding a note in the documentation for median? "If your data is ordinal (supports order operations) but not numeric (doesn't support addition), you should use ``median_low`` or ``median_high`` instead."

[issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold

2018-05-19 Thread Licht Takeuchi
Change by Licht Takeuchi : -- keywords: +patch pull_requests: +6639 stage: -> patch review ___ Python tracker ___

[issue33430] Import secrets module in secrets examples

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Unless I've mucked it up, I just committed your patch on Github so I'm closing this ticket. Thanks. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unconditional replacing an exception is bad, because it can hide important exceptions like KeybordInterrupt or MemoryError. What if raise a new exception only if TypeError was raised? This will cover the case of a

[issue33573] statistics.median does not work with ordinal scale

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: By the way, this isn't a crash (that's for things which cause the interpreter to segfault). I'm marking this as Not a bug, but I'm open to suggestions to improve either the documentation or the median functions. --

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Leonardo Taccari
Change by Leonardo Taccari : Added file: https://bugs.python.org/file47605/is_valid_fd.c ___ Python tracker ___

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Leonardo Taccari
Leonardo Taccari added the comment: After testing is_valid_fd() (from Python/pylifecycle.c) separately (an `is_valid_fd.c' file will be attached to ease reproduction) I think that also NetBSD is affected by bpo-30225. Using dup(2) (at is currently done in NetBSD): % cc

[issue33573] statistics.median does not work with ordinal scale

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: For ordinal scales, you should use either median_low or median_high. I don't think the standard median function ought to choose for you whether to take the low or high median. It is better to be explicit about which you want, by

[issue33342] urllib IPv6 parsing fails with special characters in passwords

2018-05-19 Thread Martin Panter
Martin Panter added the comment: I presume this is about parsing a URL like >>> urlsplit("//user:[@host") Traceback (most recent call last): File "", line 1, in File "/home/proj/python/cpython/Lib/urllib/parse.py", line 431, in urlsplit raise ValueError("Invalid

[issue33574] Conversion of Number to String(str(number))

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Also note that shadowing builtins *deliberately* is a powerful and useful technique used for advanced programming. -- nosy: +steven.daprano ___ Python tracker

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Leonardo Taccari
Leonardo Taccari added the comment: And here the backtrace of the corresponding core (this is on NetBSD/amd64 8.99.15 with lang/python36 package of today pkgsrc-current): % gdb -core python3.6.core `which python3.6` Reading symbols from /usr/pkg/bin/python3.6...done.

[issue19251] bitwise ops for bytes of equal length

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: While it does match Christian's original suggestion, I'm not taking the "bytes" in the issue title as literally requiring that the feature be implemented as operator support on the bytes type (implementing it on memoryview or a new view

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, I wonder if the UX problem with the current chaining might be solved in a different way, by doing something similar to what we did for codec exceptions (where we want to try to mention the codec name, but also don't want to change the

[issue25063] shutil.copyfileobj should internally use os.sendfile when possible

2018-05-19 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2018-05-19 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-19 Thread Andrew Svetlov
Andrew Svetlov added the comment: -1 for the proposal -- ___ Python tracker ___

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Leonardo Taccari
Leonardo Taccari added the comment: A simpler way to reproduce that (probably this problem is not limited to building but to sys module): (sleep 10; python3.6 -c 'import sys' >/tmp/log 2>&1) & exit And in `/tmp/log': Fatal Python error: Py_Initialize: can't

[issue32996] Improve What's New in 3.7

2018-05-19 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: Thanks for the feedback Serhiy! I'll make an editorial pass to address the comments shortly. In general, I prefer thoroughness in the initial What's New edit to make sure we don't miss something important. --

[issue33448] Output_Typo_Error

2018-05-19 Thread Mark Dickinson
Change by Mark Dickinson : -- stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue26826] Expose new copy_file_range() syscall in os module.

2018-05-19 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Eitan Adler
Change by Eitan Adler : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Eitan Adler
New submission from Eitan Adler : How to reproduce: ∴cat bad.py import time import calendar one = time.gmtime(1234567899) two = calendar.timegm(time.gmtime(1234567899)) three = time.gmtime(two) print(one) print(two) print(three) print(one == three) Expected behavior:

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Martin Husemann
Martin Husemann added the comment: You need to exit the parent shell, to get the original stdin revoke(2)'d. That is: the Ctrl-D in the original descritpion is not line noise. Sorry, should have been more explicit (or used "exit" or something instead) --

[issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI

2018-05-19 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue19251] bitwise ops for bytes of equal length

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand what relation this issue has with Nick's use case. If you need to access separate fields in a binary packed structure, adding support of extended PEP 3118 like syntax in memoryview can help you. If you want to

[issue32996] Improve What's New in 3.7

2018-05-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I appreciate your work, Elvis, but the current version of PR 6978 seems containing too much insignificant details, which are not worth an entry in What's New. They distract attention from important changes. I think this

[issue19251] bitwise ops for bytes of equal length

2018-05-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The last three posts have convinced me that 'efficient bit operations', not tied to the int type, are worth exploring, without immediate restriction to a particular API. I can see that micropython is a significant new use case. --

[issue33578] cjkcodecs missing getstate and setstate implementations

2018-05-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6638 stage: -> patch review ___ Python tracker ___

[issue33578] cjkcodecs missing getstate and setstate implementations

2018-05-19 Thread Christopher Thorne
New submission from Christopher Thorne : The cjkcodecs module provides support for various Chinese/Japanese/Korean codecs through its MultibyteIncrementalDecoder and MultibyteIncrementalEncoder classes. While working with one of these cjkcodecs (euc-jp), I came across an

[issue33565] strange tracemalloc results

2018-05-19 Thread Alexander Mohr
Alexander Mohr added the comment: I realize it doesn't track leaks, it's a tool to help find leaks when used correctly :) This example should be similar to using the compare snapshots mechanism as I start tracking from a stable point (several iterations in after a gc),

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Carl Meyer
Carl Meyer added the comment: Nick, I think the reason this exception wrapping was added is because the stack trace for these exceptions is currently a bit lacking. The "caller" for the `__set_name__` function is the `class` line for the class containing the descriptors.

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Carl Meyer
Change by Carl Meyer : -- keywords: +patch pull_requests: +6637 stage: needs patch -> patch review ___ Python tracker ___