[issue40507] FileNotFound error raised by os.exec* doesn't contain filename

2020-05-04 Thread Russell Davis


New submission from Russell Davis :

To repro:

>>> import os, sys
>>> os.execv("nosuchfile", ["nosuchfile"])
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory
>>> print(sys.last_value.filename)
None

--
components: Library (Lib)
messages: 368106
nosy: russelldavis
priority: normal
severity: normal
status: open
title: FileNotFound error raised by os.exec* doesn't contain filename
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-04 Thread Stefan Behnel


Stefan Behnel  added the comment:

Christian, I understand your complaint, but I've actually never seen code in 
the wild that didn't provide a fallback for the import, usually something like 
what Serhiy spelled out and explained above:

try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET

This makes it inconvenient for users to emit a deprecation warning for the 
import, because it would impact perfectly future proof code like the above, 
without a good way for users to work around it by adapting their code, because 
the above import order is actually what they want. And there's a lot of such 
code.

I personally believe that the breakage will be quite limited. But that's a 
belief, not a fact. I don't have numbers to back it.

--

___
Python tracker 

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



[issue40286] Add randbytes() method to random.Random

2020-05-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset f01d1be97d740ea0369379ca305646a26694236e by Raymond Hettinger in 
branch 'master':
bpo-40286: Put methods in correct sections. Add security notice to use secrets 
for session tokens. (GH-19870)
https://github.com/python/cpython/commit/f01d1be97d740ea0369379ca305646a26694236e


--

___
Python tracker 

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



[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 5.0 -> 6.0
pull_requests: +19229
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19914

___
Python tracker 

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



[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-05-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, I like the answer in the StackOverflow link better than this proposal.

At any rate, I think Terry's suggestion is a good one.  If you would like to 
move forward with this, please take it to python-ideas.

That said, if another core-dev wants to champion this, feel free to re-open.

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)

2020-05-04 Thread wyz23x2


wyz23x2  added the comment:

OK.

--

___
Python tracker 

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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread miss-islington


miss-islington  added the comment:


New changeset efc782d29e229924076ffb6645a72f26242fb3ef by Miss Islington (bot) 
in branch '3.8':
bpo-40459: Fix NameError in platform.py (GH-19855)
https://github.com/python/cpython/commit/efc782d29e229924076ffb6645a72f26242fb3ef


--

___
Python tracker 

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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread miss-islington


miss-islington  added the comment:


New changeset 8ddf91543890e38c76aa0029482c6f5f5c444837 by Miss Islington (bot) 
in branch '3.7':
bpo-40459: Fix NameError in platform.py (GH-19855)
https://github.com/python/cpython/commit/8ddf91543890e38c76aa0029482c6f5f5c444837


--

___
Python tracker 

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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19228
pull_request: https://github.com/python/cpython/pull/19913

___
Python tracker 

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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 1e7e4519a8ddc2239101a0146d788c9161143a77 by Dennis Sweeney in 
branch 'master':
bpo-40459: Fix NameError in platform.py (GH-19855)
https://github.com/python/cpython/commit/1e7e4519a8ddc2239101a0146d788c9161143a77


--
nosy: +corona10

___
Python tracker 

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



[issue40459] [easy] undefined names in platform.py

2020-05-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +19227
pull_request: https://github.com/python/cpython/pull/19912

___
Python tracker 

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



[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-04 Thread Domenico Ragusa


New submission from Domenico Ragusa :

ZipFile seems to support Pathlike objects pretty well, except in 
ZipFile.writestr.
For example:

>>> a = ZipFile(Path('test.zip'), 'w') # this works ok
>>> a.write(Path('./foo.jpeg'), arcname=PurePath('/some/thing.jpeg')) # this 
>>> works as well
>>> a.writestr(PurePath('/test.txt'), 'idk') # this doesn't
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.8/zipfile.py", line 1788, in writestr
zinfo = ZipInfo(filename=zinfo_or_arcname,
  File "/usr/lib/python3.8/zipfile.py", line 349, in __init__
null_byte = filename.find(chr(0))
AttributeError: 'PurePosixPath' object has no attribute 'find'

I think it would be more consistent if it accepted any kind of paths, it would 
suffice to call os.fspath in ZipInfo.__init__ when the filename is a 
Pathlike-object, it's just 2 lines (+ tests, of course).

Can I go ahead and prepare a patch for this?

--
components: Library (Lib)
messages: 368098
nosy: d.ragusa
priority: normal
severity: normal
status: open
title: add support for os.Pathlike filenames in zipfile.ZipFile.writestr
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Yes.  That is the desired behavior.  Use Objects/setobject.c and 
Include/setobject.h as a model.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 92a98ed97513c6e365ce8765550ea65d0ddc8cd7 by Dong-hee Na in branch 
'master':
bpo-1635741: Port syslog module to multiphase initialization (GH-19907)
https://github.com/python/cpython/commit/92a98ed97513c6e365ce8765550ea65d0ddc8cd7


--

___
Python tracker 

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



[issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter

2020-05-04 Thread Filipe Laíns

Filipe Laíns  added the comment:

Right, forgot about that. We can get the first argument name from 
inspect.signature and then fetch it from the get_type_hints dictionary, I don't 
know a better way to do it.

--

___
Python tracker 

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



[issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere

2020-05-04 Thread Yury Selivanov


Yury Selivanov  added the comment:

Good catch. The function should be fixed to:

  _marker = object()

  def run(coro, *, debug=_marker):
 if debug is not _marker:
loop.set_debug(debug)

--

___
Python tracker 

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



[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I can submit a PR. Just making sure I understand, is this essentially the 
desired behavior change?

import weakref
import functools

if 0:
from test.support import import_fresh_module
functools = import_fresh_module('functools', blocked=['_functools'])

@functools.lru_cache
def f(x):
return x

ref_to_f = weakref.ref(f)
print(ref_to_f)

# Current:
# TypeError: cannot create weak reference to 'functools._lru_cache_wrapper' 
object
# Desired:
# 

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue40505] getpath.c doesn't know about lib64

2020-05-04 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

No, I have not opened a bug report on OpenSUSE. Since the OS uses bi-arch 
throughout, using lib64 is the natural thing to use for libdir on the OS.

I think the issue lies with getpath.c only, since it makes an assumption about 
the libdir config value, which doesn't necessarily hold in practice. The libdir 
config value can be changed via the standard --libdir configure parameter, so 
getpath.c should really not assume that the default setting is always used.

Having a variable in Python 3.9 is nice, but perhaps we can still make Python 
3.7 and 3.8 work as well.

The correct approach to building the full lib_python path is not to use 
exec_prefix + "/lib/python" + VERSION, but instead to use libdir + "/python" + 
VERSION (which corresponds to the Makefile variable BINLIBDEST). libdir would 
have to be taken from the config variable LIBDIR.

--

___
Python tracker 

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



[issue21596] asyncio.wait fails when futures list is empty

2020-05-04 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in 
branch 'master':
bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900)
https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68


--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2020-05-04 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in 
branch 'master':
bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900)
https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68


--
nosy: +gvanrossum

___
Python tracker 

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



[issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649

2020-05-04 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649

2020-05-04 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in 
branch 'master':
bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900)
https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68


--
nosy: +gvanrossum

___
Python tracker 

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



[issue40505] getpath.c doesn't know about lib64

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, this issue seems to be specific to Fedora and SuSE. Did you open an issue 
on OpenSuSE bug tracker?

> Looking at the master branch, this may already have been fixed for 3.9, since 
> a PLATLIBDIR variable is used instead. The patch would have to be backported 
> to earlier Python versions as well.

Yeah, this issue looks like a duplicate of bpo-1294959 which has been fixed. I 
suggest to close the issue. I had to a new attribute to the sys module, not 
like the thing that we can do in a stable version.

--
nosy: +vstinner

___
Python tracker 

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



[issue40505] getpath.c doesn't know about lib64

2020-05-04 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Just to clarify: the CONFIG_SITE script on OpenSUSE causes configure to use 
lib64, not the Python configure script itself.

--

___
Python tracker 

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



[issue40505] getpath.c doesn't know about lib64

2020-05-04 Thread Marc-Andre Lemburg


New submission from Marc-Andre Lemburg :

On platforms which configure identifies as bi-arch platform, libdir is set to 
$[exec_prefix}/lib64, which results in the C extensions to get installed in 
e.g. /usr/local/lib64/python3.8/lib-dynload/.

However, the getpath.c routines use a fixed "lib/python" VERSION (see 
https://github.com/python/cpython/blob/3.8/Modules/getpath.c#L1200) path to 
build sys.path. As a result, the built Python binary cannot load the builtin C 
extensions.

A work-around on OpenSUSE is to set CONFIG_SITE="" when configuring Python. 
This disables the bi-arch support and has libdir default to ${exec_prefix}/lib 
again.

Looking at the master branch, this may already have been fixed for 3.9, since a 
PLATLIBDIR variable is used instead. The patch would have to be backported to 
earlier Python versions as well.

--
components: Interpreter Core
messages: 368086
nosy: lemburg
priority: normal
severity: normal
status: open
title: getpath.c doesn't know about lib64
type: behavior
versions: 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



[issue39946] Remove _PyThreadState_GetFrame

2020-05-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks!

We use this function internally in some VM traceback grabbing code but the best 
solution looks to just be for us to adopt the patch to 3.9 on our interpreter 
until we're running on 3.9.

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



[issue39946] Remove _PyThreadState_GetFrame

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

> We use this function internally in some VM traceback grabbing code

Would you mind to elaborate your use case?

--

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-04 Thread Christian Heimes


Christian Heimes  added the comment:

For the record, I'm quite unhappy that xml.etree.cElementTree was removed 
without going through a proper active deprecation cycle with plenty of head 
start. The removal came as a surprise to me -- and I'm a core dev, author of 
PEP 594 and owner of the defusedxml package. xml.etree.cElementTree module was 
also never added to PEP 4 and is still not mentioned as removed in PEP 4.

This changeset broke defusedxml, a package with over 10M downloads a month and 
57k dependencies on Github. I'm sure that the removal is going to cause more 
trouble for other packages, too.

In PEP 594 I deliberately included a long deprecation phase for all packages 
with at least one release deprecation warnings. I gave users plenty of time to 
plan for removal.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-04 Thread Shantanu


Change by Shantanu :


--
nosy: +hauntsaninja
nosy_count: 7.0 -> 8.0
pull_requests: +19226
pull_request: https://github.com/python/cpython/pull/19911

___
Python tracker 

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



[issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Another example "PPC64LE RHEL8 LTO 3.x":
https://buildbot.python.org/all/#/builders/356/builds/347

0:02:49 load avg: 9.54 [415/423/1] test_multiprocessing_spawn failed (env 
changed) (2 min 15 sec) -- running: test_concurrent_futures (58.1 sec), 
test_peg_generator (1 min 39 sec), test_gdb (47.8 sec)
Warning -- multiprocessing.Manager still has [, ] active children 
after 5.1163996559916995 seconds
Warning -- Dangling processes: {}
Warning -- multiprocessing.Manager still has [, ] active children 
after 5.115814491000492 seconds

--

___
Python tracker 

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



[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The pure python version of lru_cache() wrappers supported weak references.  
It's not essential, but I have used it a couple of times.  In the spirit of PEP 
399, the C version should add back the weakref support (and a test).

--
components: Extension Modules
keywords: easy (C)
messages: 368081
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Restore weakref support for lru_cache wrappers
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue39470] Indicate that os.makedirs is equivalent to Path.mkdir

2020-05-04 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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



[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2020-05-04 Thread Petter S


Petter S  added the comment:

The solution is incomplete because it fixes just this single security issue, 
not the inherent fragility of this file. 

If, in the future someone happens to add another method starting with open to 
this class, we are at risk of having the same problem again.

As for the error message, it is of course a minor issue, but I don't think it 
is expected that "unknown_proxy://" and "something_else://" raise different 
exceptions, right?

--

___
Python tracker 

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



[issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter

2020-05-04 Thread Dutcho


Dutcho  added the comment:

I'm afraid my "even return" was interpreted in 
https://github.com/python/cpython/pull/19871 as "only return", while as stated 
"any annotation" suffices. To rephrase:
If the *first* parameter of the registered function isn't annotated, any 
non-first annotation suffices for registering, but will not dispatch correctly.
Example:
```
>>> @functools.singledispatch
... def func(arg, x):...
>>> @func.register
... def _int(arg, x:int):...
>>> @func.register
... def _str(arg, x:str):...
```
No errors happen, although parameter `x` is annotated, not the first parameter 
`arg`. So `func()` will dispatch on the type of `arg` according to the 
annotation of `x`.
So I'm afraid the PR solves the specific "return" example case, but not the 
flagged general issue.

--

___
Python tracker 

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



[issue39470] Indicate that os.makedirs is equivalent to Path.mkdir

2020-05-04 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset f25fb6ebfec894c01bc927c9aae7924ffc826d11 by Joannah Nanjekye in 
branch 'master':
bpo-39470: Indicate that ``os.makedirs`` is equivalent to ``Path.mkdir`` 
(GH-18216)
https://github.com/python/cpython/commit/f25fb6ebfec894c01bc927c9aae7924ffc826d11


--

___
Python tracker 

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



[issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.`

2020-05-04 Thread Anthony Sottile


Change by Anthony Sottile :


--
keywords: +patch
pull_requests: +19225
pull_request: https://github.com/python/cpython/pull/19910

___
Python tracker 

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



[issue39159] Ideas for making ast.literal_eval() usable

2020-05-04 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
nosy: +eamanu

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-05-04 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 18f1c60a1625d341a905c7e07367c32c08f222df by Miro Hrončok in 
branch 'master':
bpo-40360: Add a What's New entry for lib2to3 pending deprecation (GH-19898)
https://github.com/python/cpython/commit/18f1c60a1625d341a905c7e07367c32c08f222df


--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-04 Thread Paul Ganssle


Change by Paul Ganssle :


--
keywords: +patch
pull_requests: +19224
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19909

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-04 Thread Paul Ganssle


New submission from Paul Ganssle :

This is an issue to track the implementation of PEP 615: 
https://www.python.org/dev/peps/pep-0615/

It should mostly involve migrating from the reference implementation: 
https://github.com/pganssle/zoneinfo/

--
assignee: p-ganssle
components: Library (Lib)
messages: 368076
nosy: belopolsky, lemburg, p-ganssle
priority: high
severity: normal
stage: needs patch
status: open
title: PEP 615: Add zoneinfo module
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-04 Thread Tim Peters


Change by Tim Peters :


--
keywords: +patch
pull_requests: +19223
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19908

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-04 Thread Tim Peters


Tim Peters  added the comment:

Changed version to 3.9, because anything done would change the regexp 
generated, and fnmatch.translate()` makes that regexp visible.

--
stage:  -> needs patch
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-05-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +19222
pull_request: https://github.com/python/cpython/pull/19907

___
Python tracker 

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



[issue40502] PyNode_New() does not initialize n->n_col_offset

2020-05-04 Thread Tomasz Pytel


New submission from Tomasz Pytel :

I found this by accident by compiling empty strings since I use column 
information from the AST tree, if not initialized I get a starting column of 
-842150451. The easy fix is to initialize n->n_col_offset = 0; in 
Parser/node.c:PyNode_New().

--
components: Interpreter Core
messages: 368074
nosy: Tomasz Pytel
priority: normal
severity: normal
status: open
title: PyNode_New() does not initialize n->n_col_offset
versions: Python 3.9

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 975408c065b645e7d717546b0d744415abb45cd1 by Hai Shi in branch 
'master':
bpo-40275: test.support imports lazily locale import (GH-19761)
https://github.com/python/cpython/commit/975408c065b645e7d717546b0d744415abb45cd1


--

___
Python tracker 

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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 785f5e6d674306052bf865677d885c30561985ae by Dong-hee Na in branch 
'master':
bpo-40489: Add test case for dict contain use after free (GH-19906)
https://github.com/python/cpython/commit/785f5e6d674306052bf865677d885c30561985ae


--

___
Python tracker 

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



[issue39232] asyncio crashes when tearing down the proactor event loop

2020-05-04 Thread Chris Meyer


Change by Chris Meyer :


--
nosy: +cmeyer

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Do you think either need a deprecation cycle? I'd say not for the Windows 
> change, but I'm not sure whether people could be relying on libuuid showing 
> up after build.

If the behavior doesn't change, no deprecation is needed.

For example, if libuuid was already used trough _uuid module, the ctypes code 
path is basically just dead code. But it should be checked manually.

--

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread Steve Dower


Steve Dower  added the comment:

Do you think either need a deprecation cycle? I'd say not for the Windows 
change, but I'm not sure whether people could be relying on libuuid showing up 
after build.

--

___
Python tracker 

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



[issue40417] PyImport_ReloadModule emits deprecation warning

2020-05-04 Thread Brett Cannon


Brett Cannon  added the comment:

This can't be backported cleanly. If you're up for making PRs for 3.8 and 3.7, 
Robert, we can look at applying them.

--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-05-04 Thread hai shi


Change by hai shi :


--
pull_requests: +19220
pull_request: https://github.com/python/cpython/pull/19905

___
Python tracker 

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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +19221
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19906

___
Python tracker 

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



[issue40417] PyImport_ReloadModule emits deprecation warning

2020-05-04 Thread Brett Cannon


Change by Brett Cannon :


--
versions:  -Python 3.5, Python 3.6, Python 3.9

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

uuid.py has a long history. The recent history is the addition of the _uuid 
module which exposes libuuid function properly. IMHO it's a better approach 
than ctypes.

On Windows, it seems like ctypes remains used to get access to Windows function 
UuidCreateSequential(). It is used by uuid.getnode() for example. We should 
expose UuidCreateSequential() in _uuid rather than using ctypes for that.

I propose to do that in two steps:

(A) Ensure that _uuid works on macOS, FreeBSD and Linux, especially in the 
macOS installer of python.org. If yes, remove the ctypes code to access libuuid 
functions.

(B) Add a function to _uuid to expose Windows UuidCreateSequential(), use it in 
uuid.py and remove the related ctypes code.

Both steps can be done in parallel.

--
nosy: +vstinner

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread Steve Dower


Steve Dower  added the comment:

There are three scenarios where ctypes is used in this module:

* get libuuid.uuid_generate_time_safe and uuid_generate_time (if _uuid was not 
compiled)
* get rpcrt4.UuidCreateSequential (on Windows, depending on how the libuuid 
lookup failed)
* GetSystemDirectory (on Windows, safe to replace with alternative approach)

I'll happily move the UuidCreateSequential call into _uuid and add it to the 
Windows build, but it's not clear whether the libuuid lookup is important or 
not. If anyone knows of scenarios where you can't compile against libuuid but 
can load it with ctypes, would be great to hear about it!

--

___
Python tracker 

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



[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-04 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-05-04 Thread hongweipeng


Change by hongweipeng :


--
nosy: +hongweipeng
nosy_count: 9.0 -> 10.0
pull_requests: +19219
pull_request: https://github.com/python/cpython/pull/19904

___
Python tracker 

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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-04 Thread Steve Dower


New submission from Steve Dower :

The uuid module uses ctypes to try and load likely system libraries to provide 
some functionality of the uuid module.

This is a security risk (depending on your sensitivity to DLL hijacking), but 
it also seems to be not very necessary? It would be nice to remove the ctypes 
usage from an otherwise (almost) pure Python module.

--
components: Library (Lib)
messages: 368066
nosy: steve.dower
priority: normal
severity: normal
stage: test needed
status: open
title: Deprecate and remove ctypes usage in uuid
versions: Python 3.9

___
Python tracker 

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



[issue9216] FIPS support for hashlib

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

> _hashlib.get_fips_mode() is not compatible with new FIPS design in OpenSSL 
> 3.0.0:

I suggest to modify the code so the private function becomes unavailable in 
_hashlib on OpenSSL 3.0 and newer. What do you think?

--

___
Python tracker 

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



[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to raise an exception if it's called with more than 1024 arguments.

--
keywords: +easy (C), newcomer friendly
title: ctypes: segfault with large number of callback arguments -> [easy C 
issue] ctypes: segfault with large number of callback arguments

___
Python tracker 

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



[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

> We should whitelist the protocols. The current solution with `getattr` is 
> really fragile. For example, this crashes with a `TypeError`: 
> `URLopener().open("unknown_proxy://test")`

Would you mind to elaborate why do you consider that the solution is 
incomplete? Your issue doesn't show that Python is vulnerable. TypeError *is* 
the expected behavior.

Would you prefer another error message? If yes, please open a seperated issue.

--

___
Python tracker 

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



[issue21596] asyncio.wait fails when futures list is empty

2020-05-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Lysandros:
> The revert is in. Now the question is if we want to take additional action to 
> address the original issue of this.

If someone cares of that, I suggest to open an issue in pylint, pyflakes and 
similar tools to emit a warning in linters.

--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Issue open since 2019-09-30 and tests still hang randomly. What's the progress 
on this issue?

--

___
Python tracker 

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



[issue40458] test_bad_getattr crashes on APPX test

2020-05-04 Thread Steve Dower


Steve Dower  added the comment:

Yeah, I already got that part. If you check the PR, I added some better 
diagnostics to faulthandler for this case, but I don't see where I can add it 
for other platforms?

--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2020-05-04 Thread Gregory Szorc


Change by Gregory Szorc :


--
nosy: +indygreg
nosy_count: 7.0 -> 8.0
pull_requests: +19218
pull_request: https://github.com/python/cpython/pull/19746

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread miss-islington


miss-islington  added the comment:


New changeset 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1 by Miss Islington (bot) 
in branch '3.8':
bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)
https://github.com/python/cpython/commit/70fe95cdc9ac1b00d4f86b7525dca80caf7003e1


--

___
Python tracker 

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



[issue40494] collections.abc.Callable and type variables

2020-05-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Of course. There is more than one way to fix it:

* Make GenericAlias substituting type variables in list. It is easier and it 
will fix this particular case, but there will be subtle differences in __args__.
* Add a GenericAlias subclass with overridden constructor, __repr__, 
__getitem__, __reduce__ (like the _GenericAlias subclass added in issue40397).

I think we should first resolve issue40397 and later decide what way be better. 
It is not necessary to reproduce all details of _GenericAlias if the practical 
behavior is the same.

--

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Hai Shi!

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +19217
pull_request: https://github.com/python/cpython/pull/19903

___
Python tracker 

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



[issue40494] collections.abc.Callable and type variables

2020-05-04 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yeah, the fix will require a variant of types.GenericAlias that substitute's 
type variables in lists.

--

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset caa3ef284a2e5e5b9bdd6a9e619804122c842d80 by Hai Shi in branch 
'master':
bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)
https://github.com/python/cpython/commit/caa3ef284a2e5e5b9bdd6a9e619804122c842d80


--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-04 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy:  -lys.nikolaou

___
Python tracker 

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



[issue40455] GCC 10 compiler warnings

2020-05-04 Thread Andy Lester


Andy Lester  added the comment:

For anyone following along, note that the PR above is different than the 
original suggestion.  The PR correctly sets x_size, not leaving it zero.

--

___
Python tracker 

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



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

tl; dr I wrote PR 19902 to remove the "XXX" comment.

--

Commit 21893fbb74e8fde2931fbed9b511e2a41362b1ab adds the following code:

/* XXX It seems like we shouldn't have to check not equal to Py_None
   here because exc_type should only ever be a class.  But not including
   this check was causing crashes on certain tests e.g. on Fedora. */
if (gen->gi_exc_state.exc_type && gen->gi_exc_state.exc_type != Py_None) { 
... }

I don't think that you should mention "Fedora" as a platform impacted by this 
issue: all platforms should be affected. It's just unclear why the issue was 
first seen on Fedora.

gen_send_ex() copies tstate->exc_info to gen->gi_exc_state.

tstate->exc_info->exc_type is set at least in the following 3 places in CPython 
code base:

* ceval.c: POP_EXCEPT opcode: exc_info->exc_type = POP();
* ceval.c: UNWIND_EXCEPT_HANDLER() macro: exc_info->exc_type = POP();
* errors.c: PyErr_SetExcInfo()

I saw in practice POP_EXCEPT and UNWIND_EXCEPT_HANDLER() setting 
exc_info->exc_type to Py_None (I didn't test PyErr_SetExcInfo()).

_PyErr_GetTopmostException() also handles exc_info->exc_type == Py_None case:

_PyErr_StackItem *
_PyErr_GetTopmostException(PyThreadState *tstate)
{
_PyErr_StackItem *exc_info = tstate->exc_info;
while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
   exc_info->previous_item != NULL)
{
exc_info = exc_info->previous_item;
}
return exc_info;
}

--

So exc_type=None is not a bug, but it's done on purpose.

If you don't want to get None in genobject.c, we should modify all places which 
set tstate->exc_info->exc_type. Problem: the structure currently exposed in the 
public C API (bpo-40429), and I wouldn't be surprised if Cython or greenlet 
modify tstate->exc_info directly.

--

___
Python tracker 

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



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19216
pull_request: https://github.com/python/cpython/pull/19902

___
Python tracker 

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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

> Would you like to add a test for this case?

Oh, I mean, is it good to add a test for this case?

--

___
Python tracker 

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



[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

2020-05-04 Thread Zachary Ware


Zachary Ware  added the comment:

With 2.7 out of support, closing.

--
nosy: +zach.ware
resolution:  -> out of date
stage: needs patch -> 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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

Would you like to add a test for this case?

--

___
Python tracker 

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



[issue40489] INCREF/DECREFs around the rich comparison needs tests

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

I can crash python interpreter with few lines of code when if we remove those 
codes.



class S(str):

def __eq__(self, other):
d.clear()
return NotImplemented

def __hash__(self):
return hash('test')

d = {S(): 'value'}
'test' in d

--
nosy: +corona10

___
Python tracker 

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



[issue40455] GCC 10 compiler warnings

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset b88cd585d36d6285a5aeb0b6fdb70c134062181e by Dong-hee Na in branch 
'master':
bpo-40455: Remove gcc10 warning about x_digits (#19852)
https://github.com/python/cpython/commit/b88cd585d36d6285a5aeb0b6fdb70c134062181e


--

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 5e8ffe147710e449c2e935a4e2ff5cbd19828a8a by Hai Shi in branch 
'master':
bpo-39573: Use Py_IS_TYPE to check for types (GH-19882)
https://github.com/python/cpython/commit/5e8ffe147710e449c2e935a4e2ff5cbd19828a8a


--

___
Python tracker 

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



[issue40256] Python 3.8 Not Launching on Bootcamp Windows 10.

2020-05-04 Thread Steve Dower


Steve Dower  added the comment:

I assume the Bootcamp side of this is irrelevant and it's just an issue with 
Windows.

Yusuf, can you open Powershell and run "py" on its own?

If you've been going there and running "python" and you didn't select to update 
PATH, you're probably triggering the redirect to install via the Microsoft 
Store. When you pass that arguments, it fails (correctly) but doesn't print a 
message (incorrectly - I'm trying to get it fixed). But when you run it 
interactively it'll jump you to the store page for Python.

You probably just want to use the "py" launcher, since you've installed that 
way. Or if you install from the Store instead then it'll configure 
python/python3/python3.8 commands for you.

--
components:  -macOS

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-04 Thread Miro Hrončok

Miro Hrončok  added the comment:

Not that many:

cpython itself (fixed via PR)
demjson (fixed via PR)
asn1crypto (fixed via PR)
dnf (fixed via PR)
freeipa (fixed via PR)

I gave up sending PRs at this point.

waf
weasyprint
virt-who
thrift
salt
wxpython4
rosdistro
mne
pycairo
libstoragemgmt (possibly via bundled lsm/external/xmltodict)
dput-ng
ddupdate
aubio (via bundled waf)

--

___
Python tracker 

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



[issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)

2020-05-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Not until decision made.  And not be me until I have my development machine 
running.

--

___
Python tracker 

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



[issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x

2020-05-04 Thread STINNER Victor


New submission from STINNER Victor :

PPC64LE RHEL8 LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/450/builds/313

0:01:22 load avg: 7.01 [242/423/1] test_multiprocessing_fork failed (env 
changed) (1 min 17 sec) -- running: test_concurrent_futures (1 min 3 sec), 
test_multiprocessing_forkserver (1 min 19 sec)

Warning -- multiprocessing.Manager still has [, ] active children 
after 5.1161000469874125 seconds

Warning -- Dangling processes: {}

Warning -- multiprocessing.Manager still has [, ] active children after 
5.116447829990648 seconds

test__all__ (test.test_multiprocessing_fork.MiscTestCase) ... ok
test_answer_challenge_auth_failure (test.test_multiprocessing_fork.OtherTest) 
... ok
test_deliver_challenge_auth_failure (test.test_multiprocessing_fork.OtherTest) 
... ok
(...)

--
components: Tests
messages: 368043
nosy: pitrou, tomMoral, vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x
versions: Python 3.9

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-04 Thread Lumír Balhar

Change by Lumír Balhar :


--
keywords: +patch
pull_requests: +19214
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19901

___
Python tracker 

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



[issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649

2020-05-04 Thread Joel Rosdahl


Change by Joel Rosdahl :


--
keywords: +patch
nosy: +jrosdahl
nosy_count: 2.0 -> 3.0
pull_requests: +19211
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19900

___
Python tracker 

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



[issue21596] asyncio.wait fails when futures list is empty

2020-05-04 Thread Joel Rosdahl


Change by Joel Rosdahl :


--
nosy: +jrosdahl
nosy_count: 8.0 -> 9.0
pull_requests: +19212
pull_request: https://github.com/python/cpython/pull/19900

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2020-05-04 Thread Joel Rosdahl


Change by Joel Rosdahl :


--
nosy: +jrosdahl
nosy_count: 14.0 -> 15.0
pull_requests: +19213
pull_request: https://github.com/python/cpython/pull/19900

___
Python tracker 

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



[issue39159] Ideas for making ast.literal_eval() usable

2020-05-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It can also crash.

ast.literal_eval('+0'*10**6)

The cause is that all AST handling C code (in particularly converting the AST 
from C to Python) is recursive, and therefore can overflow the C stack. Some 
recursive code has arbitrary limits which cause raising exceptions like 
MemoryError in the initial example, but not all code has such checks.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649

2020-05-04 Thread Joel Rosdahl


New submission from Joel Rosdahl :

bpo-21596 documented that the sequence of futures passed to asyncio.wait must 
not be empty:

The sequence *futures* must not be empty.

This note was however lost in the bpo-33649 commit
(3faaa8857a42a36383bb18425444e597fc876797).

--
assignee: docs@python
components: Documentation
messages: 368041
nosy: Joel Rosdahl, docs@python
priority: normal
severity: normal
status: open
title: asyncio.wait documentation on non-emptiness requirement lost in bpo-33649
versions: Python 3.7, Python 3.8, Python 3.9

___
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

2020-05-04 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-04 Thread Miro Hrončok

Miro Hrončok  added the comment:

I will soon come back with what Fedora package were affected by the problem. 
That could give some data about how to handle this.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-04 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

The revert is in. Now the question is if we want to take additional action to 
address the original issue of this.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 846d8b28ab9bb6197ee81372820311c0abe509c0 by Lysandros Nikolaou in 
branch 'master':
bpo-40246: Revert reporting of invalid string prefixes (GH-19888)
https://github.com/python/cpython/commit/846d8b28ab9bb6197ee81372820311c0abe509c0


--

___
Python tracker 

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



[issue40498] Holding spacebar on button widget permanently makes it SUNKEN even after release (and wait).

2020-05-04 Thread PythonAmateur742


PythonAmateur742  added the comment:

This is a win10 issue. I haven't tried it on linux.

--

___
Python tracker 

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



  1   2   >