New GitHub issue #119821 from JelleZijlstra:<br>
<hr>
<pre>
# Bug report
### Bug description:
This works:
```python
class customdict(dict):
def __missing__(self, key):
return key
code = compile("type Alias = undefined", "test", "exec")
ns = customdict()
exec(code, ns)
Alias = ns["Alias"]
assert Alias.__value__ == "undefined"
```
But this does not:
```python
code = compile("class A: type Alias = undefined", "test", "exec")
ns = customdict()
exec(code, ns)
Alias = ns["A"].Alias
assert Alias.__value__ == "undefined"
```
This is a problem for PEP 649 because we're going to rely on a non-dict globals namespace.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
macOS
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/119821">View on GitHub</a>
<p>Labels: type-bug, interpreter-core</p>
<p>Assignee: JelleZijlstra</p>