Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Apr 4, 2024

This sets up intersphinx and replaces a few PEP links in typing.rst with intersphinx links to the PEPs.

I'm going to ask in the Python Docs discord whether there are any concerns with enabling intersphinx on the Python docs, and wait for an answer before investing time into replacing the remaining links.


📚 Documentation preview 📚: https://cpython-previews--117540.org.readthedocs.build/

@JelleZijlstra
Copy link
Member Author

From Petr's comments on Discord, it appears this may cause issues for redistributors (e.g., Linux distros) because it means that building the docs will require Internet access. I think I'll have to open a discussion on Discuss about it first.

@picnixz
Copy link
Member

picnixz commented Apr 6, 2024

I can suggest some solutions:

  1. Provide a copy of the typing inventory. Internet connection is not needed if you have a local copy of the intersphinx inventory.
  2. I'm not sure if you really need the full power of intersphinx since most of the links you are referring to are sections or HTML pages that I doubt would change without you noticing it. For instance, in Sphinx, we have the same issue where we need to refer to the docutils specs but there is no intersphinx support for docutils, so we use sphinx.ext.extlinks instead. However, this is quite fragile against URL changes.

@nineteendo
Copy link
Contributor

Wouldn't it better to convert the pull request back to a draft? GitHub automatically prevents you from merging those.

@serhiy-storchaka serhiy-storchaka added the needs backport to 3.13 bugs and security fixes label May 9, 2024
@encukou
Copy link
Member

encukou commented May 10, 2024

Since this can break people's build workflows, now -- before the first alpha -- is the best time to do it.
I wouldn't backport it, though.

@nineteendo
Copy link
Contributor

Yeah, it also allows us to link to a specific section, rather than the start of the PEP (e.g. typing.overload).

@JelleZijlstra
Copy link
Member Author

@encukou that's an option, but it would be a shame if we aren't able to make this change in the 3.12 and 3.13 docs. Ideally, we'd have a lot of cross-links to the spec.

Maybe at PyCon I can spend some time trying to figure out a robust solution based on @picnixz's suggestions.

@nineteendo
Copy link
Contributor

If intersphinx is a problem, we could maybe use canonical links for https://typing.readthedocs.io.

@encukou encukou added the docs Documentation in the Doc dir label Sep 6, 2024
@willingc
Copy link
Contributor

Looping back around to this: @JelleZijlstra @encukou Thoughts on next steps now that some time has gone by?

@JelleZijlstra
Copy link
Member Author

I'd like this to happen but I don't know if I'll have time to push for and implement a robust solution. I'd be happy if someone else did, though.

@hugovk hugovk requested review from AA-Turner and hugovk as code owners April 10, 2025 11:25
@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
Co-authored-by: Hugo van Kemenade <[email protected]>
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes DO-NOT-MERGE docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

9 participants