Bug report
Bug description:
PEP 696 allows the default of a type-parameter to depend on other type parameters, however, this substitution is not applied at runtime:
class Bar[T, S=T]: ...
print(Bar[int]) # __main__.Bar[int, T]
The result should be __main__.Bar[int, int]1
This is likely the root cause for #140596. Tested with 3.13.8, 3.14.0 and 3.15.0a1+
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux