[issue28414] SSL match_hostname fails for internationalized domain names

2018-02-20 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Christian: we're less than a week out from b2. Do you need any help here?

--

___
Python tracker 

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



[issue31106] os.posix_fallocate() generate exception with errno 0

2018-02-20 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

The failed test is test_posix_fallocate, not test_posix_fallocate_errno. The 
former special-cases Solaris for EINVAL already, and the latter merely passes 
an invalid descriptor.

It seems that this particular issue is still open only because there is no NEWS 
entry in the merged commits.

--
nosy: +izbyshev

___
Python tracker 

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Pickles containing a reference to Integer and created in new versions will be 
not compatible with older versions.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Is
str = str.replace('', 'x')
str = str.replace('', 'x')
str = str.replace('xx', 'x')
str = str.replace('xx', 'x')
really faster than
_squashex = re.compile('x+').sub  # top of file
_squashex('x', str)

And are the name bindings faster that regex.func(...)?

--

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset 1e8bc25594db3f36a3f228531bce0ed1b99c2d8d by Miss Islington (bot) 
in branch '3.6':
bpo-32889: update valgrind suppressions (GH-5779)
https://github.com/python/cpython/commit/1e8bc25594db3f36a3f228531bce0ed1b99c2d8d


--

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b852d8c1f0b12e84549d83cd9b1ec0992b9d9703 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '2.7':
[2.7] bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND 
chunk is not found (GH-5240) (GH-5781)
https://github.com/python/cpython/commit/b852d8c1f0b12e84549d83cd9b1ec0992b9d9703


--

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset 69607b4ecf917aea59632ff72695a97a6689ed8c by Miss Islington (bot) 
in branch '3.7':
bpo-32889: update valgrind suppressions (GH-5779)
https://github.com/python/cpython/commit/69607b4ecf917aea59632ff72695a97a6689ed8c


--
nosy: +miss-islington

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 6c7edba1665ea676328c6b50f92e8423c8f0d164 by Benjamin Peterson in 
branch '2.7':
[2.7] closes bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) (#5792)
https://github.com/python/cpython/commit/6c7edba1665ea676328c6b50f92e8423c8f0d164


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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset f8a794c04c8d375da279fc830770a5e6b4f363fb by Miss Islington (bot) 
in branch '3.6':
bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
https://github.com/python/cpython/commit/f8a794c04c8d375da279fc830770a5e6b4f363fb


--

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread Benjamin Peterson

Change by Benjamin Peterson :


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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset e5d38deb045d0907e6fcf82af8d2d8f0556a8591 by Miss Islington (bot) 
in branch '3.7':
bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
https://github.com/python/cpython/commit/e5d38deb045d0907e6fcf82af8d2d8f0556a8591


--
nosy: +miss-islington

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5575

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread miss-islington

Change by miss-islington :


--
keywords: +patch
pull_requests: +5574
stage:  -> patch review

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset ba518804bf4c1ea01df5e622b333d3116cbaa3bd by Benjamin Peterson 
(Paul Price) in branch 'master':
bpo-32889: update valgrind suppressions (GH-5779)
https://github.com/python/cpython/commit/ba518804bf4c1ea01df5e622b333d3116cbaa3bd


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +5573

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5572

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset e9edee0b65650c4f9db90cefc2e9a8125bad762c by Benjamin Peterson in 
branch 'master':
bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
https://github.com/python/cpython/commit/e9edee0b65650c4f9db90cefc2e9a8125bad762c


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5571

___
Python tracker 

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



[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

In def find_good_parse_start:
str, pos = self.str, None
Using str as an attribute is ok, but using the bare built-in class name for an 
instance thereof is annoying.  's' would be better, or even 'sample' (to be 
analyzed).

--

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
keywords: +patch
pull_requests: +5570
stage:  -> patch review

___
Python tracker 

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2018-02-20 Thread Terry J. Reedy

New submission from Terry J. Reedy :

Actually, 'replace' 'Integral' with 'Integer' but keep 'Integral' for back 
compatibility.

>From python-ideas, where Guido said "Looking at 
>https://en.wikipedia.org/wiki/Number it seems that Integer is "special" -- 
>every other number type is listed as " numbers" (e.g. rational 
>numbers, complex numbers) but integers are listed as "Integers". So let's just 
>switch it to that, and keep Integral as an alias for backwards compatibility. 
>I don't think it's a huge problem to fix this in 3.7b2, if someone wants to do 
>the work."

PR needs What's New entry.

Ned, if you disagree as RM, please say so.

--
messages: 312463
nosy: ned.deily, terry.reedy
priority: high
severity: normal
stage: test needed
status: open
title: Add 'Integer' as synonym for 'Integral' in numbers module.
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



[issue32859] os.dup2() tests dup3() availability on each call

2018-02-20 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 16de2a9b8697cf90840eb217fb079f9c4c73e588 by Benjamin Peterson 
(Miss Islington (bot)) in branch '3.6':
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
https://github.com/python/cpython/commit/16de2a9b8697cf90840eb217fb079f9c4c73e588


--

___
Python tracker 

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



[issue28886] Move deprecated abc module decorators to separate section in docs

2018-02-20 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 0150dc589439a9a78c80c2aa8d7d6c5d3bba1d6d by INADA Naoki (Miss 
Islington (bot)) in branch '3.6':
bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)
https://github.com/python/cpython/commit/0150dc589439a9a78c80c2aa8d7d6c5d3bba1d6d


--

___
Python tracker 

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



[issue28886] Move deprecated abc module decorators to separate section in docs

2018-02-20 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 7452f6d8fa3ffe5dab20f7e4244851a6eca397be by INADA Naoki (Miss 
Islington (bot)) in branch '3.7':
bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)
https://github.com/python/cpython/commit/7452f6d8fa3ffe5dab20f7e4244851a6eca397be


--

___
Python tracker 

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



[issue28886] Move deprecated abc module decorators to separate section in docs

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5569

___
Python tracker 

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



[issue28886] Move deprecated abc module decorators to separate section in docs

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5568
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



[issue28886] Move deprecated abc module decorators to separate section in docs

2018-02-20 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 52c6b89796a7ec391db20281e05b256f57e97b35 by INADA Naoki (Harshul 
jain) in branch 'master':
bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)
https://github.com/python/cpython/commit/52c6b89796a7ec391db20281e05b256f57e97b35


--
nosy: +inada.naoki

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

This should be good now.
Thanks!

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d by Mariatta (Miss 
Islington (bot)) in branch '3.6':
bpo-32540: Update venv documentation (GH-5736)
https://github.com/python/cpython/commit/76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d


--

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 98a86cbb9bed94a232263698041acd2775da3dad by Mariatta (Miss 
Islington (bot)) in branch '3.7':
bpo-32540: Update venv documentation (GH-5736)
https://github.com/python/cpython/commit/98a86cbb9bed94a232263698041acd2775da3dad


--

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5567

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5566
stage: backport needed -> patch review

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

I've went ahead to initiate the backports.

--
stage: patch review -> backport needed
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

The PR was against master branch. So if backports are needed, you can add 
"needs backport to" labels on GH-5736 and the bot will take care of it.

--
nosy: +Mariatta

___
Python tracker 

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



[issue31106] os.posix_fallocate() generate exception with errno 0

2018-02-20 Thread Kubilay Kocak

Kubilay Kocak  added the comment:

I believe changeset d4b93e21c2664d6a78e0656e7a7be0807be1c352 may be the cause 
of buildbot failures on FreeBSD (at least koobs-freebsd-current, log attached), 
due to only the EBADF error being handled (not EINVAL, et al).

Unfortunately the worker was been offline for a longer than anticipated period 
of time and only recently was restored which delayed picking it up.

The issue (in this workers case) is related to the buildbot home/data directory 
being on a ZFS filesystem, who's host was recently updated (from current late 
last year to yesterday).

Initial investigation/isolation/references:

Disable posix_fallocate(2) for ZFS
https://lists.freebsd.org/pipermail/svn-src-head/2017-November/105709.html

Note: Above change will be relevant (merged) for at least FreeBSD 12 and 11, 
but perhaps even 10.

684: posix_fallocate() should be allowed to return ENOTSUP (Interp Status: 
Approved)
http://austingroupbugs.net/view.php?id=684

[HEADS UP] posix_fallocate support removed from ZFS, lld affected
https://lists.freebsd.org/pipermail/freebsd-current/2017-November/067463.html
Snip: "illumos and ZoL seem to do the same."

Gold fails when output file is lying on ZFS 
https://sourceware.org/bugzilla/show_bug.cgi?id=22540

Given the wide scope of use of zfs and both syscalls across multiple OS's, and 
possible changes to POSIX documentation/standards, changes to the underlying 
fallocate/fadvise functions may also be indicated here.

--
nosy: +koobs
versions: +Python 3.8
Added file: 
https://bugs.python.org/file47454/koobs-freebsd-current.non-debug.3.x.build.16.stdio.txt

___
Python tracker 

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



[issue32493] UUID Module - FreeBSD build failure

2018-02-20 Thread Kubilay Kocak

Change by Kubilay Kocak :


--
stage: resolved -> needs patch

___
Python tracker 

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



[issue32881] pycapsule:PyObject * is NULL pointer

2018-02-20 Thread zhaoya

zhaoya  added the comment:

FUNCTION_CALL_MODE is __stdcall i think no problem.because, if 
GetContext(PyObject  *capsule) -->GetContext() is ok. PyObject  *capsule from 
python to c unknown error occurred.

--

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I thought I saw the PR to the 3.6 branch. If that's not the case - a backport 
to 3.7 would be much appreciated.

--

___
Python tracker 

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



[issue32843] More revisions to test.support docs

2018-02-20 Thread Nick Coghlan

Nick Coghlan  added the comment:

For TESTFN_NONASCII vs TESTFN_UNICODE (inferred from reading the current code & 
https://github.com/python/cpython/commit/8b219b2936d767bf6c6c17618db3a7b22fc2e865):

* TESTFN_NONASCII guarantees that it can be encoded and decoded with the 
default filesystem encoding, but may be None if it can't find a suitable 
non-ASCII character that meets that constraint. This allows affected tests to 
be easily skipped on platforms where they can't work.
* TESTFN_UNICODE is always set, but may *not* be encodable with os.fsencode()

(The two could potentially be consolidated by converting the tests that use 
TESTFN_UNICODE over to TESTFN_NONASCII, but for now it makes sense to just 
document the above differences)

For the logging helpers, I'd check how they're used in test_logging: if they're 
used in logging configuration tests, they may be in test.support to avoid 
reimporting the module that defines the logging tests. If so, then they can be 
filed away in their own subsection at the end of the test.support 
documentation. If not, then yeah, moving them into test_logging would make 
sense.

Similarly, moving the distutils helper makes sense to me, *unless* there's a 
specific reason that importing it from "distutils.tests.support" instead would 
be problematic.

--

___
Python tracker 

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



[issue32008] Example suggest to use a TLSv1 socket

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Christian,

Would you have any feedback on this?  Thanks!

--
nosy: +christian.heimes, csabella

___
Python tracker 

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



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

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I started taking a look at this and discovered a few things.  There are four 
methods in the C module `_lsprof` that are within the Profiler class - 
`enable`, `disable`, `getstats`, and `clear` and which are all available 
through cProfile.Profile.  These aren't available in profile.py.  Also, 
`getstats` and `clear` aren't in the documentation and `enable` takes two 
optional parameters that aren't mentioned in the documentation.  There are also 
many methods in profile.py that aren't documented.

What would be the preferred approach to fixing the documentation?  It seems 
that the documentation currently focuses on trying to make profile and cProfile 
as similar as possible.  Should they have separate sections that define the 
differences?  Or should `enable` and `disable` be removed since they aren't in 
profile?  The example under 
https://docs.python.org/3.8/library/profile.html#profile.Profile  uses `enable` 
and `disable` and seems to be a helpful example.

--
nosy: +csabella
stage:  -> needs patch
versions: +Python 3.8

___
Python tracker 

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



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

2018-02-20 Thread Eric Snow

Eric Snow  added the comment:


New changeset eed3c7af4ec520d324a55e0357f41589a66906f7 by Eric Snow (Miss 
Islington (bot)) in branch '3.7':
bpo-32604: Swap threads only if the interpreter is different. (gh-5783)
https://github.com/python/cpython/commit/eed3c7af4ec520d324a55e0357f41589a66906f7


--

___
Python tracker 

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



[issue32890] os: Some functions may report bogus errors on Windows

2018-02-20 Thread Alexey Izbyshev

Change by Alexey Izbyshev :


--
keywords: +patch
pull_requests: +5565
stage:  -> patch review

___
Python tracker 

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



[issue32890] os: Some functions may report bogus errors on Windows

2018-02-20 Thread Alexey Izbyshev

New submission from Alexey Izbyshev :

Demo:

>>> os.execve('', ['a'], {})
Traceback (most recent call last):
  File "", line 1, in 
OSError: [WinError 0] The operation completed successfully: ''

The reason is that path_error() used throughout os module always uses 
GetLastError() on Windows, but some functions are implemented via CRT calls 
which report errors via errno. It seems that commit 292c83554 caused this issue.

--
messages: 312446
nosy: izbyshev, vstinner
priority: normal
severity: normal
status: open
title: os: Some functions may report bogus errors on Windows
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32540] venv docs - doesn't match behavior

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Does this need to be backported to 3.7 and 3.6?  Or can it be closed as 
resolved?

--
nosy: +csabella

___
Python tracker 

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



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

2018-02-20 Thread Eric Snow

Eric Snow  added the comment:


New changeset f53d9f2778a87bdd48eb9030f782a4ebf9e7622f by Eric Snow in branch 
'master':
bpo-32604: Swap threads only if the interpreter is different. (gh-5778)
https://github.com/python/cpython/commit/f53d9f2778a87bdd48eb9030f782a4ebf9e7622f


--

___
Python tracker 

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



[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

StringTranslatePseudoMapping (Mapping) is an awkward and not very descriptive 
name.  It is similar to collections.defaultdict except that it uses a default 
value rather than a default factory.  The latter is so defaults can be 
mutables.  Would a subclass of similar to defaultdict be faster?

Unlike, defaultdict, the initialized default is used in get as well as 
__getitem__.  This means that STPM.get ignores a passed-in default, contrary to 
the definition of Mapping.get.  The method override is not needed.

The internal self._get is only needed because it is called in both __getitem__ 
and get.  Without the get override, it's body (with 'self.' added, can become 
the body of __getitem__.  I suspect that this would make __getitem__ faster.  
Test this.

--

___
Python tracker 

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



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

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5564

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico

Chris Angelico  added the comment:

(BTW, by "proposed" I mean that the change that I describe is in the PR.)

--

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset 2b9726eb647e856d83eafdc30cdbbc31a5920ab6 by Miss Islington (bot) 
in branch '3.6':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk 
is not found (GH-5240)
https://github.com/python/cpython/commit/2b9726eb647e856d83eafdc30cdbbc31a5920ab6


--

___
Python tracker 

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



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Response to msg312428: I would generally prefer to put off using 3.x feature in 
module m until after we think we are done patching m for 3.(x-1), but do so 
before 3.x.0 release.  When 3.x-1 went to security status a week after the 3.x 
release, this was not much an issue.

In this case, we could use 'isascii' freely after
3.7+: isascii = str.isascii
3.6:  def isascii(s): return all(ord(c) < 128 for c in s)

Concrete code change proposals, including in hyperparser, should go on #32880.

In #21765, I mentioned looking at ColorDelegator and UndoDelegator.  I never 
did that, but added this to my list of possible issues.

--

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset 1d927d4feba856cacc026a9167ba38c73a4e7657 by Miss Islington (bot) 
in branch '3.7':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk 
is not found (GH-5240)
https://github.com/python/cpython/commit/1d927d4feba856cacc026a9167ba38c73a4e7657


--
nosy: +miss-islington

___
Python tracker 

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



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Respone to msg312353: Yes, let us restrict this to testing pyparse code as is.  
I opened issue #32880 for changing the code.  My followup post discusses parse 
variable initialization.

Putting instance variable defaults in class attributes is a known practice.  
But this is usually done when the 'default' is the most common value, not when 
the class attribute is always masked, before access, by an instance attribute 
of the same name.

One could claim that it is buggy to not create a new Parser instance for each 
subtest.  But the class appears to be designed for instance reuse, by having a 
separate set string method and by never looking at string-specific attributes 
until set from the string.

We could instead say that the bug is the test checking an undefined value. I 
rejected the option of not looking when test.lastopenbracketpos is None and 
instead suggest on the new issue that this instance attribute always be freshly 
set, like all the others.

--

___
Python tracker 

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



[issue32863] Missing support for Emojis in tkinter

2018-02-20 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The 3.7b1 64-bit installer includes a local copy of Tcl/Tk (see 
Mac/BuildScript/build-installer.py), which could be changed as needed. That 
said, I'm not advocating changing default Tcl/Tk configuration options because 
I don't know how well full unicode builds are supported (and if that would fix 
anything).

 seems to 
indicate that at least one emoji related issue has been fixed very recently in 
Tk (later than the latest Tcl/Tk release).

--

___
Python tracker 

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



[issue32889] Valgrind suppressions need updating

2018-02-20 Thread Paul Price

New submission from Paul Price :

Using the current valgrind suppressions (Misc/valgrind-python.supp) results in 
a lot of noise, e.g.:

==2662549== Conditional jump or move depends on uninitialised value(s)
==2662549==at 0x4EFD734: address_in_range (obmalloc.c:1200)
==2662549==by 0x4EFD734: _PyObject_Free (obmalloc.c:1467)
==2662549==by 0x4FAA6A3: block_free (pyarena.c:95)
==2662549==by 0x4FAA6A3: PyArena_Free (pyarena.c:169)

The suppressions are blocking Py_ADDRESS_IN_RANGE, but this function was 
renamed in 3.6.

--
messages: 312436
nosy: Paul Price
priority: normal
pull_requests: 5563
severity: normal
status: open
title: Valgrind suppressions need updating
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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5562

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5560

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5561

___
Python tracker 

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



[issue32886] new Boolean ABC in numbers module + Integral>Integer renaming

2018-02-20 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

First off, link to discussion: 
https://groups.google.com/d/topic/python-ideas/-3QW3cxj3ko/discussion

1. bool is already a virtual subclass of Integral since it's an actual subclass 
of int (which is a virtual subclass of Integral); no need to explicitly 
register it

2. Don't try to register numpy's types for them; doing so would mean simply 
having numpy installed forces it to be imported if you import numbers, even if 
your script never uses numpy. Let numpy add registration for the type itself.

3. If Boolean is not a subclass of Integer/Integral, why is it in the numbers 
module at all? The discussion seemed to suggest putting it in numbers when the 
idea was that Boolean would subclass Integer/Integral; if it's not numeric at 
all, then the numbers module doesn't make sense.

4. Obviously, it's impossible to overload the not behavior (__bool__ is called 
directly to get a true bool, then the result is inverted, there is no special 
method for handling the not keyword), so it looks like the proposal is to make 
__invert__ part of the interface. Except bool itself doesn't behave in a way 
that would make __invert__ make sense as a drop in substitution for not; ~True 
produces -2, ~False produces -1, in neither case does it produce a bool result, 
and the result is always truthy. Changing this is impractical, since it would 
violate the int-like behavior of bool (which has been a historical guarantee).

--
nosy: +josh.r

___
Python tracker 

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



[issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk"

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 80d20b918bd8a882043c493a7f958333ecb41727 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk 
is not found (#5240)
https://github.com/python/cpython/commit/80d20b918bd8a882043c493a7f958333ecb41727


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-20 Thread Nico Schlömer

Nico Schlömer  added the comment:

> Existing libm implementations don't work,

Okay. Is this because of the inf/NaN discrimination hiccups mentioned above or 
are there any other pitfalls?

--

___
Python tracker 

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Do I read this thread correctly assuming that this hasn't been implemented 
> yet?

Yes. Existing libm implementations don't work, so simply wrapping the libm 
function isn't enough. And writing an implementation from scratch is 
non-trivial.

--

___
Python tracker 

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



[issue29282] Fused multiply-add: proposal to add math.fma()

2018-02-20 Thread Nico Schlömer

Nico Schlömer  added the comment:

Do I read this thread correctly assuming that this hasn't been implemented yet? 
If not, I would probably make my own little library for this -- I really need 
the feature for the precision.

--
nosy: +nschloe

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-02-20 Thread miss-islington

miss-islington  added the comment:


New changeset 6ae87cae091f4835090c10c1e65eb057a13fca2c by Miss Islington (bot) 
in branch '3.6':
bpo-32500: Correct the documentation for PySequence_Size() and 
PySequence_Length() (GH-5767)
https://github.com/python/cpython/commit/6ae87cae091f4835090c10c1e65eb057a13fca2c


--
nosy: +miss-islington

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico

Chris Angelico  added the comment:

Actually, it's a bit more complicated than I thought. Current proposed 
solution: Track the context of each conversion, thus allowing different errors 
to be distinguished.

--

___
Python tracker 

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



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Thanks for pointing out #21765 - very interesting reading.  :-)

Would the new str.isascii() be helpful or would it be too early to use 
something only available in 3.7?  It would seem that and combinations of `if 
isascii() and isidentifier()` might be interesting to benchmark against some of 
the current code.

--

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico

Chris Angelico  added the comment:

Hmm, I think I see what I broke there. It was part of the merge conflict 
resolution - I moved the check into the function, which is actually incorrect. 
It wasn't misleading like that in the original patch. Will fix that.

--

___
Python tracker 

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



[issue32881] pycapsule:PyObject * is NULL pointer

2018-02-20 Thread Steve Dower

Steve Dower  added the comment:

What is the definition of FUNCTION_CALL_MODE? And if it is anything other than 
"stdcall", change "ctypes.windll" to "ctypes.cdll" and try again.

You should also consider posting this to python-list, as it is almost certainly 
a problem in your DLL and not in Python itself.

--

___
Python tracker 

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



[issue24255] Replace debuglevel-related logic with logging

2018-02-20 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Hey Erin,

Can you please convert your patch to a PR on Github?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I afraid this makes an error message more confusing and misleading.

>>> ast.literal_eval('~2')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval
return _convert(node_or_string)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 92, in _convert
return _convert_signed_num(node)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num
return _convert_num(node)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num
raise ValueError('%s not allowed in literal' % type(node).__name__)
ValueError: UnaryOp not allowed in literal

This is not true since + and - are allowed:

>>> ast.literal_eval('-2')
-2

>>> ast.literal_eval('2+3')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval
return _convert(node_or_string)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 92, in _convert
return _convert_signed_num(node)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num
return _convert_num(node)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num
raise ValueError('%s not allowed in literal' % type(node).__name__)
ValueError: BinOp not allowed in literal

But:

>>> ast.literal_eval('2+3j')
(2+3j)

>>> ast.literal_eval('"a"+"b"')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval
return _convert(node_or_string)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 85, in _convert
left = _convert_signed_num(node.left)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num
return _convert_num(node)
  File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num
raise ValueError('%s not allowed in literal' % type(node).__name__)
ValueError: Str not allowed in literal

But Str is allowed:

>>> ast.literal_eval('"ab"')
'ab'

--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2018-02-20 Thread Eric Snow

Change by Eric Snow :


--
pull_requests: +5559

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico

Change by Chris Angelico :


--
keywords: +patch
pull_requests: +5558
stage:  -> patch review

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5557

___
Python tracker 

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



[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico

New submission from Chris Angelico :

When a non-literal is given to literal_eval, attempt to be more
helpful with the message, rather than calling it 'malformed'.

--
components: Library (Lib)
messages: 312423
nosy: Rosuav
priority: normal
pull_requests: 
severity: normal
status: open
title: Improve exception message in ast.literal_eval
versions: Python 3.8

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5556

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-02-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5554

___
Python tracker 

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



[issue32500] PySequence_Length() raises TypeError on dict type

2018-02-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd by Mariatta (Zackery 
Spytz) in branch 'master':
bpo-32500: Correct the documentation for PySequence_Size() and 
PySequence_Length() (GH-5767)
https://github.com/python/cpython/commit/7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd


--
nosy: +Mariatta

___
Python tracker 

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



[issue32887] os: Users of path_converter don't handle fd == -1 properly

2018-02-20 Thread Alexey Izbyshev

Change by Alexey Izbyshev :


--
nosy: +larry

___
Python tracker 

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



[issue32887] os: Users of path_converter don't handle fd == -1 properly

2018-02-20 Thread Alexey Izbyshev

New submission from Alexey Izbyshev :

Demo:
>>> import os
>>> os.chdir(-1)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 14] Bad address: -1
>>> os.chdir(-2)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 9] Bad file descriptor: -2

Functions in os supporting either path or file descriptor argument 
(os.supports_fd) usually use the following code pattern to distinguish between 
those cases:

if (path->fd != -1)
result = fchdir(path->fd);
else
result = chdir(path->narrow);

However, _fd_converter used by path_converter internally doesn't give any 
special meaning to -1 and allows any negative file descriptors. Therefore, if a 
user passes -1 to such function, path->narrow, which is NULL, will be used.

I see two ways to fix this.
1) Make some flag in path_t indicating that it should be treated as fd and make 
all users check that flag.
2) Make _fd_converter raise an exception for negative descriptors.

Also, I have to mention an inconsistency in reporting of bad descriptors. A 
handful of os functions uses fildes_converter for descriptors, which uses 
PyObject_AsFileDescriptor, which in turn is used in other places in Python as 
well (e.g. in fcntl module). PyObject_AsFileDescriptor raises a ValueError for 
negative descriptors instead of OSError raised by most os functions in this 
case.

>>> os.fchdir(-1)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: file descriptor cannot be a negative integer (-1)

--
messages: 312421
nosy: izbyshev
priority: normal
severity: normal
status: open
title: os: Users of path_converter don't handle fd == -1 properly
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32843] More revisions to test.support docs

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I've made the changes requested.  I wasn't sure about:

TESTFN_NONASCII - How different from TESTFN_UNICODE?


Should I move these out of test.support?:
missing_compiler_executable(cmd_names=[]) - It is used only in distutils tests 
and should be in distutils.tests.support.
Matcher() - This class is used only in test_logging, and only with TestHandler. 
These classes should be documented together and with references to logging. I'm 
not sure they should be in test.support.
TestHandler(logging.handlers.BufferingHandler) - I'm not sure it should be in 
test.support rather of test_logging.

Thanks!

--
stage: patch review -> 

___
Python tracker 

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



[issue32843] More revisions to test.support docs

2018-02-20 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
stage:  -> patch review

___
Python tracker 

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



[issue32843] More revisions to test.support docs

2018-02-20 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +5553
stage:  -> patch review

___
Python tracker 

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



[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Rudolph Froger

Rudolph Froger  added the comment:

> Could it be simply because daemon is respawned from a process that does have 
> a valid stdin at the time of respawn?

Yes, that could certainly be the case. Thanks!

--

___
Python tracker 

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



[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Alexey Izbyshev

Change by Alexey Izbyshev :


--
keywords: +patch
pull_requests: +5552
stage:  -> patch review

___
Python tracker 

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



[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

> But I'm not sure why it can be solved, sometimes, by restarting the the 
> daemon.

Could it be simply because daemon is respawned from a process that does have a 
valid stdin at the time of respawn?

Note that daemon has an option to redirect std streams to /dev/null.

--

___
Python tracker 

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



[issue32883] Key agreement parameters not accessible

2018-02-20 Thread sruester

sruester  added the comment:

How about a new method crypto_information() and making cipher() a wrapper 
around that one? The former could return a named tupple with handshake 
information together with all other relevant crypto information about the 
current session.

This would eliminate the need to define several new methods while keeping 
backwards compatibility of cipher().

--

___
Python tracker 

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



[issue32886] new Boolean ABC in numbers module + Integral>Integer renaming

2018-02-20 Thread Sylvain Marie

New submission from Sylvain Marie :

This issue is created following the discussion [Python-ideas] Boolean ABC 
similar to what's provided in the 'numbers' module.

The following items are suggested:
 - adding a 'Boolean' ABC class to the 'numbers' module
 - register python 'bool' as a virtual subclass of both 'Boolean' and 'Integral'
 - register numpy bool ('np.bool_') as a virtual subclass of 'Boolean' only
 - rename 'Integral' 'Integer' and leave 'Integral' as an alias for backwards 
compatibility

Below is a proposal Boolean class:

-

class Boolean(metaclass=ABCMeta):
"""
An abstract base class for booleans.
"""
__slots__ = ()

@abstractmethod
def __bool__(self):
"""Return a builtin bool instance. Called for bool(self)."""

@abstractmethod
def __and__(self, other):
"""self & other"""

@abstractmethod
def __rand__(self, other):
"""other & self"""

@abstractmethod
def __xor__(self, other):
"""self ^ other"""

@abstractmethod
def __rxor__(self, other):
"""other ^ self"""

@abstractmethod
def __or__(self, other):
"""self | other"""

@abstractmethod
def __ror__(self, other):
"""other | self"""

@abstractmethod
def __invert__(self):
"""~self"""


# register bool and numpy bool_ as virtual subclasses
# so that issubclass(bool, Boolean) = issubclass(np.bool_, Boolean) = True
Boolean.register(bool)

try:
import numpy as np
Boolean.register(np.bool_)
except ImportError:
# silently escape
pass

# bool is also a virtual subclass of Integral. np.bool_ is not.
Integral.register(bool)

--
components: Library (Lib)
messages: 312416
nosy: smarie
priority: normal
severity: normal
status: open
title: new Boolean ABC in numbers module + Integral>Integer renaming
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



[issue32820] Add __format__ method to ipaddress

2018-02-20 Thread Nick Coghlan

Nick Coghlan  added the comment:

I've updated the issue title to reflect the revised proposal (i.e. using 
__format__ rather than a new IP address specific method).

--
title: Add bits method to ipaddress -> Add __format__ method to ipaddress

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

And Eric, please avoid including the quote of previous message in your 
messages. This makes hard to read your messages and the whole discussion.

--

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-20 Thread Eric Osborne

Eric Osborne  added the comment:

Yeah, bits() is dead.  The thread has the same title, but I changed the PR
a while ago.  The diffs in the PR are for format().

I'll go over the code and clean it up.  The docstring in particular is
probably lousy.
Thanks!

eric

On Tue, Feb 20, 2018 at 3:35 AM Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> I the bits() method is a dead end. The conclusion was to add __format__().
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2018-02-20 Thread Christian Heimes

Christian Heimes  added the comment:

It's technically a new feature. But since it's just in Tools/, we could make an 
exception. I've removed the security branches from versions.

--
nosy: +christian.heimes
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2018-02-20 Thread Miro Hrončok

Change by Miro Hrončok :


--
keywords: +patch
pull_requests: +5551
stage:  -> patch review

___
Python tracker 

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



[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2018-02-20 Thread Miro Hrončok

Change by Miro Hrončok :


--
type:  -> behavior

___
Python tracker 

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



[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2018-02-20 Thread Miro Hrončok

Change by Miro Hrončok :


--
components: +Demos and Tools

___
Python tracker 

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



[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2018-02-20 Thread Miro Hrončok

New submission from Miro Hrončok :

We (Fedora's Python SIG) would like to promote usage of 
Tools/scripts/pathfix.py (we've even moved it to $PATH) in Fedora RPM build 
(a.k.a spec files) instead of various error prone finds + greps + seds.

However when running pathfix.py, it creates backup files (with ~ suffix). This 
is mostly unfortunate in RPM build environment, because one needs to clean 
those up, otherwise one gets warnings and errors like this:


error: Installed (but unpackaged) file(s) found:
   /usr/bin/spam~


Or the file with ~ might even get installed if a more relaxed patter is used in 
a %files section that lists what is part of the RPM package.

%{_bindir}/spam-*


We even have shebangs checks/mangling in place and the ~ suffixed file still 
has the wrong shebang, resulting in warnings like this:

*** WARNING: mangling shebang in /usr/bin/spam~ from #!/usr/bin/python -Es to 
#!/usr/bin/python2 -Es. This will become an ERROR, fix it manually!



Steps to Reproduce:
1. $ echo '#!python' > omg
2. $ Tools/scripts/pathfix.py -i "/usr/bin/python3" -p omg  # possibly with 
extra flag, see bellow
omg: updating
3. $ ls

Actual results: omg  omg~


Expected results: omg



Since the backup feature was here for ages, instead of changing the behavior, I 
suggest a flag is added that disables this. 2to3 has exactly the proposed flag 
as: "-n, --nobackups   Don't write backups for modified files".

This doesn't necessarily need to go into all versions, but I've selected all 
that has this problem. Getting it to 3.6+ would be great, however if it goes to 
anything later, we'll backport it in the Fedora package.


I have a patch ready, sill send PR.

--
messages: 312411
nosy: hroncok
priority: normal
severity: normal
status: open
title: Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no 
opt-out
versions: Python 2.7, Python 3.4, Python 3.5, 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



[issue32882] SSLContext.set_ecdh_curve() not accepting x25519

2018-02-20 Thread sruester

Change by sruester :


--
pull_requests: +5550

___
Python tracker 

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



[issue32884] Adding the ability for getpass to print asterisks when passowrd is typed

2018-02-20 Thread Matanya Stroh

New submission from Matanya Stroh :

I saw some questions about it in stackoverflow (links below), and also find it 
very useful to have the ability to print asterisks.
Some users, find it disturbing when they don't have any indication that 
password is typed, and it will be helpful to have it.

I know that it's have some risks exposing the number of chars to the password, 
but I think it's worth it.

When using Jupyter (notebook server is 4.3.1) the password does echoed as "*", 
but not in Python IDE in linux and Windows

1) 
https://stackoverflow.com/questions/10990998/how-to-have-password-echoed-as-asterisks
2) 
https://stackoverflow.com/questions/7838564/how-to-read-password-with-echo-in-python-console-program

--
components: Library (Lib)
messages: 312410
nosy: matanya.stroh
priority: normal
severity: normal
status: open
title: Adding the ability for getpass to print asterisks when passowrd is typed
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue32882] SSLContext.set_ecdh_curve() not accepting x25519

2018-02-20 Thread sruester

Change by sruester :


--
keywords: +patch
pull_requests: +5549
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



[issue32883] Key agreement parameters not accessible

2018-02-20 Thread Christian Heimes

Christian Heimes  added the comment:

I'd prefer to have a generic handshake info method that returns a structured 
object like a named tuple with handshake information. We could start with key 
exchange / key agreement, TLS version, cipher suite, etc. Later the method 
could be extended and include information such as signature algorithms, offered 
suites and versions (server-side), and more.

--
superseder:  -> Improve OpenSSL ECDH support

___
Python tracker 

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



  1   2   >