| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| try: | ||
| __annotations__[1] = 2 | ||
| except NameError: | ||
| pass # 3.14+ |
There was a problem hiding this comment.
Maybe add an assert system.version >= (3, 14) inside the except block?
Sorry, something went wrong.
| if "__annotations__" in ns: | ||
| own_annotations = ns["__annotations__"] | ||
| elif "__annotate__" in ns: | ||
| # TODO: Use inspect.VALUE here, and make the annotations lazily evaluated | ||
| own_annotations = ns["__annotate__"](1) | ||
| else: | ||
| own_annotations = {} |
There was a problem hiding this comment.
You mentioned in python/cpython#119361 (comment) that you'd be adding a helper function for this kind of thing at some point -- would it be worth waiting for that, since the first 3.14 alpha is some way off?
I can also see the advantages of getting typing_extensions working with your branch, though, so that you can start testing with the rest of the ecosystem that depends on typing_extensions. So I definitely don't want to block you merging this.
Sorry, something went wrong.
There was a problem hiding this comment.
I do expect we'll need more changes later, but it's helpful to get this merged so I can test the rest of the ecosystem too.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Tests now pass with python/cpython#119361.