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

Doc: Deprecation notices in modules to be removed per PEP 594 could be clearer and more helpful #92611

Closed
CAM-Gerlach opened this issue May 10, 2022 · 5 comments · Fixed by #92612
Closed
Assignees
Labels
docs

Comments

@CAM-Gerlach
Copy link
Member

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

As most recently discussed in the Discourse thread on @brettcannon and @tiran 's PEP 594 (PEP-594), there have been a number of questions various places about the replacement for cgi.parse_headers() (and several other other cgi utility functions) deprecated by that PEP.

The PEP actually contains a good chunk of useful information that addresses this, but it is (evidently) not that easy to find deep in the body text, particularly for the important case of users coming from the cgi module docs, which only features a brief note to see the PEP for details, without a direct link to said section, information on replacements or even the target removal version (which provides no clear indication of the urgency to the removal, particularly for modules (like imp) that have been formally or "soft" deprecated for many years or even decades).

Therefore, users have to scroll through the PEP to find any such information, and the first thing they will come across mentioning cgi is the table, which indicates there is no replacement (nor does it link to the cgi section several pages further down containing that information). This resulted in even a highly experienced Python developer like @fungi being unable to discover that information, who ended up having to dig through old threads to find it.

This turns out to be the case for nearly all such modules. Therefore, to improve the user experience here and raise the visibility of the pending removal, we should:

  • Link 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-link 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)
  • Use 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)

I will open a PR momentarily to take care of these three items.

Also, related issues:

  • We should link the table entries to their sections to allow users linked to the PEP to navigate it much more easily (will open a PR on the PEPs repo)
  • The PEP states that the uuencode/decode-related functions in the binascii module, as well as the uu codec will also be deprecated, but as far as I can tell, those deprecations are neither yet implemented nor documented (will open a separate issue)
@CAM-Gerlach CAM-Gerlach added the docs label May 10, 2022
@CAM-Gerlach CAM-Gerlach self-assigned this May 10, 2022
@CAM-Gerlach CAM-Gerlach changed the title Doc: Links to PEP 594 in modules it deprecates don't go directly to the relevant section Doc: Deprecation notices in modules to be removed per PEP 594 missing critical links and details May 10, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 10, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 10, 2022
@CAM-Gerlach
Copy link
Member Author

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

PR opened as #92612

@fungi
Copy link

@fungi fungi commented May 10, 2022

This resulted in even a highly experienced Python developer like @fungi being unable to discover that information, who ended up having to dig through old threads to find it.

To be fair to the PEP authors and reviewers, a lot of this was down to my personal biases. I've been conditioned through the years not to expect this degree of specificity for recommendations within PEPs and so didn't even look for it there. Worse, I read through the PEP many times before it was approved, and yet still completely failed to remember it was in there when I wound up needing to do something about it.

Many thanks to everyone who put hard work into making PEP 594 so thorough.

@CAM-Gerlach CAM-Gerlach changed the title Doc: Deprecation notices in modules to be removed per PEP 594 missing critical links and details Doc: Deprecation notices in modules to be removed per PEP 594 could be clearer and more helpful May 10, 2022
@CAM-Gerlach
Copy link
Member Author

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

Thanks for the insight, @fungi ! Just to be clear, I didn't mean to imply that this was the fault of anyone, including the PEP authors/reviewers (of which I was one of the latter) or those who added these messages in the docs, and I apologize if I sent that impression. I've seen first-hand how its easy to miss things like this when I'm the person writing the docs and intimately familiar with the subject area, even if its something that really sticks out to a typical reader.

@brettcannon
Copy link
Member

@brettcannon brettcannon commented May 11, 2022

Do note that any use of deprecated-removed can't be backported as the SC explicitly asked removal targets to not be backported to older versions of the docs.

CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 12, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 12, 2022
@CAM-Gerlach
Copy link
Member Author

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

See my response on issue #92564 regarding the broader issue, and my message on PR #92612 for a path forward to drop that change for now on that PR.

CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 12, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 12, 2022
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>
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 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 added a commit to CAM-Gerlach/cpython that referenced this issue May 13, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue May 13, 2022
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>
hello-adam pushed a commit to hello-adam/cpython that referenced this issue Jun 2, 2022
…ecation notices (pythonGH-92612)

(cherry picked from commit 9f68dab)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this issue Jun 11, 2022
miss-islington pushed a commit that referenced this issue Jun 17, 2022
Per @brettcannon 's [suggestions on the Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in #92611 and as a followup to PR #92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

@brettcannon , should this be backported (without the `deprecated-removed` , which I would update it accordingly and re-add in my other PR adding that to the others for 3.11+), or just go in 3.11+?
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 17, 2022
…thonGH-92792)

Per @brettcannon 's [suggestions on the Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in pythonGH-92611 and as a followup to PR pythonGH-92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

@brettcannon , should this be backported (without the `deprecated-removed` , which I would update it accordingly and re-add in my other PR adding that to the others for 3.11+), or just go in 3.11+?
(cherry picked from commit 71354adff07f8beba8374767532bb9da34546e66)

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants