py3.10-prep: Fix parser.py for changed typing module
The typing module has subtle changes that are not even
documented: Typing types now have a __name__ attribute.
That confused the parser of the pyi generator because
suddenly stingizing
Callable[..., Optional[str]]
resulted in
Callable[..., Optional]
because of special rules that return the generic name
of a typing type, which was very unexpected. Finding this bug
took a lot of debugging of the recursive `_resolve_type`
function.
(cherry picked from commit
2530cb3f165ac02b8f7132e3f5ab4f7f6896dbd9)
Gbp-Pq: Name py3.10-prep-Fix-parser.py-for-changed-typing-module.patch