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 — gh-92308: Add Pending Removal section to 3.11 What's New by erlend-aasland · Pull Request #92309 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented May 4, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Resolves gh-92308

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
pythongh-92308: Add Pending Removal section to 3.11 What's New
11dbba7
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels May 4, 2022
@erlend-aasland

erlend-aasland commented May 4, 2022

Copy link
Copy Markdown
Contributor Author

This is mostly adaptions from the 3.10 What's New, Deprecated section. I kept the attributions.

All reactions

Sorry, something went wrong.

Uh oh!

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

AA-Turner
AA-Turner reviewed May 4, 2022
View reviewed changes

@AA-Turner AA-Turner left a comment •
edited
Loading

Uh oh!

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

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.

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

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji MSJemprededor reacted with rocket emoji
All reactions
  • 👍 1 reaction
  • 🚀 1 reaction
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@ezio-melotti

ezio-melotti commented May 4, 2022

Copy link
Copy Markdown
Member

Would it make sense to group them by release, e.g.:

Python 3.12

  • some func
  • some other func

Python 3.13

  • another func

TBD

  • yet another func

This will also make it easier for the next version (unless we automate it in the meanwhile).

AA-Turner, erlend-aasland, methane, and hugovk reacted with thumbs up emoji
All reactions
  • 👍 4 reactions

Sorry, something went wrong.

Uh oh!

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

@AlexWaygood AlexWaygood added the skip news label May 4, 2022
@erlend-aasland

erlend-aasland commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

@ezio-melotti, I like that approach. If we can do without the attributions (?), it will make for a very compact list.

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

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:

  • https://docs.python.org/3.11/whatsnew/3.9.html#changes-in-the-python-api
  • https://docs.python.org/3.11/whatsnew/3.8.html#changes-in-the-python-api
  • https://docs.python.org/3.11/whatsnew/3.7.html#changes-in-the-python-api
  • https://docs.python.org/3.11/whatsnew/3.7.html#changes-in-the-python-api

(But I didn't check for deprecations mixed in the other sections.)

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

@ezio-melotti, I like that approach. If we can do without the attributions (?), it will make for a very compact list.

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?

AA-Turner and erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
Use compact list; drop attributions
e325c15
@erlend-aasland

erlend-aasland commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

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).

AA-Turner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

erlend-aasland added 2 commits May 5, 2022 14:40
@erlend-aasland
Add short text, and also missing PyUnicode_InternImmortal
f8c2144
@erlend-aasland
Fix formatting
65cf56e
@erlend-aasland

erlend-aasland commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

@hugovk, thanks for that heads-up. Would f8c2144 work?

All reactions

Sorry, something went wrong.

Uh oh!

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

AA-Turner
AA-Turner requested changes May 5, 2022
View reviewed changes

@AA-Turner AA-Turner 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.

:: starts a code block (default Python), you just need a single colon here.

A

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels May 5, 2022
@erlend-aasland
markup fix
ed590cc
@AA-Turner

AA-Turner commented May 5, 2022

Copy link
Copy Markdown
Member

The new format reads much better, thanks.

A

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

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.

AA-Turner, hugovk, and MSJemprededor reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
erlend-aasland marked this pull request as ready for review May 5, 2022 13:04
@erlend-aasland
erlend-aasland requested review from brettcannon and ezio-melotti May 5, 2022 13:04
@erlend-aasland

erlend-aasland commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

The new format reads much better, thanks.

Thanks for helping!

MSJemprededor reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

AA-Turner
AA-Turner approved these changes May 5, 2022
View reviewed changes
@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

@hugovk, thanks for that heads-up. Would f8c2144 work?

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 :)

MSJemprededor reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

It's nice and compact but maybe too much info is missing: quite a few don't have links or further info (e.g. bpo links).

image

The extra info is important so users know what to replace with.

All reactions

Sorry, something went wrong.

Uh oh!

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

@AA-Turner

AA-Turner commented May 5, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

quite a few don't have links or further info (e.g. bpo links)

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

Ah, by attribution, I thought the "(Contributed by Hugo van Kemenade in bpo-47022.)" bit.

break back to per-issue grouping (loose the nice sorting)

I think this, sorting isn't so important, and we're grouping them by version number anyway.

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

This "numeric literals followed by keyword" deprecation doesn't have a removal version, so would belong in a TDB/future section:

image

https://docs.python.org/3/whatsnew/3.10.html#deprecated

How would we put that in the compact list?

All reactions

Sorry, something went wrong.

Uh oh!

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

@AA-Turner

AA-Turner commented May 5, 2022

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk

hugovk commented May 5, 2022

Copy link
Copy Markdown
Member

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!)

Yes, this list of mostly method/function/constant names.

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."

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 :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@AA-Turner

AA-Turner commented May 5, 2022

Copy link
Copy Markdown
Member

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?

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

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@ezio-melotti

ezio-melotti commented May 6, 2022

Copy link
Copy Markdown
Member

Not so much about the lead, but about the content of the bullet point which can't really be distilled to a single name.

The "short" name could be "numeric literals immediately followed by a keyword", and then you can expand on it:

Numeric literals immediately followed by a keyword. Currently Python accepts expressions like 0in x, 1or x, 0if 1else 2, or [0x1for x in y] (which is ambiguous because it can be interpreted as [0x1 for x in y] or [0x1f or x in y]). Starting in this release, a deprecation warning is raised if the numeric literal is immediately followed by and, or, in, is, if, else or for. In future releases it will be changed to syntax warning, and finally to syntax error.


This "numeric literals followed by keyword" deprecation doesn't have a removal version, so would belong in a TDB/future section:

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 deprecated directive in favor of deprecated-removed.

In the meanwhile, a TBD/Future section works.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ezio-melotti ezio-melotti mentioned this pull request May 6, 2022
Detect invalid role targets sphinx-contrib/sphinx-lint#28
Open
hugovk
hugovk approved these changes May 6, 2022
View reviewed changes

@hugovk hugovk 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 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!

Sorry, something went wrong.

Uh oh!

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

All reactions
vstinner
vstinner approved these changes May 6, 2022
View reviewed changes

@vstinner vstinner 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.

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).

Sorry, something went wrong.

Uh oh!

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

CAM-Gerlach reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/whatsnew/3.11.rst
* ``sqlite3.OptimizedUnicode``
* ``sqlite3.enable_shared_cache``

C API:

@vstinner vstinner May 6, 2022

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.

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.

Sorry, something went wrong.

Uh oh!

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

CAM-Gerlach reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@CAM-Gerlach CAM-Gerlach May 6, 2022

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.

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.

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 core review labels May 6, 2022
@erlend-aasland

erlend-aasland commented May 6, 2022

Copy link
Copy Markdown
Contributor Author

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) 🙂

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

ezio-melotti
ezio-melotti requested changes May 7, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label May 7, 2022
@bedevere-bot

bedevere-bot commented May 7, 2022

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

And if you don't make the requested changes, you will be put in the comfy chair!

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added the awaiting changes label May 7, 2022
@ezio-melotti @vstinner
Apply suggestions from code review
0d43d89
Co-authored-by: Victor Stinner <[email protected]>
ezio-melotti
ezio-melotti approved these changes May 7, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels May 7, 2022
@ezio-melotti
ezio-melotti merged commit 0924b95 into python:main May 7, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label May 7, 2022
@pablogsal pablogsal added the needs backport to 3.11 only security fixes label May 8, 2022
@miss-islington

miss-islington commented May 8, 2022

Copy link
Copy Markdown
Contributor

Thanks @erlend-aasland for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 8, 2022

Copy link
Copy Markdown

GH-92444 is a backport of this pull request to the 3.11 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.11 only security fixes label May 8, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2022
Erlend Egeberg Aasland @miss-islington
pythongh-92308: Add Pending Removal section to 3.11 What's New (pytho…
a27129a
…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]>
miss-islington added a commit that referenced this pull request May 8, 2022
@miss-islington Erlend Egeberg Aasland
gh-92308: Add Pending Removal section to 3.11 What's New (GH-92309)
565a5a3
* 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]>
@pablogsal pablogsal mentioned this pull request May 8, 2022
python 3.11 branch was force pushed ? #92478
Closed
@erlend-aasland
erlend-aasland deleted the pending-removal branch July 4, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@methane methane methane left review comments
@AA-Turner AA-Turner AA-Turner approved these changes
@CAM-Gerlach CAM-Gerlach CAM-Gerlach left review comments
@vstinner vstinner vstinner approved these changes
@hugovk hugovk hugovk approved these changes
@ezio-melotti ezio-melotti ezio-melotti approved these changes
@brettcannon brettcannon Awaiting requested review from brettcannon

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Better emphasise pending removals in What's New

Uh oh!

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

11 participants

@erlend-aasland @ezio-melotti @hugovk @AA-Turner @vstinner @bedevere-bot @miss-islington @methane @CAM-Gerlach @pablogsal @AlexWaygood
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.