Fix most tests on Python 3.13 - #378
Conversation
| @skipIf( | ||
| sys.version_info[:5] == (3, 13, 0, "beta", 1), | ||
| "incorrectly raises TypeError in the first 3.13 beta" | ||
| ) |
|
The pickle thing is weird; I can reproduce it on CPython when I comment out the |
That is weird. I guess I'll skip the test over here for now. |
|
Found it: The good news is that I think python/cpython#118897 fixes this. (Nikita just commented as much.) |
|
Alright, so just one failing test left now: ======================================================================
FAIL: test_async_contextmanager (test_typing_extensions.OtherABCTests.test_async_contextmanager)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/typing_extensions/typing_extensions/src/test_typing_extensions.py", line 1652, in test_async_contextmanager
self.assertEqual(typing_extensions.AsyncContextManager[int].__args__, (int,))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (<class 'int'>, bool | None) != (<class 'int'>,)
First tuple contains 1 additional elements.
First extra element 1:
bool | None
- (<class 'int'>, bool | None)
+ (<class 'int'>,)The principled way of fixing that is to make |
|
Let's merge this now to fix a number of the tests; we can fix the rest separately. |
|
Thanks for fixing these! Currently, the |
If we cut a new release right now, it would break pydantic, which would be very bad (#381) -- we've broken pydantic before, and the experience was extremely chaotic for us, we definitely don't want to do it again 🙃 I've opened a PR to fix pydantic's tests with the |
|
Great! I'm watching pydantic/pydantic#9426 and keeping an eye out for new releases of |
|
typing_extensions 4.12.0rc1 is now out @erlend-aasland! :D https://pypi.org/project/typing-extensions/4.12.0rc1/ |

Helps with #377. Lots of changes to reflect changes in the PEP-696 implementation that were made upstream but had yet to be backported here.
There's still a couple of failing tests on Python 3.13 even with this PR, but this gets us a lot closer to a clean bill of health.