GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-38291: Remove mention of typing.io and typing.re again by srittau · Pull Request #26113 · python/cpython

Conversation

@srittau

@srittau srittau commented May 13, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@srittau
Remove mention of typing.io and typing.re again
65757ba
They were originally removed in pythonGH-10173 per bpo-35089, but then
readded in pythonGH-21574. Cf. bpo-38291 for decision to remove.
@srittau
srittau requested review from gvanrossum and ilevkivskyi as code owners May 13, 2021 21:53
@bedevere-bot bedevere-bot added the awaiting review label May 13, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 13, 2021
@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label May 13, 2021
@JelleZijlstra

JelleZijlstra commented May 13, 2021

Copy link
Copy Markdown
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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@srittau

srittau commented May 13, 2021

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum
gvanrossum approved these changes May 13, 2021
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels May 13, 2021
@Fidget-Spinner

Fidget-Spinner commented May 13, 2021

Copy link
Copy Markdown
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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@srittau
Add deprecated notice about typing.{io,re}
d0ee637
@srittau

srittau commented May 14, 2021

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JelleZijlstra

JelleZijlstra commented May 14, 2021

Copy link
Copy Markdown
Member

Looks like you may not have pushed your changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@srittau

srittau commented May 14, 2021

Copy link
Copy Markdown
Contributor Author

Looks like you may not have pushed your changes.

Oops. Done now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Jun 14, 2021

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Jun 14, 2021
gvanrossum
gvanrossum reviewed Jun 14, 2021
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gvanrossum gvanrossum added needs backport to 3.9 labels Jun 14, 2021
@srittau
Add NEWS entry
824e178
@srittau

srittau commented Jun 14, 2021

Copy link
Copy Markdown
Contributor Author

@gvanrossum Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum
gvanrossum merged commit 8a76683 into python:main Jun 14, 2021
@miss-islington

miss-islington commented Jun 14, 2021

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Jun 14, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 14, 2021
@srittau @miss-islington
bpo-38291: Remove mention of typing.io and typing.re again (pythonGH-…
d2bfaa8
…26113)

They were originally removed in pythonGH-10173 per bpo-35089, but then
readded in pythonGH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683)

Co-authored-by: Sebastian Rittau <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 14, 2021

Copy link
Copy Markdown

GH-26720 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Jun 14, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 14, 2021
@srittau @miss-islington
bpo-38291: Remove mention of typing.io and typing.re again (pythonGH-…
5301eba
…26113)

They were originally removed in pythonGH-10173 per bpo-35089, but then
readded in pythonGH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683)

Co-authored-by: Sebastian Rittau <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 14, 2021

Copy link
Copy Markdown

GH-26721 is a backport of this pull request to the 3.9 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 label Jun 14, 2021
miss-islington added a commit that referenced this pull request Jun 14, 2021
@miss-islington @srittau
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
fc310cb
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683)

Co-authored-by: Sebastian Rittau <[email protected]>
miss-islington added a commit that referenced this pull request Jun 14, 2021
@miss-islington @srittau
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
7f02195
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683)

Co-authored-by: Sebastian Rittau <[email protected]>
@srittau
srittau deleted the remove-typing-io-re branch June 14, 2021 15:18
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull request Jun 19, 2021
@srittau @jdevries3133
bpo-38291: Remove mention of typing.io and typing.re again (pythonGH-…
6109bfa
…26113)

They were originally removed in pythonGH-10173 per bpo-35089, but then
readded in pythonGH-21574. Cf. bpo-38291 for decision to remove.
@pablogsal pablogsal mentioned this pull request Jul 18, 2021
[3.10] Correct the order of regen-abidump #27228
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum gvanrossum approved these changes
@ilevkivskyi ilevkivskyi Awaiting requested review from ilevkivskyi

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@srittau @JelleZijlstra @Fidget-Spinner @miss-islington @bedevere-bot @gvanrossum @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.