[issue33512] use more standard approach for detecting long double in configure

2018-05-15 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 3055c947f98a078bd10d6a8cc352048a1b771d60 by Benjamin Peterson 
(Eitan Adler) in branch 'master':
closes bpo-33512: use standard for detecting long double (GH-6847)
https://github.com/python/cpython/commit/3055c947f98a078bd10d6a8cc352048a1b771d60


--
nosy: +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



[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-15 Thread Paul Goins

Paul Goins  added the comment:

If we consider this to be the new normal...  What about increasing the timeout 
to accomodate?  From what I could gather, builds were running around 13 minutes 
or so before the changes, so the timeout wasn't much above actual exec time to 
begin with.  Maybe bump the timeout up to 20, maybe even 30 minutes?  (Granted, 
I don't know the intent of the timeout: whether it was intended to capture 
sudden performance delays like this in case of adverse code changes, or whether 
15 minutes simply "sounded good" and thus was set.)

I know that for my own projects I would be reluctant to suggest the above; it 
seems better to dig in and understand why there was such a jump in exec time on 
test_io.  But without having access to the build agents nor having an 
environment handy which reproduces the issue, this is the best suggestion I can 
come up with to move this towards resolution.

--

___
Python tracker 

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



[issue33473] build system incorrectly handles CC, CFLAGS, LDFLAGS, and related.

2018-05-15 Thread Eitan Adler

Change by Eitan Adler :


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

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-05-15 Thread Berker Peksag

Berker Peksag  added the comment:

Adding Łukasz since he is the release manager of Python 3.8.

--
components: +Library (Lib)
nosy: +lukasz.langa
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



[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2

2018-05-15 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eitan.adler

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset c73268aad7645a146b3e0e088c198a1fb74d57ff by Miss Islington (bot) 
in branch '3.7':
bpo-33453: Handle string type annotations in dataclasses. (GH-6768)
https://github.com/python/cpython/commit/c73268aad7645a146b3e0e088c198a1fb74d57ff


--
nosy: +miss-islington

___
Python tracker 

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



[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-15 Thread pyneda

New submission from pyneda :

A possible use case (that at least I couldn't find how to solve) is the 
possibility to cancel a bunch of futures/coroutine objects which are being 
awaited using asyncio.tasks.wait() by one of the running coroutines when a task 
succeded or a specific condition happens by just raising an specific exception.

At the moment this can be done but it will cancel all the coroutines with any 
exception that is raised and at some occasions this may not be desired.

A simple example:

async def example(num):
if x == 5:
raise Exception('Exception that does not cancel')
elif x == 15:
raise CancelException()

tasks = [asyncio.ensure_future(example(x)) for x in range(20)]
done, pending = await asyncio.wait(tasks, return_when=FIRST_EXCEPTION, 
return_on=CancelException)

This wouldn't cancel everything when a normal exception is raised, instead it 
will when the exception raised is the one that the user expects to be raised in 
order to cancel everything that is pending. 

In addition, if the user does not specify the Exception type, it uses default 
Exception so it would keep working exactly as now.

--

___
Python tracker 

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



[issue21145] Add the @cached_property decorator

2018-05-15 Thread Carl Meyer

Carl Meyer  added the comment:

> a way to invalidate or clear the cache

This is already supported by the simple implementation in the patch, it's 
spelled `del obj.the_cached_property`.

> mock patching the underlying function for testing

This is easy to do with the current implementation, you can replace the 
cached-property descriptor on the class with `mock.patch`.

> consistency between multiple cached properties cached in different threads

The patch attached here is already thread-safe and will be consistent between 
threads.

> inability to run the method through a debugger

If you `s` in the Python debugger on a line where a property or cached property 
is accessed, you will step into the decorated method. I've done this often, so 
I'm not sure what the issue would be here.

> moving the cache valued from an instance variables to an external weakref 
> dictionary

This would be a totally different descriptor that doesn't share much 
implementation with the one proposed here, so I don't see how providing the 
common version inhibits anyone from writing something different they need for 
their case.

> The basic recipe is simple so there isn't much of a value add by putting this 
> in the standard library.

It's simple once you understand what it does, but it's quite subtle in the way 
it relies on priority order of instance-dict attributes vs non-data descriptors.

My experience over the past decade is different from yours; I've found that the 
simple `cached_property` proposed here is widely and frequently useful 
(basically it should be the preferred approach anytime an object which is 
intended to be immutable after construction has some calculated properties 
based on its other attributes), and additional complexity is rarely if ever 
needed. I think the wide usage of the version proposed here (without 
extensions) in code in the wild bears this out. Likely a main reason there 
hasn't been a stronger push to include this in the standard library sooner is 
that so many people are just using it from 
`django.utils.functional.cached_property` today.

--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-15 Thread Carl Meyer

Carl Meyer  added the comment:

> a system-wide environment variable

Environment variables aren't system-wide, they are per-process (though they can 
be inherited by child processes).

--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-15 Thread Carl Meyer

Carl Meyer  added the comment:

Environment variable seems to make a bit more sense for this, since it's not 
per-invocation; there's no point writing bytecode cache to a particular 
location unless the next invocation reads the cache from there.

Our use case includes a webserver process that embeds Python; I'm not sure if 
we could pass a CLI arg to it or not.

Python has lots of precedent for similar environment variables (e.g. 
`PYTHONHOME`, `PYTHONDONTWRITEBYTECODE`, `PYTHONPATH`, etc). Compared to those, 
`PYTHONBYTECODEPATH` is pretty much harmless if it "leaks" to an unintended 
process.

I asked Brett Cannon in the sprints if I should add a CLI flag in addition to 
the env var; he suggested it wasn't worth it. I'm not opposed to adding the CLI 
flag, but I think removing the env var option would be a mistake.

--

___
Python tracker 

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



[issue33530] Implement Happy Eyeball in asyncio

2018-05-15 Thread twisteroid ambassador

New submission from twisteroid ambassador :

Add a Happy Eyeballs implementation to asyncio, based on work in 
https://github.com/twisteroidambassador/async_stagger .

Current plans:

- Add 2 keyword arguments to loop.create_connection and asyncio.open_connection.

* delay: Optional[float] = None. None disables happy eyeballs. A number >= 
0 means the delay between starting new connections.

* interleave: int = 1. Controls reordering of resolved IP addresses by 
address family.

- Optionally, expose the happy eyeballs scheduling helper function. 

* It's currently called "staggered_race()". Suggestions for a better name 
welcome.

* Should it belong to base_events.py, some other existing file or a new 
file?

--
components: asyncio
messages: 316757
nosy: Yury.Selivanov, asvetlov, twisteroid ambassador, yselivanov
priority: normal
severity: normal
status: open
title: Implement Happy Eyeball in asyncio
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



[issue33496] Accept Pathlib paths for sqlite file

2018-05-15 Thread devala

devala  added the comment:

Resolved in 3.7.

--
resolution:  -> not a bug
stage:  -> 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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-15 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6562

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-15 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset 2a7bacbd913cf2bf568b3c0f85a758946d3cf4e9 by Eric V. Smith in 
branch 'master':
bpo-33453: Handle string type annotations in dataclasses. (GH-6768)
https://github.com/python/cpython/commit/2a7bacbd913cf2bf568b3c0f85a758946d3cf4e9


--

___
Python tracker 

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



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

2018-05-15 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +6561

___
Python tracker 

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



[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Eryk Sun

Change by Eryk Sun :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Eryk Sun

Eryk Sun  added the comment:

The exec functions provided by the Windows C runtime really are practically 
useless, due to creating an orphaned process, disrupting synchronous operation, 
and returning the wrong status code. It might be more useful for Python 3.7.x 
to implement an internal win32_execv[e] function that calls _wspawnv[e] with 
_P_NOWAIT mode. Assign the child process to a silent-breakaway, kill-on-close 
Job. Wait for it to end, and exit with the child's status code.

--
nosy: +eryksun
versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue29706] IDLE needs syntax highlighting for async and await

2018-05-15 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



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

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset 47793dec38b9485601a1b2fae90d5f19c3442434 by Miss Islington (bot) 
in branch '3.6':
bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873)
https://github.com/python/cpython/commit/47793dec38b9485601a1b2fae90d5f19c3442434


--

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Andrés Delfino

Andrés Delfino  added the comment:

I'm sorry, because of your comment, I believe you haven't read the last update 
on the PR. Could you take a look at it?

https://github.com/python/cpython/pull/6829

--

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Guido van Rossum

Guido van Rossum  added the comment:

(1) The word "stores" in this paragraph:

A metadata value associated with a global variable, a class attribute or a
function or method parameter or return value, that stores a type hint.

(2) The description of how annotations are stored in __annotations__ in the
following paragraph.

(3) The omission of local variables from the lists of things in those
paragraphs that can be annotated (those are the only category whose
annotation is not stored at runtime).

--

___
Python tracker 

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



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

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset 3d484435d261ef6e3204902f50778b545428dd7e by Miss Islington (bot) 
in branch '3.7':
bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873)
https://github.com/python/cpython/commit/3d484435d261ef6e3204902f50778b545428dd7e


--

___
Python tracker 

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



[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra

Jelle Zijlstra  added the comment:

Makes sense. I can provide a patch to the docs.

--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-15 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, I've had issues with environment variables in that they affect every 
version of Python running on a system and seem to defy isolation.  So, if one 
application needs the environment variable set, it will affect every 
application, even if it wants to keeps its contents private and not leak 
outside of a virtual environment.

Can your needs be met with just CLI flag rather than a system-wide environment 
variable?

--
nosy: +rhettinger

___
Python tracker 

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



[issue33529] Infinite loop on folding email if headers has no spaces

2018-05-15 Thread radical164

New submission from radical164 :

I just reported a bug about email folding at issue 33524, but this issue is 
more fatal in some languages like Chinese or Japanese, which does not insert 
spaces between each words.
Python 3.6.5 has this issue, while 3.6.4 does not.

Create an email with longer header than max_line_length set by its policy.  And 
the header contains non-ascii characters but no white spaces.
When try to fold it, python gets stuck and finally system hangs. There are no 
output unless I stop it with Ctrl-C.

^CTraceback (most recent call last):
  File "emailtest.py", line 7, in 
policy.fold("Subject", msg["Subject"])
  File "/usr/lib/python3.6/email/policy.py", line 183, in fold
return self._fold(name, value, refold_binary=True)
  File "/usr/lib/python3.6/email/policy.py", line 205, in _fold
return value.fold(policy=self)
  File "/usr/lib/python3.6/email/headerregistry.py", line 258, in fold
return header.fold(policy=policy)
  File "/usr/lib/python3.6/email/_header_value_parser.py", line 144, in fold
return _refold_parse_tree(self, policy=policy)
  File "/usr/lib/python3.6/email/_header_value_parser.py", line 2651, in 
_refold_parse_tree
part.ew_combine_allowed, charset)
  File "/usr/lib/python3.6/email/_header_value_parser.py", line 2735, in 
_fold_as_ew
ew = _ew.encode(first_part)
  File "/usr/lib/python3.6/email/_encoded_words.py", line 215, in encode
blen = _cte_encode_length['b'](bstring)
  File "/usr/lib/python3.6/email/_encoded_words.py", line 130, in len_b
groups_of_3, leftover = divmod(len(bstring), 3)
KeyboardInterrupt


Code to reproduce:

from email.message import EmailMessage
from email.policy import default

policy = default # max_line_length = 78
msg = EmailMessage()
msg["Subject"] = "á"*100
policy.fold("Subject", msg["Subject"])


No problems in following cases:

1. If the header is shorter than max_line_length.
2. If the header can be split with spaces and the all chunk is shorter than 
max_line_length.
3. If the header is fully composed with ascii characters. In this case, there 
is no problem even if it is very long without spaces.

--
components: email
messages: 316747
nosy: barry, r.david.murray, radical164
priority: normal
severity: normal
status: open
title: Infinite loop on folding email if headers has no spaces
type: behavior
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



[issue29706] IDLE needs syntax highlighting for async and await

2018-05-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 1b0d65fa102fae087254009f6d9903b1d4257d78 by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879)
https://github.com/python/cpython/commit/1b0d65fa102fae087254009f6d9903b1d4257d78


--

___
Python tracker 

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



[issue21145] Add the @cached_property decorator

2018-05-15 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, over the past decade, I've used variants of CachedProperty a number of 
times and have often had issues that later required messing with its internals 
(needing a way to invalidate or clear the cache, mock patching the underlying 
function for testing, consistency between multiple cached properties cached in 
different threads, inability to run the method through a debugger, 
inadvertently killing logging or other instrumentation, moving the cache valued 
from an instance variables to an external weakref dictionary etc).

I proposed the idea of a CachedProperty in descriptor tutorials over a decade 
ago.  Since then, I've grown wary of the idea of making them available for 
general use.  Instead, we're better with a recipe that someone can use to build 
their understanding and then customize as necessary.  The basic recipe is 
simple so there isn't much of a value add by putting this in the standard 
library.

If we want to add another property() variant, the one I've had the best luck 
with is CommonProperty() which lets you re-use the same getter and setter 
methods for multiple properties (the name of the property variable gets passed 
in as the first argument).

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-15 Thread Eric V. Smith

Change by Eric V. Smith :


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



[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> Should we add .copy() to the ABC or remove the promise that all mutable 
> sequences implement .copy()?

The second option would be best.  Let's just clarify that copy() isn't part of 
the MutableSequence API.

The first option isn't really a choice be it would break existing uses that 
don't implement copy and because the ABC have a reliable way to create a new 
instance using the given abstract methods (it has no way of even knowing 
whether the data is stored locally, in a database, or updated through a REST 
API, it may not even be possible to reliably create an independent instance).

--

___
Python tracker 

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



[issue33451] Start pyc file lock the file

2018-05-15 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +brett.cannon, eric.snow, ncoghlan, paul.moore, steve.dower, tim.golden, 
zach.ware

___
Python tracker 

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



[issue33503] use pypi.org instead of pypi.python.org

2018-05-15 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +6559

___
Python tracker 

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



[issue21475] Support the Sitemap extension in robotparser

2018-05-15 Thread Lady Red

Lady Red  added the comment:

Sorry, wrong PR number. it is 6883, and attached to this ticket

--

___
Python tracker 

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



[issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close()

2018-05-15 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d8dcd57edb88ce57063e5c2b85fe0ee1abb1ce8b by Serhiy Storchaka in 
branch 'master':
bpo-33454: Fix arguments parsing in _xxsubinterpreters.channel_close(). 
(GH-6747)
https://github.com/python/cpython/commit/d8dcd57edb88ce57063e5c2b85fe0ee1abb1ce8b


--

___
Python tracker 

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



[issue33528] os.getentropy support

2018-05-15 Thread David Carlier

Change by David Carlier :


--
components: Library (Lib)
nosy: David Carlier
priority: normal
pull_requests: 6558
severity: normal
status: open
title: os.getentropy support
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



[issue21475] Support the Sitemap extension in robotparser

2018-05-15 Thread Lady Red

Lady Red  added the comment:

I wrote a test for this as it seems to have been abandoned, and opened a PR.  
https://github.com/python/cpython/pull/6878

--
nosy: +mcsc...@gmail.com

___
Python tracker 

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



[issue21475] Support the Sitemap extension in robotparser

2018-05-15 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +6556

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Andrés Delfino

Andrés Delfino  added the comment:

Guido, could you point out what parts make it sound that way to you so I can 
change them?

--

___
Python tracker 

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



[issue33526] hashlib leak on import

2018-05-15 Thread Alexander Mohr

Alexander Mohr  added the comment:

closing as I'm not quite sure this is right

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



[issue33526] hashlib leak on import

2018-05-15 Thread Christian Heimes

Christian Heimes  added the comment:

Thanks for notifying us. There isn't much we can do here.

Python doesn't support unloading of C extension modules. The state will persist 
until the process ends. It doesn't make much sense to call EVP_cleanup() on 
shutdown, too. It will just slow down shutdown. The memory is freed anyway once 
the process has terminated.

--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-15 Thread Łukasz Langa

Change by Łukasz Langa :


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



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

2018-05-15 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6555

___
Python tracker 

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



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

2018-05-15 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6554

___
Python tracker 

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



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

2018-05-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 038b21f2caaed0f02fee524277cc61e2c6ae0e9a by Terry Jan Reedy in 
branch 'master':
bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (#6873)
https://github.com/python/cpython/commit/038b21f2caaed0f02fee524277cc61e2c6ae0e9a


--

___
Python tracker 

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



[issue33526] hashlib leak on import

2018-05-15 Thread Christian Heimes

Change by Christian Heimes :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-15 Thread Eric Snow

Eric Snow  added the comment:

+1 on using ":" as the separator.

--

___
Python tracker 

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



[issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close()

2018-05-15 Thread Eric Snow

Eric Snow  added the comment:

Thanks for catching this, Serhiy!  I've approved the PR.

--

___
Python tracker 

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



[issue33526] hashlib leak on import

2018-05-15 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +christian.heimes, gregory.p.smith

___
Python tracker 

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



[issue33516] unittest.mock: Add __round__ to supported magicmock methods

2018-05-15 Thread John Reese

Change by John Reese :


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

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-15 Thread Eitan Adler

Eitan Adler  added the comment:

copying and adapting my comments on the PR:

Strict Prototypes is correct and helpful for C. That said, the way it is 
currently implemented, by checking for the compiler in CC is sub-optimal at 
best.
CC ought to always be a C compiler, and never a C++ compiler.
It also seems questionable that distutils is using the python cflags rather 
than a dedicated set.

The best fix is a separate and specific list of flags for distutils rather than 
modifying the set of flags used to build python. That said, the current 
implementing of flags for python isn't great, so lets remove it as a short term 
fix.

--

___
Python tracker 

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



[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-15 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can you explain what Visual Studio Team Services is?

--
nosy: +pitrou

___
Python tracker 

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



[issue32551] Zipfile & directory execution in 3.5.4 also adds the parent directory to sys.path

2018-05-15 Thread Petr Viktorin

Change by Petr Viktorin :


--
resolution:  -> fixed
stage: commit 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



[issue9031] distutils uses invalid "-Wstrict-prototypes" flag when compiling C++ extension module

2018-05-15 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eitan.adler

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-15 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eitan.adler

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2018-05-15 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eitan.adler

___
Python tracker 

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



[issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension

2018-05-15 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


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



[issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension

2018-05-15 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 2cdb70ac5df30db021417ab71a327d9b4322de13 by Barry Warsaw (Miss 
Islington (bot)) in branch '3.7':
bpo-33465: Use an unlikely to be built-in C extension in a test (GH-6797) 
(#6869)
https://github.com/python/cpython/commit/2cdb70ac5df30db021417ab71a327d9b4322de13


--

___
Python tracker 

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



[issue33527] Invalid child function scope

2018-05-15 Thread R. David Murray

R. David Murray  added the comment:

Please post an example, and not a zip file.  Given your description (which 
indeed is not enough to understand what you think the problem is by itself), I 
think you should be able to post a few lines of python code into the issue in 
order to explain what you see as the problem.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-15 Thread Petr Viktorin

Change by Petr Viktorin :


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



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

2018-05-15 Thread Jimmy Lai

Change by Jimmy Lai :


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

___
Python tracker 

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



[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Paul Czyzewski

Paul Czyzewski  added the comment:

or, for a minimal doc change, change this sentence:
"For example, the relative weights [10, 5, 30, 5] are equivalent to the 
cumulative weights [10, 15, 45, 50],"

to:
"For example, the relative call 'weights[10, 5, 30, 5]' is equivalent to the 
cumulative call 'cum_weights[10, 15, 45, 50]',"

--

___
Python tracker 

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



[issue29706] IDLE needs syntax highlighting for async and await

2018-05-15 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +6551

___
Python tracker 

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



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2018-05-15 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +6550

___
Python tracker 

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



[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Paul Czyzewski

Paul Czyzewski  added the comment:

oops, if "k=400"

--

___
Python tracker 

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



[issue33509] warnings.warn_explicit with module_globals=True raises a SystemError

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset 820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9 by Miss Islington (bot) 
in branch '3.7':
bpo-33509: Fix _warnings for module_globals=None (GH-6833)
https://github.com/python/cpython/commit/820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9


--
nosy: +miss-islington

___
Python tracker 

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



[issue33428] pathlib.Path.glob does not follow symlinks

2018-05-15 Thread John Reese

John Reese  added the comment:

This looks like an issue specific to Windows?  I can't replicate on Mac, and 
given Windows' method of implementing "symlinks" as junctions.

--
nosy: +jreese

___
Python tracker 

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



[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Paul Czyzewski

Paul Czyzewski  added the comment:

btw, this was my suggestion. Steven opened the issue on my behalf (I'm new).

1) Documentation change.
 I would suggest that, to this paragraph:
"If neither weights nor cum_weights are specified, selections are made with 
equal probability. If a weights sequence is supplied, it must be the same 
length as the population sequence. It is a TypeError to specify both weights 
and cum_weights."

The following sentence be added:
"A cum_weights sequence, if supplied, must be in strictly-ascending order, else 
incorrect results will be (silently) returned."

[BTW, in the current documentation, when I read this sentence:
:For example, the relative weights [10, 5, 30, 5] are equivalent to the 
cumulative weights [10, 15, 45, 50]," it wasn't clear to me that this was the 
format of the cum_weights *argument*.  I thought that this conversion happened 
internally.  So, I'd prefer that something more explicit be stated (especially 
the part about silently giving bad results).]

2) I'm giving up on suggesting a code change.  However, I'll just 
respond that
  a) I believe that the big win of the cum_weights option is for people who 
already have the sequence in that form, rather than that they will save the 
O(n) cost of having the list built.  
  b) If I have big list, but also an other-than-tiny k value (eg, k=100), then 
the time (with the change) would be 400 time the O(log n) plus one times O(n), 
so this may or may not be significant.
  c) I agree that, if someone did, eg, 400 *separate* calls, each with k=1, the 
cost would be higher.  This seems unlikely to me but...

thanks
  Paul Czyzewski

--
nosy: +PaulSFO

___
Python tracker 

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



[issue33527] Invalid child function scope

2018-05-15 Thread gasokiw

New submission from gasokiw :

When you try to reassign variable with same name as one of parameters/arguments 
of parent function to local scope in child function, even if it doesn't 
actually get ran, the argument/parameter is not passed to child function 
anymore. 
In practice this happens when you make decorator with arguments/parameters and 
make wrapper function inside it.

As workaround you can redeclare those arguments/parameters in new variables in 
parent function then rewrite them back in child function. ( as seen in 
child_function_scope_bodge.py )

Please view attachment to better understand the issue.

--
files: example and workaround.zip
messages: 316725
nosy: gasokiw
priority: normal
severity: normal
status: open
title: Invalid child function scope
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: https://bugs.python.org/file47594/example and workaround.zip

___
Python tracker 

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



[issue33526] hashlib leak on import

2018-05-15 Thread Alexander Mohr

New submission from Alexander Mohr :

I'm seeing a lot of leaks via valgrind against the hashlib module.  It appears 
that it's calling OpenSSL_add_all_digests(); on init, and never calling the 
corresponding EVP_Cleanup on free: 
https://www.openssl.org/docs/man1.1.0/crypto/OpenSSL_add_all_digests.html.  I 
see a ton of leaks like the following:

==27765== 24 bytes in 1 blocks are still reachable in loss record 13 of 10,294
==27765==at 0x4C28C7B: malloc (vg_replace_malloc.c:299)
==27765==by 0xA92E337: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.2k)
==27765==by 0xA9E325A: lh_insert (in /usr/lib64/libcrypto.so.1.0.2k)
==27765==by 0xA93103E: OBJ_NAME_add (in /usr/lib64/libcrypto.so.1.0.2k)
==27765==by 0xA9F3559: OpenSSL_add_all_digests (in 
/usr/lib64/libcrypto.so.1.0.2k)
==27765==by 0xA44CF02: PyInit__hashlib (_hashopenssl.c:998)
==27765==by 0x506E627: _PyImport_LoadDynamicModuleWithSpec (importdl.c:154)
==27765==by 0x506DBA7: _imp_create_dynamic_impl (import.c:2008)
==27765==by 0x5067A2A: _imp_create_dynamic (import.c.h:289)
==27765==by 0x4F3061A: PyCFunction_Call (methodobject.c:114)
==27765==by 0x503E10C: do_call_core (ceval.c:5074)
==27765==by 0x5035F30: _PyEval_EvalFrameDefault (ceval.c:3377)
==27765==by 0x502280F: PyEval_EvalFrameEx (ceval.c:718)
==27765==by 0x503A944: _PyEval_EvalCodeWithName (ceval.c:4139)
==27765==by 0x503DA4D: fast_function (ceval.c:4950)
==27765==by 0x503D3FC: call_function (ceval.c:4830)
==27765==by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295)
==27765==by 0x502280F: PyEval_EvalFrameEx (ceval.c:718)
==27765==by 0x503D70D: _PyFunction_FastCall (ceval.c:4891)
==27765==by 0x503D922: fast_function (ceval.c:4926)
==27765==by 0x503D3FC: call_function (ceval.c:4830)
==27765==by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295)
==27765==by 0x502280F: PyEval_EvalFrameEx (ceval.c:718)
==27765==by 0x503D70D: _PyFunction_FastCall (ceval.c:4891)
==27765==by 0x503D922: fast_function (ceval.c:4926)
==27765==by 0x503D3FC: call_function (ceval.c:4830)
==27765==by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295)
==27765==by 0x502280F: PyEval_EvalFrameEx (ceval.c:718)
==27765==by 0x503D70D: _PyFunction_FastCall (ceval.c:4891)
==27765==by 0x503D922: fast_function (ceval.c:4926)
==27765==by 0x503D3FC: call_function (ceval.c:4830)
==27765==by 0x5035563: _PyEval_EvalFrameDefault (ceval.c:3295)
==27765==by 0x502280F: PyEval_EvalFrameEx (ceval.c:718)
==27765==by 0x503D70D: _PyFunction_FastCall (ceval.c:4891)
==27765==by 0x503D922: fast_function (ceval.c:4926)

I'm not exactly sure how this is happening yet (I know the code I use does a 
__import__ and uses multiple threads).  It sounds like this call should be 
ref-counted or perhaps only done once for the life of the application.

--
components: Extension Modules
messages: 316723
nosy: thehesiod
priority: normal
severity: normal
status: open
title: hashlib leak on import
type: resource usage
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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Anthony Sottile

Anthony Sottile  added the comment:

According to the other bugs, the change in 3.3 was an inadvertent regression.  
The fact that it didn't get fixed for so long is mostly due to the unmaintained 
state of argparse in the stdlib.  The change in behaviour here is the _fix_ of 
that regression.

Consistency with the rest of the framework to me feels pretty important.  
subparsers are positional arguments and positional arguments by default are 
required.

--

___
Python tracker 

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



[issue29706] IDLE needs syntax highlighting for async and await

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset 7c59a33491b0bde639a9382ef1de2423207a8cc7 by Miss Islington (bot) 
in branch '3.6':
bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846)
https://github.com/python/cpython/commit/7c59a33491b0bde639a9382ef1de2423207a8cc7


--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

If the behavior was consistent from 3.3 through 3.6, that is the behavior we 
should keep going forward in 3.7+ without a deprecation period.  (and this does 
not seem worth deprecating, lets just keep the behavior the same as it was in 
3.3-3.6)

That 2.7 is different than >=3.3 here isn't important.  There are a lot of 
things that have conditional behavior differences when using 2 and over time 
that is becoming increasingly irrelevant.

Libraries often keep compatibility with both 2.7 and 3.4+ today, but it is less 
common for a command line tool entry point to need to be compatible with both.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue33496] Accept Pathlib paths for sqlite file

2018-05-15 Thread John Reese

John Reese  added the comment:

Looks like this is already changed for 3.7: see commit a22a127458

--

___
Python tracker 

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



[issue32257] Support Disabling Renegotiation for SSLContext

2018-05-15 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6549

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-05-15 Thread Ned Deily

Change by Ned Deily :


--
versions: +Python 2.7, 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



[issue32257] Support Disabling Renegotiation for SSLContext

2018-05-15 Thread Ned Deily

Ned Deily  added the comment:


New changeset 67c48016638aac9a15afe6fd6754d53d2bdd6b76 by Ned Deily (Christian 
Heimes) in branch 'master':
bpo-32257: Add ssl.OP_NO_RENEGOTIATION (GH-5904)
https://github.com/python/cpython/commit/67c48016638aac9a15afe6fd6754d53d2bdd6b76


--

___
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-05-15 Thread Ned Deily

Ned Deily  added the comment:

As agreed upon at the PyCon dev sprints, 
6bd0c476c58ca0046969f70dc2a4e4dfb3268062 removes _xxsubinterpreters from the 
3.7 branch and 3.7.0 and retargets for 3.8.  Since it was intended for internal 
use, no user documentation or APIs should be affected.

--
priority: deferred blocker -> 
versions:  -Python 3.7

___
Python tracker 

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



[issue33515] subprocess.Popen on a Windows batch file always acts as if shell=True

2018-05-15 Thread Eryk Sun

Eryk Sun  added the comment:

There's no simple workaround for this behavior. All we can reasonably do is 
document that running a batch script directly has the same security risks as 
using shell=True. 

CMD doesn't support a file argument. It only supports running a /c or /k 
command, which can include running multiple commands joined by the &, &&, or || 
operators. CreateProcess thus executes a .bat or .cmd script by prepending 
"%ComSpec% /c" to the command line. If %ComSpec% isn't defined, it defaults to 
"%SystemRoot%\System32\cmd.exe /c".

Environment variables in a command can be escaped in most cases by inserting 
the "^" escape character after the first "%" character. This disrupts matching 
the variable name (unless a variable name happens to start with "^"). The 
escape character itself gets skipped as long as it isn't quoted literally.

--
assignee:  -> docs@python
components: +Documentation
keywords: +security_issue
nosy: +docs@python, eryksun
stage:  -> needs patch
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



[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread R. David Murray

R. David Murray  added the comment:

Oh, and the empty tuple is a specific syntactic construct that really is the 
empty parenthesis, so that's consistent with the language definition.

--

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Guido van Rossum

Guido van Rossum  added the comment:

Your phrasing still makes it sound like an annotation is a runtime concept
-- I think of it as a syntactic construct. (Otherwise fine.)

--

___
Python tracker 

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



[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread R. David Murray

Change by R. David Murray :


--
resolution:  -> not a bug
stage:  -> 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



[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread R. David Murray

R. David Murray  added the comment:

No, the parenthesis are never part of the tuple itself, even if you can't write 
syntactically correct code without them. They just syntactically group the 
expression list to isolate it from the surrounding context.  It's the same 
principle as having an expression like (123).  That's an integer that happens 
to be surrounded by parenthesis.  The integer itself still starts at column 1.

--
nosy: +r.david.murray

___
Python tracker 

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



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

2018-05-15 Thread Jimmy Lai

Jimmy Lai  added the comment:

$./python.exe isfuture_benchmark.py -o isfuture_optimized.json
$ ./python.exe -m perf compare_to isfuture_original.json isfuture_optimized.json
Mean +- std dev: [isfuture_original] 7.16 ms +- 0.23 ms -> [isfuture_optimized] 
5.41 ms +- 0.25 ms: 1.32x faster (-24%)

--
title: Optimize asyncio.isfuture by providing C implementation -> Add 1.32x 
faster C implementation of asyncio.isfuture().
Added file: https://bugs.python.org/file47593/isfuture_benchmark.py

___
Python tracker 

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



[issue29706] IDLE needs syntax highlighting for async and await

2018-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset 8717cfeb6b8bebdfe13df0e9268ddd252ab5ecad by Miss Islington (bot) 
in branch '3.7':
bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846)
https://github.com/python/cpython/commit/8717cfeb6b8bebdfe13df0e9268ddd252ab5ecad


--
nosy: +miss-islington

___
Python tracker 

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



[issue19950] Document that unittest.TestCase.__init__ is called once per test

2018-05-15 Thread Gregory P. Smith

Change by Gregory P. Smith :


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



[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread Isaiah Peng

Isaiah Peng  added the comment:

> It's true that the parenthesis is required to construct a tuple

Sorry, I mean the parenthesis is *not* required.

--

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-05-15 Thread Steve Dower

Steve Dower  added the comment:

Ah okay, fair enough. Knowing that, I'll take another look at the PR. I'd 
really like to simplify this as much as possible to avoid risk of regression.

--

___
Python tracker 

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



[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread Isaiah Peng

Isaiah Peng  added the comment:

Thanks for the reply, that's quite reasonable, especially take the generator 
expression case into consideration. However I found this is not consistent with 
empty tuple:

>>> a = "()"
>>> 
>>>   
>>> ast.parse(a).body[0].value.col_offset   
>>> 
>>>   
0

It's true that the parenthesis is required to construct a tuple, but if the 
parenthesis is served as the starting point of the tuple, then the col_offset 
should be the opening parenthesis. i.e. in the following example, both should 
start from col 2:

  >>> ast.parse("c(i for i in range(10))").body[0].value.args[0].col_offset
  2
  >>> ast.parse("c((i for i in range(10)))").body[0].value.args[0].col_offset
  3

--

___
Python tracker 

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



[issue31947] names=None case is not handled by EnumMeta._create_ method

2018-05-15 Thread Ethan Furman

Ethan Furman  added the comment:

Thank you, Anentropic!

--
assignee:  -> ethan.furman
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



[issue33427] Dead link in "The Python Standard Library" page

2018-05-15 Thread Ned Deily

Ned Deily  added the comment:

Thanks for noticing and for providing the PR.  The proposed change is a subset 
of the changes for Issue33503.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> use pypi.org instead of pypi.python.org

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

> It may be deprecated but the usage still exists. This is a glossary, not a 
> manifesto.

Agreed.  However, based on the current wording users will argue that Python 
documentation itself is stressing the lack of an intended purpose for 
annotations, equaling the typing use case with all other use cases (including 
future ones).  This isn't our intent.

I think it would be clearer to change the current wording from:

> A metadata value associated with a variable, a class attribute or a
> function or method parameter or return value, that has no specific
> purpouse (i.e. it's up to the user to use it as they see fit).
> (...)
> Annotations can be used to specify :term:`type hints `.

to:

> A metadata value associated with a variable, a class attribute or a
> function or method parameter or return value, that stores a
> :term:`type hint`.
> (...)
> Annotations can be used for other purposes unrelated to typing. This
> usage is deprecated, see :pep:`563` for details.


The `type hint` phrasing is already there, we just need to delete the word 
"global" that currently appears before "variable".  Note that saying that 
annotations in class attributes and variables have no assigned meaning 
contradicts PEP 526.

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Éric Araujo

Change by Éric Araujo :


--
Removed message: https://bugs.python.org/msg316703

___
Python tracker 

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



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-05-15 Thread Éric Araujo

Éric Araujo  added the comment:

See also #33388

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Éric Araujo

Change by Éric Araujo :


--
Removed message: https://bugs.python.org/msg316702

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Éric Araujo

Éric Araujo  added the comment:

I'm sorry I don't have the time to study this and make a judgment call.

Bringing this to the release manager's attention.

--

___
Python tracker 

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



[issue33388] Support PEP 566 metadata in dist.py

2018-05-15 Thread Éric Araujo

Éric Araujo  added the comment:

In the early days, I think distutils was updated to support new metadata PEPs, 
and then it stopped.  Now we have an ecosystem of tools that know how to work 
with metadata files created by distutils or setuptools; I worry that changing 
distutils could break them.

See https://bugs.python.org/issue33069#msg313826 and github discussions linked 
from that ticket for a change proposed recently.

The situation seems different here: new params could be added to setup and 
Distribution, and written only if present (with the right metadata version).  
But I still worry that implicitly switching the metadata version could cause 
trouble.

Some years ago I thought it would be good to add things to distutils (new 
commands or options that don’t change existing code with all its quirks), like 
wheel generation or stable ABI tag support.  One could imagine for example a 
new metadata_version param to setup to have explicit opt-in to newer metadata 
format.  But this would require changes to the Metadata class, could have 
unexpected bugs, would only be available in Python 3.8.

If we don’t touch distutils, users can be directed to setuptools that is 
actively maintained, or other tools like flit that don’t have all the baggage.  
It’s not a seamless experience yet, but things are getting better for packaging 
outside of the stdlib.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue33525] os.spawnvpe() returns error code 127 instead of raising when env argument is invalid.

2018-05-15 Thread Mark Shannon

New submission from Mark Shannon :

>>> os.spawnvpe(os.P_WAIT, "python2", ["python2", "-c", "print 'Hello 
>>> World!'"], {})
Hello World!
0
>>> os.spawnvpe(os.P_WAIT, "python2", ["python2", "-c", "print 'Hello 
>>> World!'"], None)
127

The latter should raise an exception of some sort.


>From error found on lgtm.com

https://lgtm.com/projects/g/python/cpython/snapshot/404ccc0aa78cd896ecb025571633a68b7292e8d4/files/Lib/os.py?sort=name=ASC=heatmap=false#xf40b8a11dc3c558c:1

--
components: Library (Lib)
messages: 316699
nosy: Mark.Shannon
priority: normal
severity: normal
stage: needs patch
status: open
title: os.spawnvpe() returns error code 127 instead of raising when env 
argument is invalid.
type: behavior
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



[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

MutableSequence defines an interface. Adding a new method will break all 
classes that implemented this protocol but not the new method.

And what should .copy() return? list subclasses return an exact list, bytearray 
subclasses return an exact bytearray, but deque subclasses try to create an 
instance of the same type. Not all mutable sequences can be copyable. The 
constructor is not the part of the protocol.

The same problems are in MutableSet and MutableMapping. This is why they don't 
provide copy() methods (but concrete classes set and dict do).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33510] [logging] add JSON log formatter

2018-05-15 Thread Vinay Sajip

Vinay Sajip  added the comment:

> I just wanted to say thanks to Steve for at least taking the time to open the 
> issues to ask if we would consider accepting the proposed changes.

Sure, and I probably come across as somewhat tetchy in my responses. That's 
just down to a shortage of time at the minute, and not in general because 
contributions to logging aren't welcome. They are (in general), as evidenced by 
numerous PRs which have been accepted.

I would say that for the most part, new handlers, formatters etc. ought to be 
published on PyPI so that they gain wide exposure. The logging package is 
reasonably "batteries included" already as regards handlers, etc. and new ones 
should only be added if they can be shown to have really wide applicability.

--

___
Python tracker 

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



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

2018-05-15 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +6547

___
Python tracker 

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



[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2018-05-15 Thread Petr Viktorin

Petr Viktorin  added the comment:

Marc-Andre, if you agree the function can be removed in 3.8.
This is tracked in https://bugs.python.org/issue28167

--

___
Python tracker 

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



  1   2   3   >