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

Docs use deprecated Sphinx .. index:: entries #97950

Closed
ezio-melotti opened this issue Oct 6, 2022 · 7 comments
Closed

Docs use deprecated Sphinx .. index:: entries #97950

ezio-melotti opened this issue Oct 6, 2022 · 7 comments
Labels
3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@ezio-melotti
Copy link
Member

ezio-melotti commented Oct 6, 2022

In #97921 (comment) @hugovk noticed that Sphinx has deprecated some of the .. index:: entry types:

module, keyword, operator, object, exception, statement, builtin
These all create two index entries. For example, module: hashlib creates the entries module; hashlib and hashlib; module. (These are Python-specific and therefore deprecated.)

Currently we are using some of those in the docs, so we have at least 3 options:

  • keep using them if it's a silent deprecation with no removal plans
  • reimplement them in pyspecific.py, if we want to keep use them (and if it's possible to reimplement them)
  • remove them and replace them with the non-deprecated ones

(cc @AA-Turner)

Linked PRs

@ezio-melotti ezio-melotti added type-bug An unexpected behavior, bug, or error docs Documentation in the Doc dir sprint labels Oct 6, 2022
@ezio-melotti ezio-melotti moved this to Todo in Sprint 2024 Oct 6, 2022
@AA-Turner
Copy link
Member

I want to remove them eventually, I think the best option may be (3) as index entry types are quite hard to patch into Sphinx.

A

@AA-Turner AA-Turner added 3.11 only security fixes 3.10 only security fixes 3.12 bugs and security fixes labels Oct 13, 2022
@hugovk hugovk added the easy label Nov 10, 2022
@mmmarcos
Copy link

In principle, these deprecated index-types can all be replaced with the more generic pair index-type. However, this has already been done/attempted in #18004 and it was not merged because of a Sphinx issue : the python index-types (module, ...) are automatically translated in the index page while this is not the case when using pair: module; ...: (see sphinx-doc/sphinx#6970 (comment)).

@arhadthedev arhadthedev added 3.13 bugs and security fixes 3.11 only security fixes and removed 3.11 only security fixes 3.10 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes sprint labels Apr 29, 2023
@arhadthedev
Copy link
Member

Removing sprint because the issue missed the ones in 2022 and 2023.

@ezio-melotti
Copy link
Member Author

IIUC GH-104000 should be merged first to solve the translation issue, then #103996 can be merged, and I then more PRs should be created to fix other index directives (e.g. object: ...). Is this correct?

@AA-Turner
Copy link
Member

Yep! I have the other PRs staged locally but didn't want to spam with several PRs!

A

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 4, 2023
…4158)

* Uncomment object removal in pairindextypes

* Use new-style index directive ('object') - C API

* Use new-style index directive ('object') - Library

* Use new-style index directive ('object') - Reference

* Use new-style index directive ('object') - Tutorial
(cherry picked from commit 6ab4636)

Co-authored-by: Adam Turner <[email protected]>
hugovk pushed a commit that referenced this issue May 4, 2023
…#104159)

GH-97950: Use new-style index directive ('object') (GH-104158)

* Uncomment object removal in pairindextypes

* Use new-style index directive ('object') - C API

* Use new-style index directive ('object') - Library

* Use new-style index directive ('object') - Reference

* Use new-style index directive ('object') - Tutorial
(cherry picked from commit 6ab4636)

Co-authored-by: Adam Turner <[email protected]>
AA-Turner added a commit to AA-Turner/cpython that referenced this issue May 4, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 4, 2023
hugovk pushed a commit that referenced this issue May 4, 2023
@AA-Turner AA-Turner removed the easy label May 4, 2023
hugovk pushed a commit that referenced this issue May 6, 2023
* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 6, 2023
…04164)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit f508800)

Co-authored-by: Adam Turner <[email protected]>
hugovk pushed a commit that referenced this issue May 6, 2023
#104221)

GH-97950: Use new-style index directive ('builtin') (GH-104164)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit f508800)

Co-authored-by: Adam Turner <[email protected]>
@hugovk hugovk added 3.11 only security fixes and removed 3.11 only security fixes 3.13 bugs and security fixes labels May 6, 2023
@hugovk
Copy link
Member

hugovk commented May 6, 2023

@AA-Turner Thanks for the PRs, all merged and backported to 3.11! Are we good to close this now or is there more to come?

@AA-Turner
Copy link
Member

All done I believe, thanks all!

A

jbower-fb pushed a commit to jbower-fb/cpython-jbowerfb that referenced this issue May 8, 2023
)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
hugovk pushed a commit that referenced this issue Jul 26, 2023
…#107246)

Use new-style index directive ('statement') - library/imp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants