New submission from Komiya Takeshi :
I found `typing.get_type_hints()` raises TypeError for a variable annotated by
`dataclasses.InitVar` when lazy annotations evaluation-feature is enabled
(a.k.a `__future__.annotations`).
```
$ cat test.py
from __future__ import annotations
from
Komiya Takeshi added the comment:
FWIW, I succeeded to inspect the class with importing the constant from the
base module as a workaround:
```
import inspect
import io
from io import DEFAULT_BUFFER_SIZE
class MyBufferedReader(io.BufferedReader):
"""buff
New submission from Komiya Takeshi :
inspect.signature() raises RuntimeError on failed to resolve the default
argument value. For example, it fails to inspect a subclass of
io.BufferedReader:
Example:
```
import inspect
import io
class MyBufferedReader(io.BufferedReader):
"&qu
Komiya Takeshi added the comment:
Wow, I don't know that behavior. Thank you for your wisdom!
--
___
Python tracker
<https://bugs.python.org/issue42288>
___
___
New submission from Komiya Takeshi :
I noticed `typing.get_type_hints()` returns Optional[Any] as a type hints if
the default value of the argument is None:
```
$ python
Python 3.9.0 (default, Oct 24 2020, 15:41:29)
[Clang 11.0.3 (clang-1103.0.32.59)] on darwin
Type "help",