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

bpo-41028: Doc: Move switchers to docsbuild-scripts. #20969

Merged
merged 2 commits into from
Nov 7, 2020

Conversation

JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Jun 18, 2020

TL;DR: I'm moving language and version switchers (manually maintained in every branches), and "indexlayout" (left menu, in docs.python.org, with a list of versions, manually maintained in every branches), to docsbuild-scripts.

The current version of docs.python.org already uses the new language picker, version picker, and indexsidebar, I build all french versions with it manually, other languages will be built in a few hours.

There's no hurry to merge this PR, docsbuild-scripts accomodate to its presence or absence, and it does not need to be backported.

More info: https://mail.python.org/pipermail/doc-sig/2020-June/004200.html

I took some liberties:

  • I added some translation to dummy.html, even if docsbuild-script don't use them yet, it should in the future.
  • I added an id to the <li> where the language and version switchers should land, to avoid ugly selectors to try to find it, and eventual bugs associated with ugly selectors. Docsbuild-script don't use it yet but should in the future.

This should avoid commits like: 19e3e00, 85c6f8c, 3f36043, 59e7bbc, which had to be backported as far as possible (I was not a big fan of pushing thoses changes to security-only branches, but it was the only way to have an up-to-date sidebar and switcher on their doc).

https://bugs.python.org/issue41028

@JulienPalard
Copy link
Member Author

This goes as expected in production, all 3.7 translations are built, and all french translations are built, I see no issues at the moment, starting to build docs for 3.8.

@JulienPalard
Copy link
Member Author

In production, this is now starting to fix links and picker for the 2.7 version, which was stating:

Docs by version

    Python 3.9 (in development)

and now displays:

Docs by version

    Python 3.10 (in development)

@JulienPalard
Copy link
Member Author

Don't merge until we have a concensus on python/python-docs-theme#46.

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think the "stand-alone" sidebar looks fine with the Stable, Development, and All Versions links. This is a really nice maintainability improvement.

@JulienPalard
Copy link
Member Author

Rebase on top of master, this is used since a few month in production and works, so I'll merge this soon.

@JulienPalard JulienPalard merged commit ee2549c into python:master Nov 7, 2020
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Nov 7, 2020
…lots1

* origin/master: (80 commits)
  bpo-42282: Fold constants inside named expressions (pythonGH-23190)
  bpo-41028: Doc: Move switchers to docsbuild-scripts. (pythonGH-20969)
  bpo-42133: update parts of the stdlib to fall back to `__spec__.loader` when `__loader__` is missing (python#22929)
  Remove outdated reference to pywin32 from platform module (pythonGH-22005)
  bpo-41832: PyType_FromModuleAndSpec() now accepts NULL tp_doc (pythonGH-23123)
  Minor grammar edits for the descriptor howto guide (GH-python#23175)
  bpo-42179: Doc/tutorial: Remove mention of __cause__ (pythonGH-23162)
  bpo-26389: Allow passing an exception object in the traceback module (pythonGH-22610)
  bpo-42260: PyConfig_Read() only parses argv once (pythonGH-23168)
  bpo-42260: Add _PyConfig_FromDict() (pythonGH-23167)
  bpo-41877 Check for asert, aseert, assrt in mocks (pythonGH-23165)
  [docs] fix wrongly named AsyncContextDecorator (pythonGH-23164)
  bpo-42262: Add Py_NewRef() and Py_XNewRef() (pythonGH-23152)
  bpo-42266: Handle monkey-patching descriptors in LOAD_ATTR cache (pythonGH-23157)
  bpo-40816 Add AsyncContextDecorator class (pythonGH-20516)
  bpo-42260: Add _PyInterpreterState_SetConfig() (pythonGH-23158)
  Disable peg generator tests when building with PGO (pythonGH-23141)
  bpo-1635741: _sqlite3 uses PyModule_AddObjectRef() (pythonGH-23148)
  bpo-1635741: Fix PyInit_pyexpat() error handling (pythonGH-22489)
  bpo-42260: Main init modify sys.flags in-place (pythonGH-23150)
  ...
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@JulienPalard JulienPalard deleted the move-switchers branch October 9, 2021 07:30
@ned-deily ned-deily added needs backport to 3.8 only security fixes needs backport to 3.9 only security fixes labels Jan 2, 2022
@miss-islington
Copy link
Contributor

Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 2, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 2, 2022
(cherry picked from commit ee2549c)

Co-authored-by: Julien Palard <julien@palard.fr>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 2, 2022
(cherry picked from commit ee2549c)

Co-authored-by: Julien Palard <julien@palard.fr>
@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label Jan 2, 2022
@bedevere-bot
Copy link

GH-30344 is a backport of this pull request to the 3.8 branch.

ned-deily pushed a commit that referenced this pull request Jan 2, 2022
…0343)

(cherry picked from commit ee2549c)

Co-authored-by: Julien Palard <julien@palard.fr>
ambv pushed a commit that referenced this pull request Feb 17, 2022
…0344)

(cherry picked from commit ee2549c)

Co-authored-by: Julien Palard <julien@palard.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants