-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-92308: Add Pending Removal section to 3.11 What's New #92309
Conversation
This is mostly adaptions from the 3.10 What's New, Deprecated section. I kept the attributions. |
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.
Wording suggestions, mainly on consistency (scheduled vs slated, I think scheduled is more immediately clear in meaning).
A broader point -- it might be more useful to re-group by module? So for importlib
, group everything together, re-alphabetise the list, and then concatenate the issue and attribution links.
I think that would be more useful to the reader.
A
Would it make sense to group them by release, e.g.: Python 3.12
Python 3.13
TBD
This will also make it easier for the next version (unless we automate it in the meanwhile). |
@ezio-melotti, I like that approach. If we can do without the attributions (?), it will make for a very compact list. |
I made PR erlend-aasland#30 to update this: Add "What’s New In Python 3.10 > C API Changes > Deprecated" to "What’s New In Python 3.11 > C API Changes > Pending Removal > Python 3.12" https://docs.python.org/3.11/whatsnew/3.10.html#id3 No such section in:
(But I didn't check for deprecations mixed in the other sections.) |
Yes, looks good: users can easily prioritise what changes they need to make. I think we could skip attributions because credit was already given when added in the first place? |
That was my thought as well. Please see recent commit. If this looks ok, I think pending removals for 3.12 is covered. I'll start looking for other stuff. Please shout out if I forget something (I likely will). |
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.
::
starts a code block (default Python), you just need a single colon here.
A
The new format reads much better, thanks. A |
I think we got most stuff covered; we can expand this section later (IIRC, the docs are built and pushed out once a day). I'm inclined to marking this as ready for review and trying to land it. |
Thanks for helping! |
Maybe it's better keeping it in the C API section? That's where new features and removed C API things go too: https://docs.python.org/3.11/whatsnew/3.10.html#c-api-changes Let's also ask @vstinner :) |
That was part of removing the attributions I thought though, allowing re-sorting the list by module and not by tracker issue. What would be the best remedy here? We could add the issue number per item (lots of duplication), break back to per-issue grouping (loose the nice sorting), perhaps add footnotes per-issue (break of source text and information link)? A |
Ah, by attribution, I thought the "(Contributed by Hugo van Kemenade in bpo-47022.)" bit.
I think this, sorting isn't so important, and we're grouping them by version number anyway. |
This "numeric literals followed by keyword" deprecation doesn't have a removal version, so would belong in a TDB/future section: https://docs.python.org/3/whatsnew/3.10.html#deprecated How would we put that in the compact list? |
By the compact list I'm assuming you mean the format as currently proposed by this PR. (Please correct me if you're not!) I would suggest the final section after the version-specific sections would be entitled "Pending Removal" or some similarly generic title, and the lead would say something along the lines of: "The following APIs were deprecated in earlier Python versions and will be removed, although there is currently no date scheduled for their removal." A |
Yes, this list of mostly method/function/constant names.
Not so much about the lead, but about the content of the bullet point which can't really be distilled to a single name. I guess it could just be included more-or-less as is? (This bit of course doesn't need to be part of this PR for the first beta, we can add it later :) |
Ahh, yes I understand. I'd suggest that pragmatism dictates simplifying to a single name where possible, and where there are language or syntax changes (such as this), we include a short prose explanation and a link if appropriate. The text as written seems reasonable to copy verbatim, following this framework. A |
The "short" name could be "numeric literals immediately followed by a keyword", and then you can expand on it:
We could also try to enforce a target release for removal, even if it ends up being postponed. This will also make it easier to track deprecations. I also (half-jokingly) suggested to deprecate the In the meanwhile, a TBD/Future section works. |
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 created erlend-aasland#31 as a suggestion to add this future pending removal.
Whether we include it now or later, I think this PR as it stands is good to merge so we can get it in today's beta :)
It would be nice if every entry had a link, so the user can find out more about what/why something is deprecated, but it's not a blocker.
Thanks!
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.
While they are many ways to document these pending removals. I'm also fine with current list with just give names and nothing else. It's easy to name, easy to maintain.
If you click on a function, you can find the deprecation note there and usually you get a suggestion to replace the deprecated function. For example, importlib.find_loader() suggests using importlib.util.find_spec() instead.
I just suggest to move the C API list in the C API Changes section (near the end of the document).
* ``sqlite3.OptimizedUnicode`` | ||
* ``sqlite3.enable_shared_cache`` | ||
|
||
C API: |
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.
Around Python 3.9, I moved Build Changes and C API changes at the end of the document since most users never write any line of C API. I suggest you to move this list inside the C API Changes section: add a new " Pending Removal in Python 3.12" section there.
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.
If you click on a function, you can find the deprecation note there and usually you get a suggestion to replace the deprecated function. For example, importlib.find_loader() suggests using importlib.util.find_spec() instead.
Yeah; typically, I'd think if a user actually uses a function, they'd want more details anyway, and if functions don't have clear guidance on why they are deprecated and what to replace them with (or not), then it can be added there.
I'll follow up the comments on this PR over the weekend; if any one would like to land this earlier, please create a new PR (or just take over this PR) 🙂 |
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be put in the comfy chair! |
Co-authored-by: Victor Stinner <[email protected]>
Thanks @erlend-aasland for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-92444 is a backport of this pull request to the 3.11 branch. |
…nGH-92309) * pythongh-92308: Add Pending Removal section to 3.11 What's New * Use compact list; drop attributions * Add short text, and also missing PyUnicode_InternImmortal * Fix formatting * markup fix * Update Doc/whatsnew/3.11.rst Co-authored-by: Victor Stinner <[email protected]> * Apply suggestions from code review Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Ezio Melotti <[email protected]> (cherry picked from commit 0924b95) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
* gh-92308: Add Pending Removal section to 3.11 What's New * Use compact list; drop attributions * Add short text, and also missing PyUnicode_InternImmortal * Fix formatting * markup fix * Update Doc/whatsnew/3.11.rst Co-authored-by: Victor Stinner <[email protected]> * Apply suggestions from code review Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Ezio Melotti <[email protected]> (cherry picked from commit 0924b95) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Resolves gh-92308