Skip to content
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-92611: Link to section for PEP 594 modules; mention rm version & alternatives #92612

Merged
merged 1 commit into from May 13, 2022

Conversation

CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented May 10, 2022

As discussed in #92611 , currently the experience is pretty subpar for users trying to get even basic information about the deprecations from PEP 594 in the relevant modules' docs. To improve this and increase the visibility of the pending removal, this PR

  • Links directly to each module's section in the PEP (so users can easily access the relevant information)
  • For those with direct replacements with other stdlib modules, directly internal-links such as well (so users don't have to click through to the PEPs and then back to the docs first, which also won't preserve the version and translation they are on)
  • Uses the proper deprecated-removed to clearly indicate to users that a removal version is planned and what it is, so they can prepare accordingly or voice any unanticipated impacts (as discussed in #92564) Deferred to a 3.11+ PR for now.
  • Add additional replacement information for functions in the cgi module, per requests Deferred to a 3.11+ PR

Also, despite having been deprecated for many versions without any mention of imminent removal, the imp module is due to be removed in Python 3.12, but no indication of that is given in the documentation, which this also resolves.

Fixes #92611

@CAM-Gerlach CAM-Gerlach requested review from ethanfurman and as code owners May 10, 2022
@bedevere-bot bedevere-bot added docs awaiting review labels May 10, 2022
@CAM-Gerlach CAM-Gerlach changed the title gh-92600: Link to section for PEP 594 modules; mention rm version & alternatives gh-92611: Link to section for PEP 594 modules; mention rm version & alternatives May 10, 2022
@CAM-Gerlach CAM-Gerlach force-pushed the pep-594-link-subsections branch from 7614253 to 6893011 Compare May 10, 2022
@CAM-Gerlach CAM-Gerlach requested review from tiran and brettcannon May 10, 2022
@hugovk
Copy link
Member

@hugovk hugovk commented May 10, 2022

.. deprecated:: 3.11 was intentional. From #31891 (comment):

[...] the SC wanted to leave out target removal versions in the docs in case we have to change something due to feedback (in the code itself via the warnings.warn call still makes sense).

Edit: let's discuss in #92564, see #92564 (comment).

@CAM-Gerlach
Copy link
Member Author

@CAM-Gerlach CAM-Gerlach commented May 10, 2022

Edit: let's discuss in #92564, see #92564 (comment).

(Already replied to you over there)

Doc/library/crypt.rst Outdated Show resolved Hide resolved
@CAM-Gerlach
Copy link
Member Author

@CAM-Gerlach CAM-Gerlach commented May 12, 2022

@brettcannon Per your helpful advice on the Discourse thread, I've added individual deprecation notices to the cgi utility functions discussed in the PEP, with information on replacements for each, and a similar note up top for FieldStorage.

I can bring the broader issue up with the Docs WG Editorial Board, but in order to allow backporting of the initial fix described in the issue and on the thread, with the link not pointing to the correct section of the PEP for each deprecation and resulting in increased user confusion and traffic asking about a replacement (or expressing concern about the apparent lack thereof), I can drop commit 76f04e1 adding deprecated-removed (specifically structured as such in case that became necessary) and that can be applied just to 3.11+ as an immediate followup PR.

However, one question remains—should the additional explanations mentioned above and added in c937d01 also be backported (if so, I would modify them to remove the removal version for this PR), or left 3.11+ only as well? Let me know, and I'll either move both commits to another branch for a followup 3.11+ only PR, or just drop/move 76f04e1 and edit c937d01 to not use deprecated-removed.

@CAM-Gerlach CAM-Gerlach force-pushed the pep-594-link-subsections branch 2 times, most recently from c937d01 to faf067a Compare May 12, 2022
@CAM-Gerlach CAM-Gerlach requested review from brettcannon May 12, 2022
@CAM-Gerlach CAM-Gerlach force-pushed the pep-594-link-subsections branch from c99a4b0 to 2342f43 Compare May 12, 2022
@CAM-Gerlach
Copy link
Member Author

@CAM-Gerlach CAM-Gerlach commented May 12, 2022

However, one question remains—should the additional explanations mentioned above and added in c937d01 also be backported (if so, I would modify them to remove the removal version for this PR), or left 3.11+ only as well? Let me know, and I'll either move both commits to another branch for a followup 3.11+ only PR, or just drop/move 76f04e1 and edit c937d01 to not use deprecated-removed.

@brettcannon While I didn't see any response, I'm assuming you're okay with the additional explanations being 3.11-only in light of your approval here and your call on #92613 regarding those deprecations. Therefore, I've gone with the simpler first option for now and just moved everything to another 3.11-only branch but everything except for the commit fixing PEP links to point directly to the relevant sections and linking any stdlib replacements (which, of course, does have to be backported to fix the existing message, as otherwise, those reading the existing message in the 3.9 and (default) 3.10 docs will continue to be confused).

@brettcannon
Copy link
Member

@brettcannon brettcannon commented May 13, 2022

I've gone with the simpler first option for now and just moved everything to another 3.11-only branch but everything except for the commit fixing PEP links to point directly to the relevant sections and linking any stdlib replacements (which, of course, does have to be backported to fix the existing message, as otherwise, those reading the existing message in the 3.9 and (default) 3.10 docs will continue to be confused).

Sorry, but that's a lot of words with nested parentheses and I'm sick, so my brain can't fully process what you're saying. I think you're just saying you yanked the deprecated-removed part from this PR, which is fine.

@brettcannon brettcannon merged commit 9f68dab into python:main May 13, 2022
13 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 13, 2022

Thanks @CAM-Gerlach for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10, 3.11.
🐍🍒🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 13, 2022

GH-92785 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 13, 2022
…ecation notices (pythonGH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 13, 2022
…ecation notices (pythonGH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 13, 2022

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

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 13, 2022
…ecation notices (pythonGH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 13, 2022

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

miss-islington added a commit that referenced this issue May 13, 2022
…n notices (GH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
miss-islington added a commit that referenced this issue May 13, 2022
…n notices (GH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
miss-islington added a commit that referenced this issue May 13, 2022
…n notices (GH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@CAM-Gerlach
Copy link
Member Author

@CAM-Gerlach CAM-Gerlach commented May 13, 2022

Thanks for your help and merging, @brettcannon

Sorry, but that's a lot of words with nested parentheses and I'm sick, so my brain can't fully process what you're saying.

Sorry, its my fault—I realized my original explanation was rather dense, buried and overcomplicated so I rewrote it in that comment, but I kept adding to it and it ended up being as complex as the original 😞

Take care of yourself, and I hope you feel better!

I think you're just saying you yanked the deprecated-removed part from this PR, which is fine.

Yep, basically, except that I also yanked the per-function cgi deprecation messages (which is the part my question was asking about as to whether you wanted that backported...which I should have just asked in one simple sentence).

I'll make two separate PRs, one with each, and if you'd like the per-function deprecation messages backported, I can drop the deprecated-removed from there and add it for 3.11+ in the non-backported deprecated-removed PR.

miss-islington pushed a commit that referenced this issue May 20, 2022
…es (GH-92793)

As discussed in #92611 and #92564 and as a followup to PR #92612 , this 3.11+ only PR uses the proper `deprecated-removed` role for the modules deprecated by PEP 593 (PEP-594) to clearly indicate to users that a removal version is planned and what it is, so they can prepare accordingly or voice any unanticipated impacts.

Related to #92792 ; if we decide to backport that PR, the upgrade to using `deprecated-removed` on those functions can be moved to this one.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 20, 2022
… modules (pythonGH-92793)

As discussed in pythonGH-92611 and pythonGH-92564 and as a followup to PR pythonGH-92612 , this 3.11+ only PR uses the proper `deprecated-removed` role for the modules deprecated by PEP 593 (PEP-594) to clearly indicate to users that a removal version is planned and what it is, so they can prepare accordingly or voice any unanticipated impacts.

Related to pythonGH-92792 ; if we decide to backport that PR, the upgrade to using `deprecated-removed` on those functions can be moved to this one.
(cherry picked from commit 31fa41e)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
brettcannon pushed a commit that referenced this issue May 20, 2022
…es (GH-92793) (GH-93026)

As discussed in GH-92611 and GH-92564 and as a followup to PR GH-92612 , this 3.11+ only PR uses the proper `deprecated-removed` role for the modules deprecated by PEP 593 (PEP-594) to clearly indicate to users that a removal version is planned and what it is, so they can prepare accordingly or voice any unanticipated impacts.

Related to GH-92792 ; if we decide to backport that PR, the upgrade to using `deprecated-removed` on those functions can be moved to this one.
(cherry picked from commit 31fa41e)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants