-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Remove typing.io and typing.re #92871
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
Comments
Cc @gvanrossum and @JelleZijlstra as resident typing experts. |
PR: #92873 (didn't get linked automatically?) |
@srittau Bedevere the bot has this feature disabled for a while. python/bedevere#430 will enable it back after merging (i believe it's on feedback gathering stage). |
Interestingly, importing from |
…nGH-98958) (cherry picked from commit 65d1407) Co-authored-by: Sebastian Rittau <[email protected]>
(cherry picked from commit 65d1407) Co-authored-by: Sebastian Rittau <[email protected]>
…8958) (#98986) [3.10] gh-92871: Postpone the removal of typing.{io,re} to 3.13 (GH-98958). (cherry picked from commit 65d1407) Co-authored-by: Sebastian Rittau <[email protected]> Co-authored-by: Sebastian Rittau <[email protected]>
### What changes were proposed in this pull request? Use `typing.BinaryIO` instead of `typing.io.BinaryIO`. The latter is deprecated and had questionable type checker support, see python/cpython#92871 ### Why are the changes needed? So Spark is unaffected when `typing.io` is removed in Python 3.13 ### Does this PR introduce any user-facing change? No ### How was this patch tested? Existing unit tests / every import of this module Closes #41084 from hauntsaninja/patch-1. Authored-by: Shantanu <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
### What changes were proposed in this pull request? Use `typing.BinaryIO` instead of `typing.io.BinaryIO`. The latter is deprecated and had questionable type checker support, see python/cpython#92871 ### Why are the changes needed? So Spark is unaffected when `typing.io` is removed in Python 3.13 ### Does this PR introduce any user-facing change? No ### How was this patch tested? Existing unit tests / every import of this module Closes apache#41084 from hauntsaninja/patch-1. Authored-by: Shantanu <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
In python 3.13, `typing.re` was removed (deprecated since Python 3.8). See python/cpython#92871 This pr refactors to support python 3.13 which currently throws ```python ImportError: cannot import name 're' from 'typing' ```
Deprecated since python 3.8 (2019 october), removed in python 3.13 (2024 october) python/cpython#92871
As discussed in #82472 and mentioned in the documentation, the
typing.io
andtyping.re
submodules are scheduled for removal in Python 3.12. They've been deprecated since Python 3.8.I'm preparing a PR.
(Side note: There doesn't seem to be a matching issue template for this kind of issue.)
The text was updated successfully, but these errors were encountered: