-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
gh-91873: Summarise deprecations in typing at the top level #91864
Conversation
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 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.
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. |
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.
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 :)
Thanks for the review @AlexWaygood |
Do you think it would it be useful to backport this? |
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.
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.
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. |
Makes sense :)
All makes sense :) |
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.