Skip to content
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

Remove typing.io and typing.re #92871

Closed
srittau opened this issue May 17, 2022 · 4 comments
Closed

Remove typing.io and typing.re #92871

srittau opened this issue May 17, 2022 · 4 comments
Labels
3.12 bugs and security fixes topic-typing type-feature A feature request or enhancement

Comments

@srittau
Copy link
Contributor

srittau commented May 17, 2022

As discussed in #82472 and mentioned in the documentation, the typing.io and typing.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.)

@srittau srittau added the type-feature A feature request or enhancement label May 17, 2022
@srittau
Copy link
Contributor Author

srittau commented May 17, 2022

Cc @gvanrossum and @JelleZijlstra as resident typing experts.

srittau added a commit to srittau/cpython that referenced this issue May 17, 2022
@srittau
Copy link
Contributor Author

srittau commented May 17, 2022

PR: #92873 (didn't get linked automatically?)

@arhadthedev
Copy link
Member

@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).

@srittau
Copy link
Contributor Author

srittau commented May 18, 2022

Interestingly, importing from typing.re or typing.io never worked at type check time. Since typeshed doesn't include those namespaces, when --ignore-missing-imports is used, any imports from those namespaces were silently assumed to by Any.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 2, 2022
…nGH-98958)

(cherry picked from commit 65d1407)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
miss-islington added a commit that referenced this issue Nov 2, 2022
(cherry picked from commit 65d1407)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
AlexWaygood pushed a commit that referenced this issue Nov 2, 2022
…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 <srittau@rittau.biz>

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
hauntsaninja added a commit to hauntsaninja/spark that referenced this issue May 7, 2023
HyukjinKwon pushed a commit to apache/spark that referenced this issue May 8, 2023
### 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 <12621235+hauntsaninja@users.noreply.github.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
LuciferYang pushed a commit to LuciferYang/spark that referenced this issue May 10, 2023
### 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 <12621235+hauntsaninja@users.noreply.github.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes topic-typing type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants