This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients BTaskaya, barry, brett.cannon, eric.smith, gvanrossum, levkivskyi, lukasz.langa, vstinner
Date 2020-05-26.20:45:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> The second problem is `inspect.signature`. If we don't resolve annotations there and continue it is definitely going to break some code.

Would you mind to elaborate why would it break some code? Consumers of annotations should already be prepared to get directly types or strings, no?

> If we resolve, that would mean that annotations must able to point something real (and this might not be the real case if the user uses a string annotation etc.) and will break code. (both tried and both breaks different modules on the stdlib tests)

I expect that resolving has an impact on performance, whereas the caller may not use annotations at all but only cares of the number of parameters or their name.

It would be resonable to not resolve annotations in signature() by default. If someone cares, maybe a new parameter can be added to resolve annotations?
Date User Action Args
2020-05-26 20:45:55vstinnersetrecipients: + vstinner, gvanrossum, barry, brett.cannon, eric.smith, lukasz.langa, levkivskyi, BTaskaya
2020-05-26 20:45:55vstinnersetmessageid: <>
2020-05-26 20:45:55vstinnerlinkissue38605 messages
2020-05-26 20:45:55vstinnercreate