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

The timing is such that 10.0.0 won't quite be ready for 3.7.0b3, but it should 
be released before 3.7.0b4 at the end of April.

[1] https://github.com/pypa/packaging-problems/issues/127#issuecomment-374183609
[2] https://mail.python.org/pipermail/distutils-sig/2018-March/032047.html

--
messages: 314360
nosy: Marcus.Smith, dstufft, ncoghlan, ned.deily, paul.moore
priority: deferred blocker
severity: normal
stage: needs patch
status: open
title: Upgrade to pip 10 for Python 3.7
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[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 repository like Tcl/Tk?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

--

___
Python tracker 

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



[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 by using var-keyword parameters, but not all are aware of 
this possibility. If the preferable way be described in the What's New, it 
would help porting to 3.7.

Another important language change missed in the What's New is keeping insertion 
order in dicts.

--

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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 

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



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

And in compiler_from_import() names can be decrefed twice.

The following PR fixes these issues.

--
assignee: serhiy.storchaka
components: Interpreter Core
messages: 314365
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Possible refcount issues in the compiler
type: resource usage
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[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-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

Specifically, sys.warnoptions and sys._xoptions don't get created until 
_PySys_EndInit, so that's where I added the code to read the pre-initialization 
linked lists and move those values into sys.warnoptions and sys._xoptions. The 
current test is just checking that those sys attribute have the expected 
contents - it isn't checking that the consequences of those settings have 
correctly propagated to the warnings filter list.

For the default filters add by `_PyWarnings_Init` at the end of 
`_Py_InitializeCore`, I think that's fine - we're going to want the embedding 
application's filters to be add after the default filter list anyway.

However, the code in `_PyInitialize_MainInterpreter` to actually import the 
warnings module (which then reads `sys.warnoptions`) is guarded by a check for 
a non-empty config->warnoptions, and that's not going to trip in the case where 
get_warnoptions() has created a new sys.warnoptions list, and 
config->warnoptions is still NULL.

Rather than changing the preinit sys module code to be config-aware, I'm 
thinking that what I'd like to do is:

1. Update the new test case to also check that the most recent 3 entries in the 
warnings filter list match what we expect
2. Assuming that fails (as I expect it will), change the guard in 
_Py_InitializeMainInterpreter to check PySys_HasWarnOptions (which will 
correctly handle the case where config->warnoptions is NULL, but entries have 
been added to sys.warnoptions by some other mechanism, like PySys_AddWarnOption)

--

___
Python tracker 

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



[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-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 for all kinds of 
objects that hold operating system resources (files, sockets) or wrap external 
C libraries (bz2, lzma, sqlite, ssl). We generally don't document that an 
object cannot be pickled, serialized, or copied. If documentation doesn't state 
that an object is copy-able or doesn't provide a dedicated copy method, than it 
can't be copied.

--

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase 
gtkdoc-scan gtkdoc-scangobj gtkdocize"; for p in $list; do \
  case '  ' in \
   *" $p "* | *" ../../$p "*) continue;; \
  esac; \
  f=`echo "$p" | sed 's,^.*/,,;s,x,x,'`; \
  for opt in --help --version; do \
if "/home/ensonic/projects/gnome/gtk-doc/gtk-doc-1.27.1/_inst/bin/$f" $opt 
>c${pid}_.out \
 2>c${pid}_.err &2; bad=1; fi; \
  done; \
done; rm -f c${pid}_.???; exit $bad
gtkdoc-check does not support --version
gtkdoc-fixxref does not support --version
gtkdoc-mkdb does not support --version
gtkdoc-mkhtml does not support --version
gtkdoc-mkhtml2 does not support --version
gtkdoc-mkman does not support --version
gtkdoc-mkpdf does not support --version
gtkdoc-rebase does not support --version
gtkdoc-scan does not support --version
gtkdoc-scangobj does not support --version
Makefile:637: recipe for target 'installcheck-binSCRIPTS' failed

--
nosy: +Stefan Sauer

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/1a0bb626f4cfd95f7ec406ea7d3f9433def559fc


--

___
Python tracker 

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



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase 
gtkdoc-scan gtkdoc-scangobj gtkdocize"; for p in $list; do \
  case '  ' in \
   *" $p "* | *" ../../$p "*) continue;; \
  esac; \
  f=`echo "$p" | sed 's,^.*/,,;s,x,x,'`; \
  for opt in --help --version; do \
if "/home/ensonic/projects/gnome/gtk-doc/gtk-doc-1.27.1/_inst/bin/$f" $opt 
>c${pid}_.out \
 2>c${pid}_.err &2; bad=1; fi; \
  done; \
done; rm -f c${pid}_.???; exit $bad
gtkdoc-check does not support --version
gtkdoc-fixxref does not support --version
gtkdoc-mkdb does not support --version
gtkdoc-mkhtml does not support --version
gtkdoc-mkhtml2 does not support --version
gtkdoc-mkman does not support --version
gtkdoc-mkpdf does not support --version
gtkdoc-rebase does not support --version
gtkdoc-scan does not support --version
gtkdoc-scangobj does not support --version
Makefile:637: recipe for target 'installcheck-binSCRIPTS' failed

--
nosy: +Stefan Sauer

___
Python tracker 

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



[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 

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



[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 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 for all kinds of
> objects that hold operating system resources (files, sockets) or wrap
> external C libraries (bz2, lzma, sqlite, ssl). We generally don't document
> that an object cannot be pickled, serialized, or copied. If documentation
> doesn't state that an object is copy-able or doesn't provide a dedicated
> copy method, than it can't be copied.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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/42bd62bc87a52538c0fc2134b76df316f30997da


--

___
Python tracker 

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



[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/issues/275, I think at least at runtime we 
should not do this.

--
components: Library (Lib)
messages: 314378
nosy: gvanrossum, levkivskyi
priority: normal
severity: normal
status: open
title: Don't return implicit optional types by get_type_hints
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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 

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



[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

___
Python tracker 

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



[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 

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



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
priority: normal
severity: normal
status: open
title: dataclasses: use function dispatch instead of multiple tests for adding 
__hash__
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[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


--
nosy: +miss-islington

___
Python tracker 

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



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

PyObject_CopyData() copies the data from exporter src to the writable exporter 
dest.

I have never used the last two functions.

--
keywords: +patch
Added file: https://bugs.python.org/file47497/issue33126.diff

___
Python tracker 

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



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

--

___
Python tracker 

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



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/commit/01d618c5606a239b03ad1269541eddb6e724775d


--

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/cpython/commit/9989efbb653e8cbd08e51b4d79d094605c8b23b8


--
nosy: +miss-islington

___
Python tracker 

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



[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 

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



[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 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/opt/slangs/py/include/python2.7 -c 
build/temp.macosx-10.13-x86_64-2.7/_openssl.c -o 
build/temp.macosx-10.13-x86_64-2.7/build/temp.macosx-10.13-x86_64-2.7/_openssl.o
 -Wconversion -Wno-error=sign-conversion
build/temp.macosx-10.13-x86_64-2.7/_openssl.c:493:10: fatal error: 
'openssl/opensslv.h' file not found
#include 
 ^~~~
1 error generated.
error: command 'clang' failed with exit status 1

--

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +miss-islington

___
Python tracker 

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



[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 

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



[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 option, mypy treats the type as Optional[int].

--

___
Python tracker 

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



[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 it's never NULL for the 
main interpreter config (which is what _PySys_EndInit reads), which means that 
neither we nor any embedding application can currently trigger the code path in 
get_warnoptions() that lazily creates the warnings list without adding the 
reference back into the config settings.

We'll need to fix that before we make the new configuration API public, but for 
now I'm just going to note it in the source code as a "PEP432 TODO".

--

___
Python tracker 

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



[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 specified.  Since the universe of _possible_ 
behaviors that haven't been specified is immense, I'd rather we didn't even 
start to list all of them ;-)

Seriously, when the docs don't promise something, it's usually a mistake to 
assume they just forgot to mention it.  I'd leave the docs alone in this case.

--
nosy: +tim.peters

___
Python tracker 

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



[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-to-main one for reading the command line settings, the 
"wchar_t *" list in the core config, and the "PyObject *" list object in the 
main interpreter config (which is also the one aliased as sys.warnoptions).

What do you think of adopting a convention where:

* the command line fields all gain a "cmd_" prefix
* the core config fields all gain a "c_" prefix
* the interpreter config fields all gain a "py_" prefix

We'd then have "cmd_warnoptions", "c_warnoptions", and "py_warnoptions" as the 
field names, and it would be more self-evident which layer we were working at 
in any particular piece of code.

--
messages: 314398
nosy: eric.snow, ncoghlan, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Define field prefixes for the various config structs
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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