% ./python.exe
Python 3.14.0a0 (heads/main:e12a6780bb, May 22 2024, 13:54:40) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(x: y): pass
...
>>> f.__annotations__
{'x': 'y'}
This likely happens because the code is exec()'ed in a file that has the future import; exec() inherits the __future__ state from the file where it's called (a questionable feature but that's how it is).