Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-38291: Remove mention of typing.io and typing.re again#26113

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvanrossum merged 3 commits intopython:mainfromsrittau:remove-typing-io-re
Jun 14, 2021

Conversation

srittau
Copy link
Contributor

@srittausrittau commentedMay 13, 2021
edited by bedevere-bot
Loading

They were originally removed inGH-10173 perbpo-35089, but then
readded inGH-21574. Cf.bpo-38291 for decision to remove. This PR
only partly addresses this bug, as the modules should be deprecated as
well (as they were never properly supported.)

https://bugs.python.org/issue38291

They were originally removed inpythonGH-10173 per bpo-35089, but thenreadded inpythonGH-21574. Cf. bpo-38291 for decision to remove.
@JelleZijlstra
Copy link
Member

Wouldn't it be better to say these namespaces are deprecated? The feature was promised in PEP 484 and previously mentioned in the typing docs, so we can't just hide it completely.

Here's a possible proposal:

  • In the docs for 3.10 and earlier versions, say something like "This feature was never properly supported by most type checkers and will be deprecated in the future"
  • In 3.11 (main), edit typing.py to emit DeprecationWarning in__getattr__ for the io and re pseudo-modules. (I think they're actually implemented as classes.) In the docs, say that they are deprecated.
  • In 3.12 or 3.13, remove them.

@srittau
Copy link
ContributorAuthor

Sounds good. I will modify this text tomorrow to a deprecation notice.

Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Maybe the docs should actually list these as deprecated? (That would presumably be a "deprecated" note for the entire typing module.)

@Fidget-Spinner
Copy link
Member

Wouldn't it be better to say these namespaces are deprecated? The feature was promised in PEP 484 and previously mentioned in the typing docs, so we can't just hide it completely.

Here's a possible proposal:

  • In the docs for 3.10 and earlier versions, say something like "This feature was never properly supported by most type checkers and will be deprecated in the future"
  • In 3.11 (main), edit typing.py to emit DeprecationWarning in__getattr__ for the io and re pseudo-modules. (I think they're actually implemented as classes.) In the docs, say that they are deprecated.
  • In 3.12 or 3.13, remove them.

+1 to this proposal and for removing them in 3.13 (3.12 might be too early since thats only 1 version of warnings).

@srittau
Copy link
ContributorAuthor

I have now added a deprecation notice instead of removing mentioning them completely. I marked them as deprecated as of 3.8 (since that was the version where they were removed first from the docs according to the NEWS entry). I also used a removal version of 3.12 for now. Since they were never supported, I'd be surprised if removing them has much of an impact. Also, the fix is very easy and works with all typing versions.

@JelleZijlstra
Copy link
Member

Looks like you may not have pushed your changes.

@srittau
Copy link
ContributorAuthor

Looks like you may not have pushed your changes.

Oops. Done now.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelJun 14, 2021
Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I feel this needs a NEWS entry. If you add one I will merge it. I'll also mark it for backporting.

@gvanrossumgvanrossum added needs backport to 3.9only security fixes needs backport to 3.10only security fixes labelsJun 14, 2021
@srittau
Copy link
ContributorAuthor

@gvanrossum Done.

@gvanrossumgvanrossum merged commit8a76683 intopython:mainJun 14, 2021
@miss-islington
Copy link
Contributor

Thanks@srittau for the PR, and@gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 14, 2021
…26113)They were originally removed inpythonGH-10173 per bpo-35089, but thenreadded inpythonGH-21574. Cf. bpo-38291 for decision to remove.(cherry picked from commit8a76683)Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@bedevere-bot
Copy link

GH-26720 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelJun 14, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 14, 2021
…26113)They were originally removed inpythonGH-10173 per bpo-35089, but thenreadded inpythonGH-21574. Cf. bpo-38291 for decision to remove.(cherry picked from commit8a76683)Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@bedevere-bot
Copy link

GH-26721 is a backport of this pull request to the3.9 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.9only security fixes labelJun 14, 2021
miss-islington added a commit that referenced this pull requestJun 14, 2021
They were originally removed inGH-10173 perbpo-35089, but thenreadded inGH-21574. Cf.bpo-38291 for decision to remove.(cherry picked from commit8a76683)Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
miss-islington added a commit that referenced this pull requestJun 14, 2021
They were originally removed inGH-10173 perbpo-35089, but thenreadded inGH-21574. Cf.bpo-38291 for decision to remove.(cherry picked from commit8a76683)Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@srittausrittau deleted the remove-typing-io-re branchJune 14, 2021 15:18
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull requestJun 19, 2021
…26113)They were originally removed inpythonGH-10173 per bpo-35089, but thenreadded inpythonGH-21574. Cf. bpo-38291 for decision to remove.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gvanrossumgvanrossumgvanrossum approved these changes

@ilevkivskyiilevkivskyiAwaiting requested review from ilevkivskyi

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirstaleStale PR or inactive for long period of time.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@srittau@JelleZijlstra@Fidget-Spinner@miss-islington@bedevere-bot@gvanrossum@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp