[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue41429] Let fnmatch.filter accept a tuple of patterns

2020-08-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36982] Add support for extended color functions in ncurses 6.1

2020-08-10 Thread Ned Deily

Ned Deily  added the comment:

> We really need to get this merged since, without it, Python builds fail with 
> the newer versions of ncurses now in most distributions.

That is a bit of an overstatment on my part. What is true is that test_curses 
fails on 3.9 and 3.8 when run with ncurses 6.1+.  It is also true that the 
relevant parts of test_curses are often skipped in CI and buildbot runs as 
described in Issue12669 so a test failure is often not seen.

> Łukasz can provide direction about whether and when it should be backported 
> to 3.9 and/or 3.8.

We discussed this and decided that a backport to 3.8 was out-of-scope but a 
backport in time for 3.9.0 might be OK.  Alas, I had forgotten that other 
changes have gone into master for 3.10 prior to this merge which complicates a 
backport to 3.9, enough that we shouldn't be trying to throw this in just prior 
to 3.9.0rc1.

Thanks everyone for the work on this!

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-10 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The purpose of the _init() function in PurePath is to allow PurePath methods to 
call the Path subclass override _init() function when initializing a Path 
object.

--

___
Python tracker 

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



[issue41468] Unrecoverable server exiting

2020-08-10 Thread Albert Francis


Albert Francis  added the comment:

Got it, thanks!

On Mon, 10 Aug 2020, 19:26 Terry J. Reedy,  wrote:

>
> Terry J. Reedy  added the comment:
>
> Test error fixed on issue 41514.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41197] Async magic methods in contextlib.closing

2020-08-10 Thread Yury Selivanov


Change by Yury Selivanov :


--
nosy: +asvetlov, njs

___
Python tracker 

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



[issue41197] Async magic methods in contextlib.closing

2020-08-10 Thread Yury Selivanov


Yury Selivanov  added the comment:

I'm OK with adding this, but the close method should be `aclose()`

--

___
Python tracker 

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



[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Thomas Caswell


Thomas Caswell  added the comment:

bisecting agrees with Matthias:

# first bad commit: [c067183605cf84bb1a246635f52827251d0476f8] bpo-40807: Show 
warnings once from codeop._maybe_compile (GH-20486)

--
nosy: +tcaswell

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree, Steven.

This doesn't seem to be a problem with Python. It's more likely a problem with 
the user's shell, or some other environment integration problem. If it can be 
duplicated in 3.8 or later, we can investigate further.

--

___
Python tracker 

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



[issue41517] Able to subclass enum with members by using multiple inheritance

2020-08-10 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The documentation says:

"Allowing subclassing of enums that define members would lead to a violation of 
some important invariants of types and instances."

but it isn't clear what those invariants are, or why it is more of a problem 
for enums than any other subclassing situation. Could the docs be updated to 
explain why it is prohibited?

--
nosy: +steven.daprano
title: Enum multiple inheritance loophole -> Able to subclass enum with members 
by using multiple inheritance

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Python 3.6 has reached security-fix only stage:

https://www.python.org/dev/peps/pep-0494/#schedule-last-bugfix-release

so even if this is a bug, it won't be fixed in 3.6.

I cannot reproduce this in 3.7, and Eric cannot reproduce in 3.6.9, so I'm 
closing the issue. Please re-open if you can reproduce in 3.8 or better. (3.7 
is also only accepting security fixes only.)

(Eric do you concur? If you disagree please feel free to re-open.)

--
nosy: +steven.daprano
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue40807] Codeop: Show warnings once during _maybe_compile

2020-08-10 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

I think that might have introduce https://bugs.python.org/issue41520 where now 
`warnings.simplefilter('error', SyntaxWarning)` is silently ignored...

--
nosy: +mbussonn

___
Python tracker 

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



[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Potentially due to 

https://bugs.python.org/issue40807
https://github.com/python/cpython/pull/20486

--

___
Python tracker 

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



[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

seem to affect 3.8.4 as well.

--

___
Python tracker 

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



[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Matthias Bussonnier


New submission from Matthias Bussonnier :

assuming 

$ cat foo.py
import warnings
from codeop import compile_command

warnings.simplefilter('error', SyntaxWarning)
res = compile_command('1 is 1\n', symbol='exec')
print('Res', res)

On 3.8.0...3.8.4 this correctly raises a SyntaxError:

 python  foo.py
Traceback (most recent call last):
  File "foo.py", line 5, in 
res = compile_command('1 is 1\n', symbol='exec')
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/codeop.py", 
line 122, in compile_command
return _maybe_compile(_compile, source, filename, symbol)
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/codeop.py", 
line 99, in _maybe_compile
raise err1
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/codeop.py", 
line 87, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/codeop.py", 
line 102, in _compile
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
  File "", line 1
SyntaxError: "is" with a literal. Did you mean "=="?



But will silently return None on 3.8.5

$ python  foo.py
Res None

--
components: Interpreter Core
messages: 375152
nosy: mbussonn
priority: normal
severity: normal
status: open
title: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not 
raise.
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



[issue40275] test.support has way too many imports

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

Update.

"import test.support" now imports 37 modules, instead of 171 previously. It's 
way better!

23:26:20 vstinner@apu$ ./python
Python 3.10.0a0 (heads/master:598a951844, Aug  7 2020, 17:24:10) 
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import test
>>> before=set(sys.modules)
>>> import test.support
>>> after=set(sys.modules)
>>> len(after - before)
37
>>> import pprint; pprint.pprint(sorted(after - before))
['_datetime',
 '_elementtree',
 '_heapq',
 '_sysconfigdata_d_linux_x86_64-linux-gnu',
 '_testcapi',
 '_weakrefset',
 'argparse',
 'copy',
 'datetime',
 'difflib',
 'fnmatch',
 'gettext',
 'heapq',
 'math',
 'pprint',
 'pyexpat',
 'pyexpat.errors',
 'pyexpat.model',
 'signal',
 'sysconfig',
 'test.support',
 'test.support.testresult',
 'traceback',
 'unittest',
 'unittest.case',
 'unittest.loader',
 'unittest.main',
 'unittest.result',
 'unittest.runner',
 'unittest.signals',
 'unittest.suite',
 'unittest.util',
 'weakref',
 'xml',
 'xml.etree',
 'xml.etree.ElementPath',
 'xml.etree.ElementTree']


Shorter list if imports made by unittest are ignored:

23:27:42 vstinner@apu$ ./python
Python 3.10.0a0 (heads/master:598a951844, Aug  7 2020, 17:24:10) 
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, unittest, test
>>> before=set(sys.modules)
>>> before=set(sys.modules); import test.support; after=set(sys.modules)
>>> len(after) - len(before)
17
>>> import pprint; pprint.pprint(sorted(after - before))
['_datetime',
 '_elementtree',
 '_sysconfigdata_d_linux_x86_64-linux-gnu',
 '_testcapi',
 'copy',
 'datetime',
 'math',
 'pyexpat',
 'pyexpat.errors',
 'pyexpat.model',
 'sysconfig',
 'test.support',
 'test.support.testresult',
 'xml',
 'xml.etree',
 'xml.etree.ElementPath',
 'xml.etree.ElementTree']

--

___
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-08-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 490c5426b1b23831d83d0c6b269858fb98450889 by Hai Shi in branch 
'master':
bpo-40275: Fix failed test cases by using test helpers (GH-21811)
https://github.com/python/cpython/commit/490c5426b1b23831d83d0c6b269858fb98450889


--

___
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-08-10 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +20949
pull_request: https://github.com/python/cpython/pull/21818

___
Python tracker 

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



[issue41519] `pkgutil.get_data` causes future imports of children modules to fail.

2020-08-10 Thread Cory Nezin


New submission from Cory Nezin :

As demonstrated in this Stack Overflow question 
(https://stackoverflow.com/questions/59377661/python-pkgutil-get-data-disrupts-future-imports)
 using `pkgutil.get_data` on a module causes future imports of children modules 
to fail.  I tracked this down to a call to `importlib._bootstrap.load` here: 
https://github.com/python/cpython/blob/3.8/Lib/pkgutil.py#L627

This seems to do something to sys.modules which I don't quite understand but I 
think it is caching the module when it shouldn't be.  If I replace the linked 
line with `importlib.import_module(package))` it seems to work okay.

--
components: Library (Lib)
files: pkgutil_err.tar
messages: 375149
nosy: cnezin
priority: normal
severity: normal
status: open
title: `pkgutil.get_data` causes future imports of children modules to fail.
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49381/pkgutil_err.tar

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Also, how are you running this? From the interactive shell (like I show in my 
previous message), or some other way?

--

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu


Tal Suhareanu  added the comment:

Ethan Furman bullseye! thanks for clarifying

--

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-08-10 Thread David Edelsohn


David Edelsohn  added the comment:

+Eryksun,Vinay

The patch to address array passing described in issue #22273 introduced 
regressions for other targets.  The 16 byte struct size is specific to x86 ABI 
and register passing convention.  I appreciate that the 16-32 byte size 
structure causes an abort for x64, but the patch shifted the problem to other 
targets that now produce wrong code.  The later comments in discussion thread 
for issue #22273 refer to patches that disable and reenable ctypes struct tests 
for ARMv7 and PPC, so this regression is not a surprise.

stgdict.c currently includes a target-specific work-around for small structures 
that is not restricted to the one target (x64) affected.

What's the best way to proceed?

--
nosy: +eryksun, vinay.sajip

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I just read that the release is tomorrow, so no issue about including this.

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Ethan Furman


Ethan Furman  added the comment:

The problem is that class B should raise an error as class A already has 
members.

--

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2020-08-10 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu


Tal Suhareanu  added the comment:

sorry, I'll explain. by "when inheriting an implemented enum, we get a runtime 
error" I refer to this 
https://docs.python.org/3/library/enum.html#restricted-enum-subclassing

You shouldn't be able to subclass an enum, yet I just showed a loophole. my 
example code shows you can subclass an enum by using a trick, multiple 
inheritance.

I hope it's more clear now :)

btw it also works with regular Enum inheritance (I just used IntEnum for 
simplicity)

--

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Here's what I see:

Python 3.6.9 (default, Jul 21 2019, 14:33:59)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> stack = ['(', '(', '[', ']', ')']
>>> for i in stack:
... print(i)
...
(
(
[
]
)

That looks correct to me. What exact version of 3.6 are you using, and on what 
platform?

--
nosy: +eric.smith

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

With Python 3.7.4, which is all I have handy, that code does not give a runtime 
error. It prints "B.b".

Your text says code "when creating a multiple inheritance like the following, 
it works". It sounds like you know the code sample works. So I don't understand 
what code gives a runtime error. What type of error are you seeing?

--

___
Python tracker 

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



[issue36700] base64 has old references that should be updated

2020-08-10 Thread Paul Ganssle


Paul Ganssle  added the comment:

Now that issue #16995 is resolved, I think we can move forward with updating 
the text.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu


Tal Suhareanu  added the comment:

Eric V. Smith it's in the first comment

--

___
Python tracker 

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



[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)

2020-08-10 Thread Paul Ganssle


Paul Ganssle  added the comment:

Thanks Filipe!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)

2020-08-10 Thread Filipe Laíns

Filipe Laíns  added the comment:

Paul, the PR is now merged :). Can you close the bug?

--
nosy: +p-ganssle

___
Python tracker 

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



[issue41518] incorrect printing behavior with parenthesis symbols

2020-08-10 Thread Ramesh Sahoo


New submission from Ramesh Sahoo :

With for loop, I am able to print all elements in the list 'a'

a = ['a','a','b','b','c']
for i in a:
print(i)

O/P: 

a
a
b
b
c

but with the following loop, python only prints 3 uniq elements instead of 5. 

stack = ['(', '(', '[', ']', ')']
for i in stack:
print(i)

O/P: 
(
]
)


Is this is intended behavior?

--
messages: 375136
nosy: rameshsahoo11
priority: normal
severity: normal
status: open
title: incorrect printing behavior with parenthesis symbols
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Could you provide code which demonstrates the problem?

--
nosy: +eric.smith

___
Python tracker 

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



[issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters

2020-08-10 Thread Sebastian Berg


Sebastian Berg  added the comment:

In NumPy ufuncs and datatype casting (iteration) we have the following setup:

   user-code (releasing GIL) -> NumPy API -> 3rd-party C-function 

(in the ufunc code, numpy is the one releasing the GIL, although others, such 
as numba probably hook in and replace that.)
Now, I want the 3rd-party C-function to be able to report errors in a 
reasonable way. Which, in my opinion means it must be able to grab the GIL, set 
an error (potentially release the GIL) and return an error result.
In theory, setting the error could be deferred to some later "cleanup" when the 
GIL is held, but that just does not seem practical to me.

One thing which may make this not as problematic is that the all of this can be 
expected to run within a Python created thread, so I somewhat think the initial 
proposal here would effectively fix the current NumPy usage (I am not sure).


The reason I ask/post this is, that this is all part of public-API which 
requires a complete re-implementation very soon. While extensions to that new 
API may be possible, that is always a bit painful, so it would be good to know 
how that API should be designed right now.

At this point, it seems that I should design the 3rd-party C-function API so 
that it is passed a `void *reserved = NULL` (always NULL) to be able to pass a 
`PyThreadState *` or `PyInterpreterState *` at some point safely. (Or a 
`PyThreadState **`/ `PyInterpreterState **`?)

In the majority of cases, I could already pass this right now, but I have 
currently no clear idea of what is the best practice. I also need to take such 
an argument (requiring new API) in at least one place. If we know how this will 
pan out, adding it sooner rather than later would be good, since it will make 
future transition/adoption faster or at least easier.

As far as I understand, right now PyGILState_Ensure()` not working is probably 
the single most blocking issue for correct subinterpreter support in NumPy, 
since this is baked into public API it may take years for true support in the 
above way, but we may be able to go a large part of the way now. My problem is 
that I can only do that if I am clear on what is needed.

--
nosy: +seberg

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Tal Suhareanu

New submission from Tal Suhareanu :

when inheriting an implemented enum, we get a runtime error
But when creating a multiple inheritance like the following, it works… so 
something feels broken in the enum mechanism


from enum import IntEnum, Enum

class A(IntEnum):
   a = 1

class B(A, Enum):
   b= 1

print(B.b)


--
components: Library (Lib)
messages: 375133
nosy: talsuk5
priority: normal
severity: normal
status: open
title: Enum multiple inheritance loophole
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 2cd58d8bb15c1afaeef59106941d6db697074ce8 by Miss Islington (bot) 
in branch '3.9':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job 
(GH-21806)
https://github.com/python/cpython/commit/2cd58d8bb15c1afaeef59106941d6db697074ce8


--

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 09d82609be3d4903104610ed918caeefb953f79a by Miss Islington (bot) 
in branch '3.8':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job 
(GH-21806)
https://github.com/python/cpython/commit/09d82609be3d4903104610ed918caeefb953f79a


--

___
Python tracker 

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



[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-08-10 Thread James Franks


James Franks  added the comment:

Hope this helps:

I'm running Python Shell 3.8.5 on MacOSx 10.15.6 (Catalina).  I can reproduce 
this hang easily.

Open any existing module or create a new one.  Can save the existing module or 
a new one just fine under the same name. (File menu - Save)

Using "Save as..." from File dropdown menu, Windows appears, change the name, 
hit Save button and IDLE hangs.

After approximately a minute the window becomes active again, but when hitting 
any button (Cancel or Save) it hangs again.  No way to get out of this but 
force quit IDLE.

My files are in iCloud documents folder.

Did the same test with a Mac running Mojave (10.14.6) Also with Python Shell 
3.8.5.  Works fine.  Seems to be something with Catalina as some have 
mentioned. 

Please help.  This is extremely frustrating for someone like me just trying to 
learn Python.  I will switch over to the machine running Mojave.  Thanks for 
helping!

--
nosy: +franksj

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20946
pull_request: https://github.com/python/cpython/pull/21813

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20947
pull_request: https://github.com/python/cpython/pull/21814

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20945
pull_request: https://github.com/python/cpython/pull/21812

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset eaa551702d80fd67219c48ee6a13ffb571ca360b by Victor Stinner in 
branch 'master':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job 
(GH-21806)
https://github.com/python/cpython/commit/eaa551702d80fd67219c48ee6a13ffb571ca360b


--

___
Python tracker 

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



[issue37873] unittest: execute tests in parallel

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Leveraging GNU Parallel (https://www.gnu.org/software/parallel/) might help 
> simplify implementation. Perhaps that could be used as a subprocess call?

In general, we attempt to avoid depending on the availability of external tool. 
For example, I don't expect this tool to be available on Windows, whereas it 
would be better to support parallel execution on Windows as well.

--

___
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-08-10 Thread hai shi


Change by hai shi :


--
pull_requests: +20944
pull_request: https://github.com/python/cpython/pull/21811

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2020-08-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, the fix would seem simple enough. Can you submit a PR? It would be nice if 
it had a test as well.

--

___
Python tracker 

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



[issue37873] unittest: execute tests in parallel

2020-08-10 Thread D. A. Pellegrino


D. A. Pellegrino  added the comment:

Leveraging GNU Parallel (https://www.gnu.org/software/parallel/) might help 
simplify implementation. Perhaps that could be used as a subprocess call?

--

___
Python tracker 

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



[issue41516] venv activate scripts do not pass ShellCheck

2020-08-10 Thread D. A. Pellegrino


New submission from D. A. Pellegrino :

The activate scripts created by the venv module do not pass checks by 
ShellCheck (https://www.shellcheck.net/). ShellCheck generally has a point for 
each warning and note generated against the venv activate scripts. Addressing 
the ShellCheck reports would align the activate script implementation with best 
practices.

--
components: Extension Modules
messages: 375125
nosy: user93448
priority: normal
severity: normal
status: open
title: venv activate scripts do not pass ShellCheck
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-10 Thread hai shi


hai shi  added the comment:

> Hai Shi: Would you mind to investigate this issue?
Oh, sure, I will check the test cases again.

--

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-08-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20943
pull_request: https://github.com/python/cpython/pull/21806

___
Python tracker 

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



[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)

2020-08-10 Thread miss-islington

miss-islington  added the comment:


New changeset 4ce6faa6c9591de6079347eccc9e61ae4e8d9e31 by Filipe Laíns in 
branch 'master':
bpo-16995: add support for base32 extended hex (base32hex) (GH-20441)
https://github.com/python/cpython/commit/4ce6faa6c9591de6079347eccc9e61ae4e8d9e31


--
nosy: +miss-islington

___
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-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

test__osx_support and test_selectors are broken, examples:

https://github.com/python/cpython/pull/21806/checks?check_run_id=966438645

2020-08-10T12:04:20.7613070Z 
==
2020-08-10T12:04:20.7613710Z ERROR: test__remove_unsupported_archs 
(test.test__osx_support.Test_OSXSupport)
2020-08-10T12:04:20.7616560Z 
--
2020-08-10T12:04:20.7617240Z Traceback (most recent call last):
2020-08-10T12:04:20.7617860Z   File 
"/Users/runner/work/cpython/cpython/Lib/test/test__osx_support.py", line 23, in 
setUp
2020-08-10T12:04:20.7618560Z self.env = test.support.EnvironmentVarGuard()
2020-08-10T12:04:20.7621650Z AttributeError: module 'test.support' has no 
attribute 'EnvironmentVarGuard'

and

2020-08-10T12:01:40.0736200Z 
==
2020-08-10T12:01:40.0738440Z ERROR: test_register_bad_fd 
(test.test_selectors.KqueueSelectorTestCase)
2020-08-10T12:01:40.0742700Z 
--
2020-08-10T12:01:40.0744640Z Traceback (most recent call last):
2020-08-10T12:01:40.0747460Z   File 
"/Users/runner/work/cpython/cpython/Lib/test/test_selectors.py", line 539, in 
test_register_bad_fd
2020-08-10T12:01:40.0753630Z bad_f = support.make_bad_fd()
2020-08-10T12:01:40.0757650Z AttributeError: module 'test.support' has no 
attribute 'make_bad_fd'

Hai Shi: Would you mind to investigate this issue?

--

___
Python tracker 

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



[issue41324] Add a minimal decimal capsule API

2020-08-10 Thread Stefan Krah


Change by Stefan Krah :


--
components: +C API -Extension Modules
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



[issue41324] Add a minimal decimal capsule API

2020-08-10 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 39042e00ab01d6521548c1b7cc6554c09f4389ff by Stefan Krah in branch 
'master':
bpo-41324 Add a minimal decimal capsule API (#21519)
https://github.com/python/cpython/commit/39042e00ab01d6521548c1b7cc6554c09f4389ff


--

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2020-08-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 9c253f4bc9dbf711dce3fffeaef86179c29fa0f5 by Miss Islington (bot) 
in branch '3.9':
bpo-41514: Fix buggy IDLE test (GH-21808)
https://github.com/python/cpython/commit/9c253f4bc9dbf711dce3fffeaef86179c29fa0f5


--

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 860bc0ea70c365825bfd9b7de7685cf6842ca3c7 by Miss Islington (bot) 
in branch '3.8':
bpo-41514: Fix buggy IDLE test (GH-21808)
https://github.com/python/cpython/commit/860bc0ea70c365825bfd9b7de7685cf6842ca3c7


--

___
Python tracker 

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



[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

This bug should be fixed by:

New changeset d2bea2636d5f0c2b196966315790af8e79c7bf82 by Victor Stinner in 
branch '3.9':
[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)
https://github.com/python/cpython/commit/d2bea2636d5f0c2b196966315790af8e79c7bf82

I remove the "release blocker" priority.

--
priority: release blocker -> 
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Ok, then. I'll open a new bug.

bpo-41261: "3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval".

--

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

issue 41514 added the new test.

--

___
Python tracker 

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



[issue41468] Unrecoverable server exiting

2020-08-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Test error fixed on issue 41514.

--

___
Python tracker 

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



[issue41204] Use of unitialized variable `fields` along error path in code generated from asdl_c.py

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d2bea2636d5f0c2b196966315790af8e79c7bf82 by Victor Stinner in 
branch '3.9':
[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)
https://github.com/python/cpython/commit/d2bea2636d5f0c2b196966315790af8e79c7bf82


--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d2bea2636d5f0c2b196966315790af8e79c7bf82 by Victor Stinner in 
branch '3.9':
[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)
https://github.com/python/cpython/commit/d2bea2636d5f0c2b196966315790af8e79c7bf82


--

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 416f0b71ba84fe83ee2ba4399b8a28712702980b by Terry Jan Reedy in 
branch 'master':
bpo-41514: Fix buggy IDLE test (GH-21808)
https://github.com/python/cpython/commit/416f0b71ba84fe83ee2ba4399b8a28712702980b


--
nosy: +miss-islington

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2020-08-10 Thread Eric Fahlgren


New submission from Eric Fahlgren :

Windows 10 Pro 64
Python 3.8.3 64
wxPython 4.1.0

It appears that there are synthetic classes in the mro, which don't appear in 
the type's namespace, raising KeyError when encountered.  From reading the 
function's doc and source, it looks like it should handle this internally and 
return a valid dict (possibly empty), and not raise KeyError.

>>> import typing, wx
>>> typing.get_type_hints(wx.Window)'
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python38\lib\typing.py", line 1223, in get_type_hints
base_globals = sys.modules[base.__module__].__dict__

>>> wx.Window.mro()
[, , , , , , , 
]

KeyError: 'sip'

--
components: Library (Lib)
messages: 375111
nosy: eric.fahlgren
priority: normal
severity: normal
status: open
title: typing.get_type_hints generates KeyError
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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20941
pull_request: https://github.com/python/cpython/pull/21809

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20942
pull_request: https://github.com/python/cpython/pull/21810

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Your reproducer worked to reproduce the bug for me, make the cause obvious, and 
test the fix.

Łukasz, it would be good if this test fix made it into the release candidate, 
but probably not essential as not too many people will check it for refleaks.

--
nosy: +lukasz.langa
type:  -> behavior
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue18140] urlparse, urlsplit confused when password includes fragment (#), query (?)

2020-08-10 Thread david.six


david.six  added the comment:

tl;dr: '#', '?' and a few other characters should be URL-encoded/%-encoded when 
they appear in userinfo which will already parse correctly.

---

Following up on what Martin said, RFC 3986 has the specifications for how these 
examples should be parsed.

userinfo  = *( unreserved / pct-encoded / sub-delims / ":" )

unreserved= ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded   = "%" HEXDIG HEXDIG
sub-delims= "!" / "$" / "&" / "'" / "(" / ")"
 / "*" / "+" / "," / ";" / "="

Notably, gen-delims are _not_ included in the allowed characters, nor are 
non-ASCII characters.

gen-delims= ":" / "/" / "?" / "#" / "[" / "]" / "@"

These and other characters not mentioned should be URL-encoded/%-encoded if 
they appear in the password.

Taking the first example:

>>> from urllib.parse import urlparse
>>> u = 'http://auser:secr%23et@192.168.0.1:8080/a/b/c.html'
>>> urlparse(u)
ParseResult(scheme='http', netloc='auser:secr%23et@192.168.0.1:8080', 
path='/a/b/c.html', params='', query='', fragment='')
>>> unquote(urlparse(u).password)
'secr#et'

--
nosy: +david.six
status: pending -> open

___
Python tracker 

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



[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

> From what I understand an RC1 is being released for 3.9. This is a gentle 
> reminder that there is no fix for this yet.

I wrote PR 21807 to backport my changes from master to 3.9.

My PR fix a crash on 3.9 with the following script:
---
import sys
PyCF_ONLY_AST = 1024
tree = compile("x+y", "filename", "exec", PyCF_ONLY_AST)

import _ast
assert PyCF_ONLY_AST == _ast.PyCF_ONLY_AST

compile(tree, "filename", "exec")
del sys.modules['_ast']

import _ast
compile(tree, "filename", "exec")
---

--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-08-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20939
pull_request: https://github.com/python/cpython/pull/21807

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2020-08-10 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



[issue41514] test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8

2020-08-10 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/597/builds/178

test_error (idlelib.idle_test.test_run.HandleErrorTest) ... FAIL
(...)

==
FAIL: test_error (idlelib.idle_test.test_run.HandleErrorTest)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.8.cstratak-RHEL8-aarch64.refleak/build/Lib/unittest/mock.py",
 line 1325, in patched
return func(*newargs, **newkeywargs)
  File 
"/home/buildbot/buildarea/3.8.cstratak-RHEL8-aarch64.refleak/build/Lib/idlelib/idle_test/test_run.py",
 line 352, in test_error
eq(self.func.called, 2)
AssertionError: 4 != 2



I can reproduce the issue on 3.8, 3.9 and master branches:

14:00:18 vstinner@apu$ ./python -m test -m test_error -v test_idle  test_idle  
== CPython 3.8.5+ (heads/3.8:61f23cb62d, Aug 10 2020, 14:00:04) [GCC 10.2.1 
20200723 (Red Hat 10.2.1-1)]
== Linux-5.7.11-200.fc32.x86_64-x86_64-with-glibc2.29 little-endian
== cwd: /home/vstinner/python/3.8/build/test_python_43858
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.68 Run tests sequentially
0:00:00 load avg: 1.68 [1/2] test_idle
test_error (idlelib.idle_test.test_run.HandleErrorTest) ... ok

--

Ran 1 test in 0.004s

OK
0:00:00 load avg: 1.68 [2/2] test_idle
test_error (idlelib.idle_test.test_run.HandleErrorTest) ... FAIL

==
FAIL: test_error (idlelib.idle_test.test_run.HandleErrorTest)
--
Traceback (most recent call last):
  File "/home/vstinner/python/3.8/Lib/unittest/mock.py", line 1325, in patched
return func(*newargs, **newkeywargs)
  File "/home/vstinner/python/3.8/Lib/idlelib/idle_test/test_run.py", line 352, 
in test_error
eq(self.func.called, 2)
AssertionError: 4 != 2

--

Ran 1 test in 0.007s

FAILED (failures=1)
test test_idle failed
test_idle failed

== Tests result: FAILURE ==

1 test OK.

1 test failed:
test_idle

Total duration: 722 ms
Tests result: FAILURE


It seems like the test was added recently:

commit f2e161c27964a59bc5ab20d96f87ba5862c6222d
Author: Terry Jan Reedy 
Date:   Sun Aug 9 16:08:30 2020 -0400

bpo-41468: Improve and test IDLE run error exit  (GH-21798)

A message box pops up when an unexpected error stops the run process.  Tell 
users it is likely a random glitch, but report it if not.

--
assignee: terry.reedy
components: IDLE, Tests
messages: 375106
nosy: terry.reedy, vstinner
priority: normal
severity: normal
status: open
title: test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8
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



[issue41468] Unrecoverable server exiting

2020-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

test_error() of test_idle fails when it's run twice in a row: bpo-41514 
"test_idle: test_error() failed on aarch64 RHEL8 Refleaks 3.8".

--
nosy: +vstinner

___
Python tracker 

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



[issue40185] Refactor typing.NamedTuple

2020-08-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

$ echo 'from typing import NamedTuple; NamedTuple("A")' | ./python -m ast
Module(
   body=[
  ImportFrom(
 module='typing',
 names=[
alias(name='NamedTuple')],
 level=0),
  Expr(
 value=Call(
func=Name(id='NamedTuple', ctx=Load()),
args=[
   Constant(value='A')],
keywords=[]))],
   type_ignores=[])

So mod.body[-1].value is a call:

Call(func=Name(id='NamedTuple', ctx=Load()), args=[Constant(value='A')], 
keywords=[])

I do not know what Astroid does with this node, but seem the problem is in its 
infer() method.

--

___
Python tracker 

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



[issue40860] Exception in multiprocessing/context.py under load

2020-08-10 Thread Arkady


Arkady  added the comment:

"documentation of thread safety" 

I find it surprising that a module called "multiprocessing" has not a thread 
safe API.

If this is inevitable, I guess that's the life. I expect nothing less that a 
bold bright red font at the top of the document page. 

Protecting a call to join() with a mutex would impact latency of the API: the 
slowest subprocess can win the race.

--

___
Python tracker 

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



[issue40815] Multiprocessing docs don't describe thread-safety

2020-08-10 Thread Irit Katriel


Irit Katriel  added the comment:

Here's an example where such documentation may have helped: 
https://bugs.python.org/issue40860

--
nosy: +iritkatriel

___
Python tracker 

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



[issue40860] Exception in multiprocessing/context.py under load

2020-08-10 Thread Irit Katriel


Irit Katriel  added the comment:

There is an open ticket to improve documentation of thread safety of the 
multiprocessing module module: https://bugs.python.org/issue40815

Is there anything remaining to do on this ticket?

--

___
Python tracker 

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



[issue40185] Refactor typing.NamedTuple

2020-08-10 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to have caused a test failure in astroid project. I am not sure if 
the fix needs to be done from their end probably relying on some implementation 
detail or from the patch itself. Feel free to ignore if it's a third-party only 
error.

Reproducer script : /tmp/namedtuple_astroid.py

from astroid import parse

mod = parse('''from typing import NamedTuple; NamedTuple("A")''')
print(str(next(mod.body[-1].value.infer(
assert str(next(mod.body[-1].value.infer())) != 'Uninferable'

Before this commit : 

python /tmp/namedtuple_astroid.py
Instance of typing.NamedTuple

After this commit : 

python /tmp/namedtuple_astroid.py
Uninferable
Traceback (most recent call last):
  File "/tmp/namedtuple_astroid.py", line 4, in 
assert str(next(mod.body[-1].value.infer())) != 'Uninferable'
AssertionError

--
nosy: +xtreak

___
Python tracker 

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



[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-08-10 Thread Yaroslav Pankovych


Yaroslav Pankovych  added the comment:

Here's possible fix: https://github.com/python/cpython/pull/21799

--

___
Python tracker 

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



[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-08-10 Thread Yaroslav Pankovych


Yaroslav Pankovych  added the comment:

That's kinda weird for python. I mean, in regular list/etc if I need the last 
element, I'd normally do list[-1], but here to get the last parent, I need to 
actually know how many parents do I have.

So now, I can do something like this:

>>> parents_count = len(path.parents) - 1
>>> path.parents[parents_count]
PosixPath('.')

--
message_count: 16.0 -> 17.0
nosy: +ypank
nosy_count: 10.0 -> 11.0
pull_requests: +20938
stage:  -> patch review
versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.9
pull_request: https://github.com/python/cpython/pull/21799

___
Python tracker 

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



[issue41500] InterpolationSyntaxError reading the (windows) environment with unresolved environment variables

2020-08-10 Thread Pauser


Pauser  added the comment:

Thanks a lot for the fast response ... did not expect this ;)
I have looked into many threads and I will try to implement my own 
interpolation to use the current basic interpolation and process the current 
environment.

So thanks a lot, stay healthy and 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



[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-08-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-08-10 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

>From what I understand an RC1 is being released for 3.9. This is a gentle 
>reminder that there is no fix for this yet.

--

___
Python tracker 

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