Skip to content

gh-91873: Summarise deprecations in typing at the top level #91864

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

Merged
merged 4 commits into from
Apr 29, 2022

Conversation

Fidget-Spinner
Copy link
Member

The rationale behind this is that certain deprecations may cause major disruptions in Python's ecosystem. It's better to give an obvious heads up rather than hide those deprecations behind walls of text.

@Fidget-Spinner Fidget-Spinner changed the title Summarise deprecations in typing at the top level gh-91873: Summarise deprecations in typing at the top level Apr 24, 2022
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

I really like the idea of summarising all these deprecations in one place, I think that's really useful. I'm not so keen on having a large section right at the top, however — I feel like the focus of this document should be the current typing API, rather than changes to the typing API that have been made in recent versions.

As an alternative, maybe we could add this new section towards the bottom, and add a short note right at the top linking to the new section? That way we still get a summary of deprecations, and the deprecations are noted prominently, but we don't take up so much vertical space before we start discussing the typing module as it currently exists.

@Fidget-Spinner
Copy link
Member Author

I feel like the focus of this document should be the current typing API, rather than changes to the typing API that have been made in recent versions.

I'm not sure I catch your drift here. Could you give an example of what you mean please?

I agree with the rest of your comment.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 😀


I'm not sure I catch your drift here. Could you give an example of what you mean please?

Sorry for being unclear! I was basically just trying to say that we should structure the typing docs along the lines of

[THIS] is how to do things in 2022. We used to do things like [THIS] in 2021, but things have changed now.

rather than

We used to do things like [THIS] in 2021, but things have changed now. [THIS] is how we do things in 2022.

So, basically just the same thing as I was saying in the rest of my comment :)

@Fidget-Spinner Fidget-Spinner merged commit 64113a4 into python:main Apr 29, 2022
@Fidget-Spinner Fidget-Spinner deleted the deprecate_summary_typing branch April 29, 2022 04:22
@Fidget-Spinner
Copy link
Member Author

Thanks for the review @AlexWaygood

@AlexWaygood
Copy link
Member

AlexWaygood commented May 3, 2022

Do you think it would it be useful to backport this? typing.io and typing.re are scheduled for removal in 3.12, which isn't that far away.

hauntsaninja pushed a commit to hauntsaninja/peps that referenced this pull request May 6, 2022
A definite timeline contradicts the CPython documentation, e.g. see
python/cpython#91864

Removal will break pretty much all code written to support Python 3.8
and earlier that uses type hints. I'm not sure the one year between 3.8
going EOL and the removal date mentioned here is enough to expect all
libraries with type hints to update.

Note that the goal here isn't to decide on a removal date (or perhaps,
to decide to keep them around forever), but just to reduce fear for
Python users and to stay consistent with CPython docs.
hauntsaninja added a commit to hauntsaninja/peps that referenced this pull request May 6, 2022
A definite timeline contradicts the CPython documentation, e.g. see
python/cpython#91864

Removal will break pretty much all code written to support Python 3.8
and earlier that uses type hints. I'm not sure the one year between 3.8
going EOL and the removal date mentioned here is enough to expect all
libraries with type hints to update.

Note that the goal here isn't to decide on a removal date (or perhaps,
to decide to keep them around forever), but just to reduce fear for
Python users and to stay consistent with CPython docs.
@Fidget-Spinner
Copy link
Member Author

Sorry I missed your message Alex. I would like to backport this but I don't think it counts as a bugfix. Anyways hopefully when 3.11 comes out, the online docs will default to the 3.11 version and everyone Googling things will read that.

@AlexWaygood
Copy link
Member

Makes sense :)

Sorry I missed your message Alex. I would like to backport this but I don't think it counts as a bugfix. Anyways hopefully when 3.11 comes out, the online docs will default to the 3.11 version and everyone Googling things will read that.

All makes sense :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants