[issue33135] Define field prefixes for the various config structs

2018-03-24 Thread Nick Coghlan
New submission from Nick Coghlan : While working on https://bugs.python.org/issue33042, I found it hard to keep track of which kind of config struct a particular piece of code was referencing. As a particularly relevant example, we currently have 3 different "warnoptions" fields: the private-t

[issue33114] random.sample() behavior is unexpected/unclear from docs

2018-03-24 Thread Tim Peters
Tim Peters added the comment: There's nothing in the docs I can see that implies `sample(x, n)` is a prefix of what `sample(x, n+1)` would have returned had the latter been called instead. If so, then - as always - it's "at your own risk" when you rely on behaviors that haven't been specifie

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-24 Thread Nick Coghlan
Nick Coghlan added the comment: I added the new test case, and found to my surprise that it didn't fail, even in debug mode (where there aren't any default filters). The point I had missed was that even though warnoptions can be NULL in CoreConfig, _Py_MainInterpreterConfig_Read ensures that

[issue33133] Don't return implicit optional types by get_type_hints

2018-03-24 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not sure we should change this ahead of a definitive decision. When you use mypy with the option that forbids it, your program will be invalid, and it doesn't really matter what we do at runtime; but that option is not the default yet, and without that

[issue32943] confusing error message for rot13 codec

2018-03-24 Thread Xiang Zhang
Change by Xiang Zhang : -- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue32943] confusing error message for rot13 codec

2018-03-24 Thread miss-islington
miss-islington added the comment: New changeset 291d5f3e7195659f874fe56b0e3ed717b57597ee by Miss Islington (bot) in branch '3.7': bpo-32943: Fix confusing error message for rot13 codec (GH-5869) https://github.com/python/cpython/commit/291d5f3e7195659f874fe56b0e3ed717b57597ee -- nosy

[issue32943] confusing error message for rot13 codec

2018-03-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +5966 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32943] confusing error message for rot13 codec

2018-03-24 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset e4ce9fa89cb542dced553710b05de85202bc4715 by Xiang Zhang in branch 'master': bpo-32943: Fix confusing error message for rot13 codec (GH-5869) https://github.com/python/cpython/commit/e4ce9fa89cb542dced553710b05de85202bc4715 --

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Charles
Charles added the comment: FYI, the 'cryptography' package from pypi no longer builds after this fix. (I applied the patch to the 2.7.14 source code tarball.) I don't know if that's because of the fix, or because LibreSSL 2.7.X broke 'cryptography' too: clang -fno-strict-aliasing -g -O2 -DN

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread miss-islington
miss-islington added the comment: New changeset 9989efbb653e8cbd08e51b4d79d094605c8b23b8 by Miss Islington (bot) in branch '3.7': bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222) https://github.com/python/cp

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +5965 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 01d618c5606a239b03ad1269541eddb6e724775d by Eric V. Smith in branch 'master': bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222) https://github.com/python/cpython

[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-03-24 Thread bbayles
Change by bbayles : -- keywords: +patch pull_requests: +5964 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bug

[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-03-24 Thread bbayles
Change by bbayles : -- nosy: +bbayles ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +5963 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33126] Some C buffer protocol APIs not documented

2018-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. The PyBuffer_ToContiguous() API is weird: why pass `len` if it cannot be anything other than `src->len`? Also, it would be nice to explain whether the actual buffer data is copied around (with a memory allocation?) or if it's just the Py_buffer struct

[issue33126] Some C buffer protocol APIs not documented

2018-03-24 Thread Stefan Krah
Stefan Krah added the comment: I fixed PyBuffer_ToContiguous() in 3.3, PyBuffer_FromContiguous() was broken until #23370. For a start, here's a doc patch for PyBuffer_ToContiguous(). PyBuffer_FromContiguous() does the opposite and loads a contiguous buffer into a possibly non-contiguous view.

[issue33132] Possible refcount issues in the compiler

2018-03-24 Thread miss-islington
miss-islington added the comment: New changeset 471364b4d977fc31bdf3012912954f24e4867d52 by Miss Islington (bot) in branch '3.7': bpo-33132: Fix reference counting issues in the compiler. (GH-6209) https://github.com/python/cpython/commit/471364b4d977fc31bdf3012912954f24e4867d52 -- n

[issue33134] dataclasses: use function dispatch instead of multiple tests for adding __hash__

2018-03-24 Thread Eric V. Smith
New submission from Eric V. Smith : There's already a table lookup for what action to take when adding __hash__. Change it to a function dispatch table, instead of using strings and testing them. -- assignee: eric.smith components: Library (Lib) messages: 314385 nosy: eric.smith priori

[issue33132] Possible refcount issues in the compiler

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a95d98607efe0c43475b354543e49bf8e240bc6f by Serhiy Storchaka in branch 'master': bpo-33132: Fix reference counting issues in the compiler. (GH-6209) https://github.com/python/cpython/commit/a95d98607efe0c43475b354543e49bf8e240bc6f --

[issue33132] Possible refcount issues in the compiler

2018-03-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +5962 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32873] Pickling of typing types

2018-03-24 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch pull_requests: +5961 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is expected. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Christian, I thought the reason of adding __getstate__ methods which raise an exception is that the existing error message doesn't satisfy your. What is the other reason? -- ___ Python tracker

[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-03-24 Thread Garvit Khatri
Garvit Khatri added the comment: I made the changes on my machine and I\in my testing, it breaks on an empty string with an error saying "Item already exists". If this is expected I would like to submit a patch with tests for the same. -- nosy: +garvitdelhi __

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: I have fixed Python 2.7, 3.6, 3.7, and master branch. Thanks for the report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset edd541897b9c28ee0d0f0131746aa5f19665a104 by Christian Heimes in branch '2.7': [2.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6215) https://github.com/python/cpython/commit/edd541897b9c28ee0d0f0131746aa5f19665a104 --

[issue33133] Don't return implicit optional types by get_type_hints

2018-03-24 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi : Currently this code def f(x: int = None): pass get_type_hints(f) returns {'x': Optional[int]}. I propose to abandon this behaviour. Although there is not yet a definitive decision about this aspect of PEP 484, see https://github.com/python/typing/iss

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 42bd62bc87a52538c0fc2134b76df316f30997da by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6213) https://github.com/python/cpython/commit/42bd62bc87a52538c0fc2134b7

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset f5befbb0d1526f18eb2b24eabb48c3b761c624a2 by Christian Heimes in branch '3.6': [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6214) https://github.com/python/cpython/commit/f5befbb0d1526f18eb2b24eabb48c3b761c624a2 --

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Vitaly Kruglikov
Vitaly Kruglikov added the comment: Thank you, I'll consider myself having been warned :) On Sat, Mar 24, 2018, 7:28 AM Christian Heimes wrote: > > Christian Heimes added the comment: > > Serhiy, > I don't understand what you are trying to tell me. "cannot serialize '%s' > object" is used al

[issue18920] argparse version action should print to stdout, not stderr

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can implement your own version action which outputs to stdout and use it for -V and --version. -- ___ Python tracker ___ __

[issue18920] argparse version action should print to stdout, not stderr

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Is there a workaround for python2? The issue is that autotools is checking that installed tools support --help and --version and it expects those to stdout: bad=0; pid=$$; list="gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkhtml2

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5960 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue18338] python --version should send output to STDOUT

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Sorry need to find the ticket for argparse .. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24334] SSLSocket extra level of indirection

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 1a0bb626f4cfd95f7ec406ea7d3f9433def559fc by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212) https://github.com/python/cpython/commit/1a0bb626f4cfd95f7ec406ea7d3f9

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5959 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue18338] python --version should send output to STDOUT

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Is there a workaround for python2? The issue is that autotools is checking that installed tools support --help and --version and it expects those to stdout: bad=0; pid=$$; list="gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkhtml2

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +5958 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1 by Christian Heimes in branch 'master': bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) https://github.com/python/cpython/commit/4ca0739c9d97ac7cd45499e0d31be68dc659d0e1 -- ___

[issue24334] SSLSocket extra level of indirection

2018-03-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +5957 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24334] SSLSocket extra level of indirection

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset e42ae915095ebca789cc36f3a336a3331fe35945 by Christian Heimes in branch 'master': bpo-24334: Remove inaccurate match_hostname call (#6211) https://github.com/python/cpython/commit/e42ae915095ebca789cc36f3a336a3331fe35945 -- __

[issue33023] Unable to copy ssl.SSLContext

2018-03-24 Thread Christian Heimes
Christian Heimes added the comment: Serhiy, I don't understand what you are trying to tell me. "cannot serialize '%s' object" is used all over the interpreter, e.g. io, pickle, etree, and more. I feel it's the standard message. Vitaly, A lot of objects can't be copied. It's the general case f

[issue24334] SSLSocket extra level of indirection

2018-03-24 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5956 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-24 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5955 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-24 Thread Nick Coghlan
Nick Coghlan added the comment: PR has been updated to be mostly complete (just pending docs changes now), but I think I've found a potential issue with the interaction between the way I've currently implemented it and the way _Py_InitializeCore and _Py_InitializeMainInterpreter work. Specif

[issue33132] Possible refcount issues in the compiler

2018-03-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5954 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue33132] Possible refcount issues in the compiler

2018-03-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several possible reference leaks in compiler.c. When implicit (in VISIT* or ADDOP_* macros) "return" is occurred between creating a new object and ADDOP_N, there is a possible reference leaks. ADDOP_O followed by Py_DECREF contains a possible re

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

2018-03-24 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

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

2018-03-24 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset d8b291a74284307610946f1b5801aa95d7f1e052 by Xiang Zhang in branch 'master': bpo-32932: More revealing error message when non-str objects in __all__ (GH-5848) https://github.com/python/cpython/commit/d8b291a74284307610946f1b5801aa95d7f1e052 --

[issue32996] Improve What's New in 3.7

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Different projects solve the problem with async in different ways. Many of them rename "async" parameter to "async_". Some renames it to "_async" or replace with an opposite parameter "sync". Some projects keep supporting of "async" in older Python versions

[issue33131] Upgrade to pip 10 for Python 3.7

2018-03-24 Thread Nick Coghlan
Nick Coghlan added the comment: Possibly - we implemented ensurepip the way we did just because it was the easiest option, not because we closely considered all the available approaches. That would be a separate process improvement issue, though :) --

[issue33131] Upgrade to pip 10 for Python 3.7

2018-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the repository contains blobs for pip and setuptools (2 MB total) which are updated with every release of pip and setuptools. This increases the size of the repository by 2 MB several times per year. Wouldn't be better to put them in a separate re

[issue33131] Upgrade to pip 10 for Python 3.7

2018-03-24 Thread Nick Coghlan
New submission from Nick Coghlan : Paul brought up recently [1] that with pip 10.0.0 due for release next month [2], we'd really prefer to ship that in Python 3.7.0 (such that 3.7 launches with PEP 518/517 pyproject.toml support), rather than shipping with 9.0.x and then upgrading to 10.0.0 in