Commit bbbdeeb
committed
gh-89132: Fix subclassing of annotated types
__mro_entries__() of an annotated type now delegates to __mro_entries__()
of the annotated type itself if it is not a class, e.g. a generic alias.
Subclassing Annotated[X, ...] is now the same as subclassing X.1 parent 4ccb600 commit bbbdeeb
3 files changed
Lines changed: 42 additions & 1 deletion
File tree
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9943 | 9943 | | |
9944 | 9944 | | |
9945 | 9945 | | |
| 9946 | + | |
| 9947 | + | |
| 9948 | + | |
| 9949 | + | |
| 9950 | + | |
| 9951 | + | |
| 9952 | + | |
| 9953 | + | |
| 9954 | + | |
| 9955 | + | |
| 9956 | + | |
| 9957 | + | |
| 9958 | + | |
| 9959 | + | |
| 9960 | + | |
| 9961 | + | |
| 9962 | + | |
| 9963 | + | |
| 9964 | + | |
| 9965 | + | |
| 9966 | + | |
| 9967 | + | |
| 9968 | + | |
| 9969 | + | |
| 9970 | + | |
| 9971 | + | |
| 9972 | + | |
| 9973 | + | |
| 9974 | + | |
| 9975 | + | |
9946 | 9976 | | |
9947 | 9977 | | |
9948 | 9978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2254 | 2254 | | |
2255 | 2255 | | |
2256 | 2256 | | |
2257 | | - | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2258 | 2265 | | |
2259 | 2266 | | |
2260 | 2267 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments