[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-12 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

makes sense to me

On Tue, May 12, 2020 at 10:14 PM Chris Jerdonek  wrote:
>
>
> Chris Jerdonek  added the comment:
>
> Also adding Nathaniel since he's the one that filed #32751. Nathaniel, do you 
> agree that if an exception occurs while waiting for the cancellation, the 
> exception should be what's raised instead of TimeoutError?
>
> --
> nosy: +chris.jerdonek, njs
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-12 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Also adding Nathaniel since he's the one that filed #32751. Nathaniel, do you 
agree that if an exception occurs while waiting for the cancellation, the 
exception should be what's raised instead of TimeoutError?

--
nosy: +chris.jerdonek, njs

___
Python tracker 

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



[issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting

2020-05-12 Thread Guido van Rossum


New submission from Guido van Rossum :

The traceback module formats several edge cases of SyntaxError different than 
CPython's default formatting.

- There's an off-by-one error if the column offset (printed as a caret) points 
past the last character (example: 'a +='). The clipping is wrong and the caret 
points to the last character.

- If the offset is <= 0, it appears the code silently adds the length of the 
source text.

- The system formatting suppresses the caret if the offset is -1; the only way 
to suppress the caret with the traceback module is setting the offset to None 
(or setting the source text to None).

- The system formatting can position the caret way past the end of the source 
text; the traceback module clips (also see the first bullet).

I propose to make the traceback module behave the same way as the system module 
in all cases. I also propose to make both suppress the caret if the offset is 
<= 0. Finally I propose to make the system formatting limit the offset to just 
past the end of the source text.

I propose not to bother changing anything in 3.8 or before.

--
messages: 368759
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Make traceback module's formatting of SyntaxError more similar to system 
formatting
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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 42bae3a3d9d79f28e6b3b619bd27296d125c4c2c by Victor Stinner in 
branch 'master':
bpo-40602: Optimize _Py_hashtable_get_ptr() (GH-20066)
https://github.com/python/cpython/commit/42bae3a3d9d79f28e6b3b619bd27296d125c4c2c


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19375
pull_request: https://github.com/python/cpython/pull/20066

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b by Victor Stinner in 
branch 'master':
bpo-40609: _Py_hashtable_t values become void* (GH-20065)
https://github.com/python/cpython/commit/5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40609: "_tracemalloc: remove pointer_t type".

--

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19374
pull_request: https://github.com/python/cpython/pull/20065

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d95bd4214c2babe851b02562d973d60c02e639b7 by Victor Stinner in 
branch 'master':
bpo-40609: _tracemalloc allocates traces (GH-20064)
https://github.com/python/cpython/commit/d95bd4214c2babe851b02562d973d60c02e639b7


--

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19373
pull_request: https://github.com/python/cpython/pull/20064

___
Python tracker 

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



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2020-05-12 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +19372
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20063

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2d0a3d682f699cce8db6e30981d41d9125318726 by Victor Stinner in 
branch 'master':
bpo-40609: Add destroy functions to _Py_hashtable (GH-20062)
https://github.com/python/cpython/commit/2d0a3d682f699cce8db6e30981d41d9125318726


--

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19371
pull_request: https://github.com/python/cpython/pull/20062

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f9b3b582b86b9cce8d69ec7d03d716ec81c8264a by Victor Stinner in 
branch 'master':
bpo-40609: Remove _Py_hashtable_t.key_size (GH-20060)
https://github.com/python/cpython/commit/f9b3b582b86b9cce8d69ec7d03d716ec81c8264a


--

___
Python tracker 

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



[issue40611] Add MAP_POPULATE to the mmap library

2020-05-12 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +19369
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20061

___
Python tracker 

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



[issue40611] Add MAP_POPULATE to the mmap library

2020-05-12 Thread Ethan Steinberg


New submission from Ethan Steinberg :

This issue (and corresponding pull request) adds MAP_POPULATE to the set of 
flags exported by the mmap module. This flag is incredibly handy for speeding 
up data processing and is available on most Linux systems.

--
components: Library (Lib)
messages: 368752
nosy: Ethan Steinberg
priority: normal
severity: normal
status: open
title: Add MAP_POPULATE to the mmap library
type: enhancement
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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-05-12 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue40610] ctypes on Windows: error message on DLL load failure is misleading

2020-05-12 Thread Eryk Sun


Eryk Sun  added the comment:

bpo-39393 improved the error message to mention "(or one of its dependencies)". 
That's the best we can reasonably do. A developer can monitor "loader snaps" 
messages in a debugger in order to discover the missing DLL and the directories 
where the loader looked for it.

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Misleading error message upon dependent DLL resolution failure

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19368
pull_request: https://github.com/python/cpython/pull/20060

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9e2ca1742076169089b818d0883688a2ddd9964a by Victor Stinner in 
branch 'master':
bpo-40609: Rewrite how _tracemalloc handles domains (GH-20059)
https://github.com/python/cpython/commit/9e2ca1742076169089b818d0883688a2ddd9964a


--

___
Python tracker 

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



[issue38728] Update PC/pyconfig.h to support disabling auto linking

2020-05-12 Thread Ben Boeckel


Ben Boeckel  added the comment:

> Presumably you looked around for ideas before figuring out the issue

Usually when "could not find foo.lib" popping up without any mention of 
"foo.lib" on the link line points directly to these "autolinking" "features" 
being the culprit. It's just something I've learned through experience. If 
there's an FAQ of common problems when building C extensions, it belongs there.

While this functionality sounds nice in principle, it only really works if 
something also adds the directory to *look* for the library to the link line as 
well. But if you can get *that* to the link line, you may as well just add the 
".lib" to the link line directly and not send the linker on a wild goose chase 
based on a header. In addition, nothing ties "find python.lib" to the one that 
actually goes with the header that's telling it to be found either, so you can 
get the wrong one too (probably not so much an issue for Python now that ABI 
flags are gone, but it's still a thing).

Due to these behaviors and the lack of a link directory pragma (not that you 
could write a relocatable one in C preprocessor anyways), I find `#pragma 
comment(lib)` to just be a misfeature more than anything.

--

___
Python tracker 

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



[issue40610] ctypes on Windows: error message on DLL load failure is misleading

2020-05-12 Thread Jack Jansen


New submission from Jack Jansen :

On Windows, when ctypes fails to load a DLL, the error message is misleading. 
If a dependency of the DLL cannot be found if appears as if the DLL itself 
cannot be found.

This issue has always existed on Windows (and I know it is due to what the OS 
provides by default as its error message) but it is exacerbated by the DLL 
loading rules in Python 3.8 (the `os.add_dll_directory()` changes), because now 
importing a DLL into Python will follow different rules than those followed by, 
for example, command line utilities shipped with the DLL you are loading follow.

An ideal fix would be a message of the form "xxx.dll failed to load because its 
dependency yyy.dll is not on the current Python DLL search path, see  for 
details". But I am not well-versed enough in Windows APIs to know whether that 
is even possible.

A fix that is minimal and at least not misleading would be a message "xxx.dll 
(or one of its dependencies) failed to load. See  for details".

--
components: ctypes
messages: 368748
nosy: jackjansen
priority: normal
severity: normal
status: open
title: ctypes on Windows: error message on DLL load failure is misleading
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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


New submission from STINNER Victor :

In bpo-26588, I modified the _tracemalloc module to support tracing memory 
allocations in multiple "domains" for numpy. I modified hashtable.c to support 
keys larger than void*, and I modified _tracemalloc.c to use a new pointer_t 
structure which is made of (domain: unsigned int, ptr: void*).

These changes made hashtable.c way more complicated than what it should be. I 
would like to reuse hashtable.c in more places. I am working on a change to 
remove the pointer_t type from _tracemalloc.c, and instead use a hash table for 
traces of domains other than the default domain (0). The new hash table maps a 
domain to a hash table: traces of a domain.

tracemalloc_traces remains the default hash table for traces of the default 
domain. Since it's the most common case, it doesn't go through the new hash 
table.

--
components: Library (Lib)
messages: 368747
nosy: vstinner
priority: normal
severity: normal
status: open
title: _tracemalloc: remove pointer_t type
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



[issue40501] Deprecate and remove ctypes usage in uuid

2020-05-12 Thread Steve Dower


Steve Dower  added the comment:


New changeset d6b727e2c947240804b8e434b305ba2890122550 by Steve Dower in branch 
'master':
bpo-40501: Replace ctypes code in uuid with native module (GH-19948)
https://github.com/python/cpython/commit/d6b727e2c947240804b8e434b305ba2890122550


--

___
Python tracker 

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



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-05-12 Thread Steve Dower


Steve Dower  added the comment:

Sounds like a good opportunity for someone to make their first contribution.

Post a message if you'd like to work on this (and a test), and we can help get 
through the PR process.

--
keywords: +easy, newcomer friendly

___
Python tracker 

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



[issue38728] Update PC/pyconfig.h to support disabling auto linking

2020-05-12 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the ping - sorry, I've been largely offline while I'm between 
internet providers.

The change is fine, but I wonder whether we should document it somewhere? Most 
likely in the devguide, which is in a separate repo, but perhaps a mention in 
PCbuild/readme.txt too?

Presumably you looked around for ideas before figuring out the issue - anywhere 
you might have found it? Just in the source code?

--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Stefan Behnel


Stefan Behnel  added the comment:

Since it's not clear from this ticket what the original problem was, is there a 
chance it could have been related to issue 35810?

--
nosy: +scoder

___
Python tracker 

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



[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2020-05-12 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I need to check, but I think this is a duplicate of bpo-35983, which still has 
PR 12607 open.

--

___
Python tracker 

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



[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2020-05-12 Thread Irit Katriel

New submission from Irit Katriel :

While migrating our codebase from python 3.7 to python 3.8, one of our unit 
tests segfaulted and I’ve narrowed it down to the change of typeobject.c in:

  commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3
  Author: Jeroen Demeyer 
  Date:   Fri May 10 19:21:11 2019 +0200
  bpo-35983: skip trashcan for subclasses (GH-11841)   

It seems that Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible (as 
claimed in the comment above their definition in object.h).

This patch has a unit test that currently fails, along with the change in 
typeobject.c that restores the code that broke it: 

https://github.com/iritkatriel/cpython/commit/d962dd7f800fdaaeacd5748c6e3d38bf1f5053c1

I believe that this change needs to be pushed until the 
Py_TRASHCAN_SAFE_BEGIN/END are removed and all users are forced to migrate to 
the new Py_TRASHCAN_BEGIN/END.

--
components: Interpreter Core
messages: 368740
nosy: iritkatriel, jdemeyer, pablogsal, pitrou
priority: normal
severity: normal
status: open
title: PY3.8 GC segfault  (Py_TRASHCAN_SAFE_BEGIN/END are not backwards 
compatible)
type: crash
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



[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-12 Thread Thomas Caswell


Thomas Caswell  added the comment:

That seems reasonable.

To be pedantic, it is pyqt5-sip (not sip) that was the source of the problem.

I am going to open an issue with pip to disable caching locally built wheels 
for pre-released versions of Python.

--

___
Python tracker 

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



[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19366
pull_request: https://github.com/python/cpython/pull/20058

___
Python tracker 

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Serhiy!

--

___
Python tracker 

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



[issue40257] Improve the use of __doc__ in pydoc

2020-05-12 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

I've sent a request for comments on python-dev 

https://mail.python.org/archives/list/python-...@python.org/thread/6QO2XI5B7RVZDW3YZV24LYD75VGRITFU/

Thanks.

--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f453221c8b80e0570066a9375337f208d50e6406 by Victor Stinner in 
branch 'master':
bpo-40602: Add _Py_HashPointerRaw() function (GH-20056)
https://github.com/python/cpython/commit/f453221c8b80e0570066a9375337f208d50e6406


--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The workaround that Cython had to added for this (temporarily enable 
Py_TPFLAGS_HEAPTYPE when calling PyType_Ready()) is fragile. It would be nice 
to rethink the approach here, or disable the check altogether.

(or perhaps, expose another C API function - such as PyType_ReadyEx() - that 
allows disabling the check)

--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19365
pull_request: https://github.com/python/cpython/pull/20056

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2020-05-12 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-12 Thread hai shi


hai shi  added the comment:

In PR19982, petr have mentioned that `PyType_GetModule` can not worked if the 
type is the subtype.

I try to use pep573 in functools, I get the error info from testcases:
==
ERROR: test_arg_combinations (test.test_functools.TestPartialCSubclass)
--
Traceback (most recent call last):
  File "/temp/shihai/cpython/Lib/test/test_functools.py", line 109, in 
test_arg_combinations
p = self.partial(capture)
TypeError: PyType_GetModule: Type 'CPartialSubclass' has no associated module

==
ERROR: test_attributes (test.test_functools.TestPartialCSubclass)
--
Traceback (most recent call last):
  File "/temp/shihai/cpython/Lib/test/test_functools.py", line 71, in 
test_attributes
p = self.partial(capture, 1, 2, a=10, b=20)
TypeError: PyType_GetModule: Type 'CPartialSubclass' has no associated module

--

___
Python tracker 

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



[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-05-12 Thread hai shi


Change by hai shi :


--
pull_requests: +19364
pull_request: https://github.com/python/cpython/pull/20055

___
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-12 Thread Tim Peters


Tim Peters  added the comment:

Ned, I'm happy to do this. While the ability to join wasn't documented, it's 
not an unreasonable expectation. I'm not sure it's possible to fail _unless_ 
the regexps use named groups (and/or numbered backreferences) - and nobody in 
their right mind would expect regexps for such simple patterns to do such a 
thing ;-)

So chances seem decent the regression your user stumbled into wouldn't be the 
only one to pop up.  The fix was actually quite easy (and thanks to Anthony for 
nudging me in that direction!).  The annoying part was writing a test given 
that the precise group names generated are no longer predictable :-(

--

___
Python tracker 

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



[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-12 Thread miss-islington


miss-islington  added the comment:


New changeset 4c9ea093cd752a6687864674d34250653653f743 by scoder in branch 
'master':
bpo-38787: Add PyCFunction_CheckExact() macro for exact type checks (GH-20024)
https://github.com/python/cpython/commit/4c9ea093cd752a6687864674d34250653653f743


--
nosy: +miss-islington

___
Python tracker 

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



[issue33944] Deprecate and remove code execution in pth files

2020-05-12 Thread Anthony Sottile


Anthony Sottile  added the comment:

fwiw virtualenv 20.x uses `.pth` now as well to fix some issues with 
`venv`-based environments

--

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2020-05-12 Thread Petr Viktorin


Petr Viktorin  added the comment:

> For example, Objects/longobject.c defines "PyTypeObject PyLong_Type = 
> {...};". This type is exposed in the limited C API (!)

Technically, it is not, see https://www.python.org/dev/peps/pep-0384/#structures
Structures like PyLong_Type are *not* part of the limited API.

> I propose to break the limited C API backward compatibility on purpose by 
> removing these type definitions form the limited C API.

That could only be done in Python 4.0, or if we started C-API 4.0. But I don't 
think it's necessary here.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-12 Thread Petr Viktorin


Petr Viktorin  added the comment:

So, the failure is expected. Python's ABI can change until the 3.9.0 final 
release, so wheels built for different commits can be incompatible.
This applies to alphas/betas as well, as you say.

There is the PEP 384 stable ABI, which is much stricter (and more limited), but 
sip doesn't use it -- its wheels are specific to cp36/cp37/cp38: 
https://pypi.org/project/sip/#files

Thanks for testing, though! Perhaps we need to communicate better that for the 
alphas/betas, everything needs to be rebuilt.

--

___
Python tracker 

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5650e76f63a6f4ec55d00ec13f143d84a2efee39 by Serhiy Storchaka in 
branch 'master':
bpo-40596: Fix str.isidentifier() for non-canonicalized strings containing 
non-BMP characters on Windows. (GH-20053)
https://github.com/python/cpython/commit/5650e76f63a6f4ec55d00ec13f143d84a2efee39


--

___
Python tracker 

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



[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-12 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +19363
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20054

___
Python tracker 

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



[issue14803] Add feature to allow code execution prior to __main__ invocation

2020-05-12 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

Note that coveragepy ain't the sole usecase for this.

https://pypi.org/project/manhole/ - a debugging tool
https://pypi.org/project/hunter/ - a tracer

In addition to those there's https://pypi.org/project/pytest-cov/ which 
packages the pth trick so coverage works consistently in all scenarios without 
putting users through the trouble of messing their python installation.

Also, the amount of activity and enthusiasm on changing something that already 
works while other inconsistencies in python's core like issue23990 are ignored 
is disheartening.

--
nosy: +ionelmc

___
Python tracker 

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



[issue18857] urlencode of a None value uses the string 'None'

2020-05-12 Thread James Addison


James Addison  added the comment:

NB: There appears to be some relevant discussion in 
https://github.com/whatwg/url/issues/469

--

___
Python tracker 

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



[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-12 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
resolution:  -> duplicate

___
Python tracker 

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



[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-12 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Closing as a duplicate of #38323: https://bugs.python.org/issue38323

--
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: MultiLoopWatcher has a race condition (test_asyncio: 
test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

___
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-12 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I think I have a possible explanation for this now.

In my reproducer script and in the original test, the wakeup file descriptor 
isn't set. I think this explains why the loop isn't waking up to call SIGCHLD's 
handler when the signal comes in. The reason the wakeup file descriptor isn't 
set in the original test is that MultiLoopChildWatcher registers the SIGCHLD 
handler using signal.signal():
https://github.com/python/cpython/blob/74ea6b5a7501fb393cd567fb21998d0bfeeb267c/Lib/asyncio/unix_events.py#L1261-L1267
rather than using loop.add_signal_handler(), which calls signal.set_wakeup_fd():
https://github.com/python/cpython/blob/74ea6b5a7501fb393cd567fb21998d0bfeeb267c/Lib/asyncio/unix_events.py#L95

Is there a reason MultiLoopChildWatcher.attach_loop() isn't calling 
loop.add_signal_handler()? Since attach_loop() has to be called from the main 
thread anyways, it seems like it could be okay.

I also wonder if the documentation could perhaps be more specific as to the 
difference between loop.add_signal_handler() and signal.signal(). Currently, it 
just says callbacks registered with add_signal_handler() are "allowed to 
interact with the event loop":
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.add_signal_handler
But it doesn't give any warnings about using signal.signal(). For example, it 
might be worth saying something about the possibility of hangs if 
add_signal_handler() isn't used.

--

___
Python tracker 

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



[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-12 Thread Roman Skurikhin


New submission from Roman Skurikhin :

In https://bugs.python.org/issue32751 asyncio.wait_for behaviour was changed 
that when we use timeout=... and the timeout expires, it waits until task is 
canceled. However, in some cases inner task can trigger exception while it 
handles cancellation. Check the following code:


import asyncio


async def ignore_cancel_and_raise():
try:
await asyncio.sleep(20)
except asyncio.CancelledError:
raise Exception('Cancellation failed')


async def main():
try:
await asyncio.wait_for(ignore_cancel_and_raise(), timeout=1)
except asyncio.TimeoutError:
print('Timeout')

asyncio.run(main())


It will print "Timeout" and log a warning that "Task exception was never 
retrieved".

I think that in case inner task cancelation fails with some error, 
asyncio.wait_for should reraise it instead of silently losing it.

--
components: asyncio
messages: 368723
nosy: Roman Skurikhin, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.wait_for should reraise future exception even if timeout expires
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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa


Isa  added the comment:

Their answer is: "Again: setup your environment so that python3 is available as 
python."

Can you help in that matter cause I can do nothing, please??

The Operatery System is: X-Ubuntu 20.04 lts
https://xubuntu.org/release/20-04/

--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7c6e97077525f0ad3cfa0971028313b9079449fd by Victor Stinner in 
branch 'master':
bpo-40602: Optimize _Py_hashtable for pointer keys (GH-20051)
https://github.com/python/cpython/commit/7c6e97077525f0ad3cfa0971028313b9079449fd


--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa


Isa  added the comment:

Thank you for having helped.
I've contacted the support of the programms and had explained how to solve the 
issue. Now... let's go and see ;)...

Have a nice day!

--

___
Python tracker 

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



[issue40589] Missing path-like versionchanged in shutil.rmtree

2020-05-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your PR Ville, but I think this change cannot be accept.

There was a ton of functions which became supporting path-like objects in 3.6. 
We deliberately did not add versionchanged directives to them because it would 
just add a noise.

shutil.rmtree() is not special. If we decide to add versionchanged for it, we 
would need to add versionchanged to many tens or hundreds of other functions 
and methods.

--
nosy: +serhiy.storchaka
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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +19362
pull_request: https://github.com/python/cpython/pull/20053

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Vedran Čačić

Vedran Čačić  added the comment:

You surely can, but I don't know much about OS X. You can probably set some 
kind of alias (https://www.peachpit.com/articles/article.aspx?p=31442=5).

--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa


Isa  added the comment:

You're right! instead of python3 it's written python only. Thank you!

I can't change them :( because I can't open them properly :(...
Can I change the name of the python's file? or???

--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Vedran Čačić

Vedran Čačić  added the comment:

Of course the _env_ is in /usr/bin. It's _python_ that's not found.

What program are you trying to run? And does it maybe start with

 #!/usr/bin/env python

? If yes, you should change it to python3.

--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa


Isa  added the comment:

I understand less and less

$ python3 myscript.py
python3: can't open file 'myscript.py': [Errno 2] No such file or directory

--

___
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-12 Thread Ned Batchelder


Ned Batchelder  added the comment:

Wow, thanks Tim. To be honest, I was coming around to your original point of 
view that it was too much to promise that these regexes could be combined the 
way I'm doing it.  If we have to undo this latest change, I can live with it.

--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa


Isa  added the comment:

Sorry. I had to write, "when I open a programm."

And what I can't understand, too is: that file is in usr/bin!!

Is there anything in what can explain that mess?

--
Added file: https://bugs.python.org/file49151/env

___
Python tracker 

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



[issue40593] Improve error reporting for invalid character in source code

2020-05-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue40593] Improve error reporting for invalid character in source code

2020-05-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 74ea6b5a7501fb393cd567fb21998d0bfeeb267c by Serhiy Storchaka in 
branch 'master':
bpo-40593: Improve syntax errors for invalid characters in source code. 
(GH-20033)
https://github.com/python/cpython/commit/74ea6b5a7501fb393cd567fb21998d0bfeeb267c


--

___
Python tracker 

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



[issue33944] Deprecate and remove code execution in pth files

2020-05-12 Thread Nick Coghlan


Nick Coghlan  added the comment:

While it's still not entirely accurate, I've tweaked the title on the issue to 
refer to the arbitrary code execution behavior.

Getting "Make pth file sys.path modifications easier to debug" in there as well 
would be rather tricky :)

--

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Vedran Čačić

Vedran Čačić  added the comment:

What do you mean by 

> when I want to use a programm with Python

? Do you write something like

~$ python3 myscript.py

? If so, maybe it's myscript.py that's missing, not Python itself.

--

___
Python tracker 

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



[issue40606] Copy property return annotations to __annotations__

2020-05-12 Thread Eric Wieser


Change by Eric Wieser :


--
keywords: +patch
nosy: +Eric.Wieser
nosy_count: 1.0 -> 2.0
pull_requests: +19361
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20052

___
Python tracker 

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



[issue40606] Copy property return annotations to __annotations__

2020-05-12 Thread Eric Wieser


New submission from Eric Wieser :

Consider a class like

class MyClass:
x: int
y: int

Which has

>>> MyClass.__annotations__
{'x': int, 'y': int}

In future, it might change to

class MyClass:
@property
def x(self) -> int:
...
@functools.cached_property
def x(self) -> int:
...

Most code won't be able to tell the difference, as properties are already a 
mostly-transparent replacement for attributes - but any code looking at 
`__annotations__` will find it is now absent.

It would be handy if `property.__set_name__` and `cachedproperty.__set_name__` 
could populate the `__annotations__` dict from their return type annotation.

This isn't just hypothetically useful - `sphinx` master as of 
https://github.com/sphinx-doc/sphinx/pull/7564 is able to retrieve the type of 
any descriptor with this behavior.

--
components: Library (Lib)
messages: 368710
nosy: Eric Wieser
priority: normal
severity: normal
status: open
title: Copy property return annotations to __annotations__
type: enhancement
versions: 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



[issue33944] Deprecate and remove code execution in pth files

2020-05-12 Thread Nick Coghlan


Change by Nick Coghlan :


--
title: Deprecate and remove pth files -> Deprecate and remove code execution in 
pth files

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa

Isa  added the comment:

Good question ;D
I don't know and I don't understand...

When I type the commands to know the version, I receive this:
~$ python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

But when I want to use a programm with Python, I receive: /usr/bin/env: 
«python»: Aucun fichier ou dossier de ce type

--

___
Python tracker 

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



[issue40603] slice not hashable

2020-05-12 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I think slices were explicitly made not hashable to avoid issues to avoid 
issues with dictionaries, see discussion at 
https://mail.python.org/pipermail/python-list/2001-March/076101.html and issue 
408326.

The commit that did this is 
https://github.com/python/cpython/commit/a1351fbd884189329bbcb6c688ca992fc1afc3f6

Is this not needed anymore? Wouldn't this need to be discussed on python-ideas?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Vedran Čačić

Vedran Čačić  added the comment:

How do you know which version of Python you have if you can't run it? :-)

--
nosy: +veky

___
Python tracker 

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



[issue40605] «python»: Aucun fichier ou dossier de ce type

2020-05-12 Thread Isa

New submission from Isa :

OS: X-Ubuntu 20.04 LTS
Python's version: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux

Since the last update I receive the following message:
/usr/bin/env: «python»: Aucun fichier ou dossier de ce type

Thank you in advance for helping.

--
messages: 368706
nosy: sab1703
priority: normal
severity: normal
status: open
title: «python»: Aucun fichier ou dossier de ce type
type: crash
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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am not sure that changes in issue39500 was correct. It is easier to catch a 
bug if crash consistently when you pass a non-canonicalized strings then if 
silently return a wrong result for specific input on particular platform.

Alternatively, you could reimplement correct handling of surrogate pairs in  
PyUnicode_IsIdentifier().

--

___
Python tracker 

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



[issue40604] Regression in 3.8.3rc1 - error in tests run via doctest

2020-05-12 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

See issue 39562

--
nosy: +BTaskaya

___
Python tracker 

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



[issue40604] Regression in 3.8.3rc1 - error in tests run via doctest

2020-05-12 Thread Case Van Horsen


New submission from Case Van Horsen :

An error in the gmpy2 test suite was reported at 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960201
 
The test suite is run using doctest and has been running without issues for 
many years. The first failure occurs when running the following fragment:

>>> x = xmpz(16)
>>> iter = x.iter_bits()
>>> [b for b in iter]
[False, False, False, False, True]

The output is as expected when run interactively on 3.8.3rc1 but generated the 
following error message:

/home/case/local/lib/python3.8/doctest.py:1336: RuntimeWarning: coroutine 
'' was never awaited
  exec(compile(example.source, filename, "single",
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
**
File "test_gmpy2_xmpz_misc.txt", line 91, in test_gmpy2_xmpz_misc.txt
Failed example:
[b for b in iter]
Differences (ndiff with -expected +actual):
- [False, False, False, False, True]
**

Note the runtime warning for doctest.py.

--
components: Library (Lib)
messages: 368703
nosy: casevh
priority: normal
severity: normal
status: open
title: Regression in 3.8.3rc1 - error in tests run via doctest
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