You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/ambv'closed_at=<Date2018-03-14.23:34:12.078>created_at=<Date2017-12-05.21:24:12.510>labels= ['3.7', 'type-feature', 'library']
title='singledispatch support for type annotations'updated_at=<Date2018-03-14.23:34:12.077>user='https://github.com/ambv'
The previous API is still available for backwards compatibility, as well as stacking, and use with classes (sic, I was surprised to learn it's used that way, too).
The patch should be uncontroversial, maybe except for the fact that it's importing the typing module if annotations are used. This is necessary because of forward references, usage of None as a type, and so on. More importantly, with PEP-563 it's mandatory.
this creates a circular dependency functools <-> typing
Well, it doesn't since I explicitly import typing inside singledispatch. By the time this import happens, functools is fully imported. This would only be a problem if functools itself tried to use singledispatch with annotations. Not impossible but super unlikely.