-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Future] Python 3.13 conformance #387
Comments
Wonderful! Thanks so much both for the rapid heads-up and your one-line resolutions. Ordinarily, I'd play Japanese video games instead of doing anything until October – at which point CPython 3.13 would release, everything in @beartype would break, users would loudly protest while rioting on our issue tracker, and Microsoft would raise its giant fist in wrathful vengeance. You'd think I'd learn. However, I note this is related to a draft implementation of PEP 649 – which you're diligently spear-heading. Wonderful! Simply wonderful. PEP 649 is the glorious future the runtime community has been half-heartedly waiting for all these years. In This Case...Allow me to actually do something. I'll immediately re-prioritize Python 3.13 conformance for our upcoming @beartype 0.19.0 release – slated for release in a week or so. My immediate immediate priority is issue #382, because it turns out @beartype and Directly after, I'll happily tackle this. Should take a day or so. Maybe? Everything looks trivial, thankfully – just a bit tedious, which is usually the case on CPython bumps. Thanks again! And thanks for tackling PEP 649 head-on. Lotsa fun stuff happening. Emoji cat smiles contentedly. 😸 |
This commit is the next in a commit chain officially supporting the upcoming release of Python 3.13, en-route to resolving future issue #387 kindly submitted by core Python `typing` mega-boss @JelleZijlstra (Jelle Zijlstra). Specifically, this commit generalizes internal introspection of standard type hint factories to note that the following factories now conditionally accept a second optional child type hint under Python ≥ 3.13, due to PEP 696 (i.e., "Type Defaults for Type Parameters"): * `contextlib.AsyncContextManager[...]`. * `contextlib.ContextManager[...]`. * `typing.AsyncContextManager[...]`. * `typing.ContextManager[...]`. Let's do this, `typing` bois! (*Final vanquishment of a languishing vanguard!*)
This commit is the next in a commit chain officially supporting the upcoming release of Python 3.13, en-route to resolving future issue #387 kindly submitted by core Python `typing` mega-boss @JelleZijlstra (Jelle Zijlstra). Specifically, this commit resolves *all* remaining compatibility issues with respect to Python 3.13 – except for static type-checking under `mypy` and `pyright`, which remains an open (but largely boring) question. For all intents and purposes, @beartype now officially supports Python 3.13! *Wohoooo.* (*Fully syntactic synapses snap sinfully!*)
Effectively resolved by c8c4f05. All tests now pass under Python 3.13.0 beta 1 – except possibly static type-checking integration tests with For all intents and purposes, @beartype now officially supports Python 3.13. The @beartype Oh, And......thanks so much for those one-line solutions! They truly were a tremendous help. Unsurprisingly, you were right about everything. I just did everything you said. This is a teaching moment. Would you mind if I ping you for similar advice next year when the inevitable Python 3.14.0 beta drops? please say yes please say yes 🙏 |
Thank you! Yes, happy to help with future changes needed for conformance with 3.14. |
Excellent. That's wonderful. You are the wise CPython sage. I'll humbly defer to your wisdom in a year... if I even remember having this discussion in a year. Unreadable post-it note on my monitor, don't fail me now! Oh – and I've confirmed happiness from the latest stable releases of both mypy and |
Several tests fail when I run
pytest
in the beartype repo on Python 3.13 beta 1, which was recently released. (For context, the final release of Python 3.13 is due in October.)FAILED beartype_test/a00_unit/a00_core/test_a90_typing.py::test_api_typing - AssertionError: assert {'AsyncContex...'is_protocol'} == set()
FAILED beartype_test/a00_unit/a10_data/hint/pep/sign/test_datapepsignset.py::test_hint_signs_origin_isinstanceable_args - AssertionError: "typing.ContextManager" accepts 2 arguments, but expected to accept 1 arguments.
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_typehint_die_if_unbearable - beartype.roar.BeartypeDoorException: <class 'beartype.door._cls.doorsub._TypeHintOriginIsinstanceableArgs1'> type must have 1 argument(s), but got 2.
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_typehint_is_bearable - beartype.roar.BeartypeDoorException: <class 'beartype.door._cls.doorsub._TypeHintOriginIsinstanceableArgs1'> type must have 1 argument(s), but got 2.
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/test_decorpep673.py::test_decor_pep673 - TypeError: update() argument must be dict or another FrameLocalsProxy
FAILED beartype_test/a00_unit/a70_decor/test_decortype.py::test_decor_type_descriptor_builtin - AssertionError: assert False
FAILED beartype_test/a90_func/pep/test_pep561_static.py::test_pep561_pyright - subprocess.CalledProcessError: Command '('pyright', '--pythonversion', '3.13', 'beartype')' returned non-zero exit status 1.
The text was updated successfully, but these errors were encountered: