[issue41613] get_type_hints regression for 3.9 and 3.10

2020-10-01 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Commit 3ff51d425ecd98b7ba5a12ca9f77eda73fbf9f53 set the __builtins__ to None in 
namedtuple's creation, but the problem is that it is causing harm when the 
point came to the point of getting type hints on typing.NamedTuple.__new__ (we 
had a test about it), I'm changing that test (in the PR 20434) to work directly 
with the namedtuple itself instead of __new__ (since the annotations get 
proxied).

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

Not nice to snip the traceback.

--

___
Python tracker 

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



[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This looks like a problem with the __globals__ of the NamedTuple.__new__

--

___
Python tracker 

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



[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
components: +Library (Lib)
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



[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

The attached script works perfectly fine under Python 3.8, but it crashes in 
3.9/3.10.

$ ./py38/python typing_fail.py (3.8.5+)
{'a': , 'b': }
$ ./py39/python typing_fail.py (3.9.0rc1+)
[SNIP]
TypeError: 'NoneType' object is not subscriptable
$ ./cpython/python typing_fail.py (3.10.0a0)
[SNIP]
TypeError: 'NoneType' object is not subscriptable

--
files: typing_fail.py
messages: 375791
nosy: BTaskaya, gvanrossum, levkivskyi, lukasz.langa
priority: normal
severity: normal
status: open
title: get_type_hints regression for 3.9 and 3.10
Added file: https://bugs.python.org/file49421/typing_fail.py

___
Python tracker 

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