Ken Jin <kenjin4...@gmail.com> added the comment:

Hello, this issue is a byproduct of issue42195. It has already been fixed on 
Python 3.10, and on Python 3.9.2 (which isn't out yet). You can see the what's 
new for it here 
https://docs.python.org/3/whatsnew/3.9.html#notable-changes-in-python-3-9-2.

The expected release date for Python 3.9.2 is Monday, 2021-02-15 according to 
PEP 596 https://www.python.org/dev/peps/pep-0596/.

For now, I guess you'll have to use the old typing.Callable, then update it in 
newer versions of Python.

On Python 3.10a4:
>>> from typing import Optional
>>> from collections.abc import Callable
>>> Optional[Callable[[bytes], bytes]]
typing.Optional[collections.abc.Callable[[bytes], bytes]]

----------
nosy: +kj

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to