[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Antony Lee
New submission from Antony Lee : Consider e.g. In [2]: %timeit sorted([i for i in range(100)]) 4.74 µs ± 24.3 ns per loop (mean ± std. dev. of 7 runs, 10 loops each) In [3]: %timeit sorted(i for i in range(100)) 7.05 µs ± 25.7 ns per loop (mean ± std. dev. of 7 runs, 10

[issue32946] Speed up import from non-packages

2018-02-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR optimizes "from ... import ..." from non-package modules. $ ./python -m perf timeit 'from locale import getlocale' Unpatched: Mean +- std dev: 811 ns +- 27 ns Patched:Mean +- std dev: 624 ns +- 17 ns Currently _bootstrap._handle_fromli

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5644 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: sorted() *does* convert its input to a list first, and only then sorts it. It calls PySequence_List() for that, which in turn uses list_extend(), which then applies the obvious optimisation of copying input lists (and tuples) directly. What you are seeing here

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset e9370a47389903bb72badc95032ec84a0ebbf8cc by Christian Heimes in branch '3.6': bpo-32185: Don't send IP in SNI TLS extension (#5865) https://github.com/python/cpython/commit/e9370a47389903bb72badc95032ec84a0ebbf8cc --

[issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 6e8f395001b026daea047cf225dcca5a973ae824 by Christian Heimes in branch '2.7': bpo-25404: SSLContext.load_dh_params() non-ASCII path (GH-3459) https://github.com/python/cpython/commit/6e8f395001b026daea047cf225dcca5a973ae824 -- __

[issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31809] ssl module unnecessarily pins the client curve when using ECDH

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset b7b9225831a729bff84eb7c43bad138416b994fe by Christian Heimes in branch 'master': bpo-31809: test secp ECDH curves (#4036) https://github.com/python/cpython/commit/b7b9225831a729bff84eb7c43bad138416b994fe -- __

[issue31809] ssl module unnecessarily pins the client curve when using ECDH

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5645 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32946] Speed up import from non-packages

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5646 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset a5c9112300ecd492ed6cc9759dc8028766401f61 by Christian Heimes (Miss Islington (bot)) in branch '2.7': [2.7] bpo-32185: Don't send IP in SNI TLS extension (GH-5865) (#5871) https://github.com/python/cpython/commit/a5c9112300ecd492ed6cc9759dc80287

[issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: The issue has been fixed in 2.7, 3.6-3.8 for OpenSSL >= 1.0.2 or platforms with inet_pton. I didn't bother to fix platforms without inet_pton since OpenSSL 1.0.1 and earlier are no longer support any way. -- resolution: -> fixed stage: patch review

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 48707a1baf4fd553fbc4516d9080cb3968af21aa by Christian Heimes in branch '3.6': [3.6] bpo-30622: Improve NPN support detection (GH-5859) (#5861) https://github.com/python/cpython/commit/48707a1baf4fd553fbc4516d9080cb3968af21aa -- _

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 3d87f4cf9c19da9fe8ae8f91f5bb86e642b74a50 by Christian Heimes in branch '2.7': [2.7] bpo-30622: Improve NPN support detection (GH-5859) (#5863) https://github.com/python/cpython/commit/3d87f4cf9c19da9fe8ae8f91f5bb86e642b74a50 -- _

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5647 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23 by Christian Heimes in branch 'master': bpo-32647: Link ctypes extension with libdl. (#5550) https://github.com/python/cpython/commit/5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23 -- __

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5648 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Antony Lee
Antony Lee added the comment: Feel free to close the issue if that's not the forum for this discussion, but I'm still baffled by what's happening. In the example that you give, the first case needs to look up the `list` global and that callable (which happens to be the `list` type) needs to f

[issue32932] better error message when __all__ contains non-str objects

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On other hand, adding checks in Python code will add a slowdown. See issue32946 which moves in contrary direction. -- ___ Python tracker __

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: The constant function call overhead doesn't make a big difference: $ /opt/python3.7-opt/bin/python3 -m timeit 'list(i for i in range(1000))' 5000 loops, best of 5: 55 usec per loop $ /opt/python3.7-opt/bin/python3 -m timeit '[i for i in range(1000)]' 1 loops

[issue31809] ssl module unnecessarily pins the client curve when using ECDH

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset ff7528f089b60f8372c658f3bc3b14b059114da9 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-31809: test secp ECDH curves (GH-4036) (#5872) https://github.com/python/cpython/commit/ff7528f089b60f8372c658f3bc3b14b059114da9 --

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5649 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5650 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue12345] Add math.tau

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5651 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue12345] Add math.tau

2018-02-25 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: -5651 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: I think the difficulty here is that your perspective is backwards. It isn't that sorting a generator is *slower*, it is that sorting a list is *faster*, because there is more information available with a list and so the interpreter can take a short-cut. Wit

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, it is plausible but not slam-dunk obvious that preloading ascii to 'x' mappings will make ascii lookup faster. On #21765, where the pyparse special translation was a side-issue, Tal Einat claimed that the unpublished regex he tried was 100x slower. --

[issue17288] cannot jump from a return after setting f_lineno

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR from your patch Xavier? The code of the f_lineno setter was changed in the master branch, so that it is better to create a PR for the 3.7 branch and later port it to master. -- ___ Pyth

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Antony Lee
Antony Lee added the comment: > But with a list or other sequence with a known length, the interpreter can > allocate the right number of items up front, and avoid growing or shrinking > the new list. I believe that this is the time saving you are seeing. But certainly when the list comprehen

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: A similar regular expression version was mentioned on issue21765 and I had run some tests on it yesterday to verify. On my system, it ran at a factor of 10x slower, so if the translate finished in 0.003, the regex took 0.03. This was consistent for me, rega

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Created a PR based on the discussion and not the original patch. -- nosy: +csabella ___ Python tracker ___ ___

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +5652 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: > as `range` may have been shadowed at that point No, range() has in fact already been executed at that point. And it returned an iterable that knows its length (search for "LengthHint" in the CPython sources). -- _

[issue12345] Add math.tau

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5653 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4bb9b9aea04b1a96632da1b30a58fb31cbe6ec92 by Christian Heimes in branch '2.7': [2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877) https://github.com/python/cpython/commit/4bb9b9aea04b1a96632da1b30a58fb31cbe6ec92 -- _

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5654 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 29eab55309b9f78b79074d26db16a44e7841c639 by Christian Heimes in branch 'master': bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (#5876) https://github.com/python/cpython/commit/29eab55309b9f78b79074d26db16a44e7841c639 -- _

[issue32933] mock_open does not support iteration around text files.

2018-02-25 Thread Anthony Flury
Change by Anthony Flury : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue32947] Support OpenSSL 1.1.1

2018-02-25 Thread Christian Heimes
New submission from Christian Heimes : I'm using this ticket as an epos to track commits and required changes for OpenSSL 1.1.1 and TLS 1.3. Fixes need to be backported to 2.7 and 3.6 to 3.8. We might have to consider backports to 3.4 and 3.5, too. If all goes to plan, OpenSSL 1.1.1 final is s

[issue32947] Support OpenSSL 1.1.1

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5655 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 192bff4e2d196b8933829923ca1db77d8dee67e2 by Christian Heimes (Miss Islington (bot)) in branch '3.6': [3.6] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5875) https://github.com/python/cpython/commit/192bff4e2d196b8933829923ca1db77d8

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4cb373359d5ff29b222b10207516d294f3a54ad8 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874) https://github.com/python/cpython/commit/4cb373359d5ff29b222b10207516d294f

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes via Python-bugs-list
Change by Christian Heimes : -- pull_requests: +5656 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5657 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 961774184eb950e2547ab0d42653439adc735924 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5880) https://github.com/python/cpython/commit/961774184eb950e2547ab0d42653439adc73

[issue17288] cannot jump from a return after setting f_lineno

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Example in msg183254 doesn't crash Python 3.8. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue28883] Python 3.5.2 crashers (from PyPy)

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: C5 is fixed in 3.8 by issue17611. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-b

[issue32948] clang compiler warnings on Travis

2018-02-25 Thread Christian Heimes
New submission from Christian Heimes : I'm seeing a bunch of compile errors on 2.7 branch, https://travis-ci.org/python/cpython/jobs/345906584 /home/travis/build/python/cpython/Modules/_heapqmodule.c:600:21: warning: illegal character encoding in string literal [-Winvalid-source-encoding] [ex

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset a79591cfb81dde65bb2f891d62de0161c23a4ff4 by Christian Heimes in branch '3.6': [3.6] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5881) https://github.com/python/cpython/commit/a79591cfb81dde65bb2f891d62de0161c23a4ff4 --

[issue30622] Fix NPN guard for OpenSSL 1.1

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset df1732a4734190fefc8814687895fc1168716c37 by Christian Heimes in branch '2.7': [2.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5882) https://github.com/python/cpython/commit/df1732a4734190fefc8814687895fc1168716c37 --

[issue32949] Simplify "with"-related opcodes

2018-02-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are some issues with "with"-related opcodes. All other opcodes has constant stack effect for particular control flow. For example FOR_ITER always has the stack effect 1 if not jump (pushes the next item) and -1 if jumps (pops the iterator). The only

[issue32949] Simplify "with"-related opcodes

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5658 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32017] profile.Profile() has no method enable()

2018-02-25 Thread bbayles
bbayles added the comment: I'm afraid that profile.Profile and cProfile.Profile behave pretty differently, and there's not a good way to bring the methods from the C version to the Python version. The example at [1] shows a cProfile.Profile object being instantiated and enabled. At this poin

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Finally it is merged, and seems successfully. Thank you all involved, and first at all Mark, the original author. This unblocked further changes, issue32489 and issue32949. And we can try implement other ideas. Changes in the f_lineno setter fixed crashes

[issue32950] profiling python gc

2018-02-25 Thread Luavis
New submission from 강성일 (Luavis) : There is way to logging python garbage collection event. but no way to profiling it. -- messages: 312816 nosy: 강성일 (Luavis) priority: normal severity: normal status: open title: profiling python gc type: enhancement versions: Python 3.7 __

[issue13607] Move generator specific sections out of ceval.

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The WHY_* codes are gone in 3.8 (see issue17611). Exception state was moved from frame to generator in 3.7 (see issue25612). Can some parts of the patch be applied to the current code? Or it is completely outdated? -- nosy: +serhiy.storchaka _

[issue13607] Move generator specific sections out of ceval.

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue32017] profile.Profile() has no method enable()

2018-02-25 Thread bbayles
Change by bbayles : -- keywords: +patch pull_requests: +5659 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bug

[issue32017] profile.Profile() has no method enable()

2018-02-25 Thread bbayles
bbayles added the comment: I've made a pull request that clarifies things in the docs. As csabella notes, there are some more differences that could be pointed out. The 'subcalls' and 'builtins' arguments could be explained as well. Nonetheless, I think the PR does fix some definitely incorre

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Aren't they were moved in issue25612? Is there something that should be done in this issue? -- nosy: +serhiy.storchaka ___ Python tracker _

[issue28124] Rework SSL module documentation

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5660 stage: needs patch -> patch review ___ Python tracker ___ ___ P

[issue32759] multiprocessing.Array do not release shared memory

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue32622] Implement loop.sendfile

2018-02-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a19fb3c6aaa7632410d1d9dcb395d7101d124da4 by Andrew Svetlov in branch 'master': bpo-32622: Native sendfile on windows (#5565) https://github.com/python/cpython/commit/a19fb3c6aaa7632410d1d9dcb395d7101d124da4 -- _

[issue32622] Implement loop.sendfile

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5661 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2018-02-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: >From the examples in msg220401, issue28385 changed it to print the object type >in the message. >>> format([], 'd') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to list.__format__ >>> format((), 'd') T

[issue32622] Implement loop.sendfile

2018-02-25 Thread miss-islington
miss-islington added the comment: New changeset 632c1cb57176d268d65a9fd7b00582f32e0884ee by Miss Islington (bot) in branch '3.7': bpo-32622: Native sendfile on windows (GH-5565) https://github.com/python/cpython/commit/632c1cb57176d268d65a9fd7b00582f32e0884ee -- nosy: +miss-islington

[issue12345] Add math.tau

2018-02-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32951] Prohibit direct instantiation of SSLSocket and SSLObject

2018-02-25 Thread Christian Heimes
New submission from Christian Heimes : The constructors of SSLObject and SSLSocket were never documented, tested, or meant to be used directly. Instead users were suppose to use ssl.wrap_socket or an SSLContext object. The ssl.wrap_socket() function and direct instantiation of SSLSocket has mu

[issue32951] Prohibit direct instantiation of SSLSocket and SSLObject

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: Antoine Pitrou replied: The ssl.SSLSocket constructor was never meant to be called by user code directly (and I don't think we document it as such). Anyone doing this is asking for trouble (including compatibility breakage as we change the constructor signat

[issue32951] Prohibit direct instantiation of SSLSocket and SSLObject

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5662 stage: needs patch -> patch review ___ Python tracker ___ ___ P

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: Here's the simplest way I can describe this, and it's also the table used inside the code. The column "has-explicit-hash?" is trying to answer the question "is there a __hash__ function defined in this class?". It is set to False if either __hash__ is missing

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Antony Lee] > so both cases are much more similar -- superficially, at least. Try disassembling the inner code object as well -- that is where the work gets done and the list comprehension can take advantage of the LIST_APPEND opcode (rather than passing

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: I don't know if I'm unique, but I find such a table with 4 Boolean keys hard to understand. I'd rather see it written up as a series of nested 'if' statements. -- ___ Python tracker

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2018-02-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue32925] AST optimizer: Change a list into tuple in iterations and containment tests

2018-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The direct inspiration of this optimization was your note that similar optimization was implemented in Python. -- ___ Python tracker ___ __

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: if unsafe_hash: # If there's already a __hash__, raise TypeError, otherwise add __hash__. if has_explicit_hash: hash_action = 'exception' else: hash_action = 'add' else: # unsafe_hash is False (the defa

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Looking at the creation of the instances of pyparse.PyParse() and hyperparser.HyperParser(), I was a little surprised that they (the instances) are local variables to the methods and aren't instance variables. Since they are called fairly often, wouldn't it

[issue31355] Remove Travis CI macOS job: rely on buildbots

2018-02-25 Thread Brett Cannon
Brett Cannon added the comment: Awesome, thanks for taking the time to verify all of that! And I agree with your logic to not bother backporting. -- ___ Python tracker ___ ___

[issue32932] better error message when __all__ contains non-str objects

2018-02-25 Thread Brett Cannon
Brett Cannon added the comment: This is only for `import *`, though, right? So I would argue you're already tossing import perf out the window if you're willing to pollute your namespace like that. -- ___ Python tracker

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +5663 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue31454] Include "import as" in tutorial

2018-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: > PR 4041 looks good to me. Mariatta, do you have time to look at Mario's patch? Sorry I just saw this now, months later. Looks good to me. I can merge and backport once the CI passed. Thanks! -- ___ Python tracker

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: I've been focused on getting the code fix in for the next beta release on 2018-02-26, and leaving the possible parameter name change for later. I don't feel strongly about the parameter name. Right now it's unsafe_hash, per Guido's original proposal.

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 84c4b0cc67ceb4b70842b78c718b6e8214874d6a by Mariatta (Cheryl Sabella) in branch 'master': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/84c4b0cc67ceb4b70842b78c718b6e8214874d6a

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5664 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32394] socket lib beahavior change in 3.6.4

2018-02-25 Thread Ned Deily
Ned Deily added the comment: What's the status of this issue? 3.7.0b2 is tagging in 48 hours or so and 3.6.5rc1 is in less than 2 weeks. -- ___ Python tracker ___ ___

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5665 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-02-25 Thread Ned Deily
Ned Deily added the comment: What's the status of this issue? 3.7.0b2 is tagging in 48 hours or so. -- versions: +Python 3.8 ___ Python tracker ___ ___

[issue31454] Include "import as" in tutorial

2018-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset fbee88244e8921afdb29fde51a9a010a8ae18277 by Mariatta (Mario Corchero) in branch 'master': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/fbee88244e8921afdb29fde51a9a01

[issue32872] backport of #32305 causes regressions in various packages

2018-02-25 Thread Ned Deily
Ned Deily added the comment: OK, I agree with Brett and Nick. Barry, are you OK with reverting this change for 3.6? If so, can you do the honors? -- stage: -> needs patch ___ Python tracker __

[issue31454] Include "import as" in tutorial

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5666 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31454] Include "import as" in tutorial

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5667 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread miss-islington
miss-islington added the comment: New changeset ddf2485103c1e56ba4f290641247dfa07fcbe7f3 by Miss Islington (bot) in branch '3.7': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/ddf2485103c1e56ba4f290641247dfa07fcbe7f3 -- no

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: In msg151730, R. David Murry said "Terry's [first] patch with the ("{}") removed should be committed, though." In msg151738, Eric V. Smith said "I agree with your comment about Terry's patch." My second patch removed "{}" but also made more text changes, expl

[issue31454] Include "import as" in tutorial

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5668 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31454] Include "import as" in tutorial

2018-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks everyone. I've merged Marios's PR. The backport PRs have started and will automerge. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25059] Mistake in input-output tutorial regarding print() seperator

2018-02-25 Thread miss-islington
miss-islington added the comment: New changeset b9678d3aa156996947655ed66b554f6307b29546 by Miss Islington (bot) in branch '3.6': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/b9678d3aa156996947655ed66b554f6307b29546 -- _

[issue32872] backport of #32305 causes regressions in various packages

2018-02-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'd personally prefer to keep the fix (I ran into some problems w/3.6), but I'll defer to the RM. I'll revert the change for 3.6, but I want to test it with importlib_resources first, since I'll probably have to spin a new release of that package too.

[issue32872] backport of #32305 causes regressions in various packages

2018-02-25 Thread Ned Deily
Ned Deily added the comment: Thanks, Barry! I don't see that either action is ideal but I am concerned about breaking third-party packages and 2 (already known) breakages is worrisome. And thanks, @doko, for bringing the matter up. -- ___ Python

[issue31454] Include "import as" in tutorial

2018-02-25 Thread miss-islington
miss-islington added the comment: New changeset 5a07608d0855e4104e4070328155b52010dec4e7 by Miss Islington (bot) in branch '3.6': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/5a07608d0855e4104e4070328155b52010dec4e

  1   2   >