[issue34700] typing.get_type_hints doesn't know about typeshed

2019-05-20 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the Sphinx use case is somewhat different from the originally envisioned use case for get_type_hints(). Possibly Sphinx could just directly inspect __annotations__ rather than calling get_type_hints()? I'm not sure if there's any situation where

[issue34700] typing.get_type_hints doesn't know about typeshed

2019-05-17 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-27 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- assignee: -> levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-24 Thread Ben Darnell
Ben Darnell added the comment: Yeah, I think that would work at least for the sphinx use case. It seems like a strange partially-degraded mode and anything that needs structured access to the annotation would still need typeshed, but just getting the string would probably be enough for a

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think there is also a fourth option: add a flag to `get_type_hints()` that will guard evaluation of forward references, as proposed in https://github.com/python/typing/issues/508. If the evaluation of a "forward reference" raises an error, then we keep

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-15 Thread Ben Darnell
New submission from Ben Darnell : Currently, most type annotations for the standard library are provided in typeshed rather than in the library itself. Not all consumers of type annotations are aware of typeshed, and this can cause problems. Specifically, Sphinx 1.8 accesses type hints via