GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow passing multiple branches to build via CLI by hugovk · Pull Request #235 · python/docsbuild-scripts

Conversation

@hugovk

@hugovk hugovk commented Dec 8, 2024

Copy link
Copy Markdown
Member

A full set of Python 3.9-3.13 security+bugfix releases were made last week:

https://discuss.python.org/t/python-3-13-1-3-12-8-3-11-11-3-10-16-and-3-9-21-are-now-available/73214

The bugfix branches (3.12 and 3.13) are automatically built on cron.

The security branches (3.9-3.11) need manual rebuilds. We also have the final 3.8 to manually run. It's taken 16 and 13 hours for a full build of the first two so far (3.11 and 3.10; see #216).

We will certainly have big omnibus security releases in the future and instead of having to run each one separately:

/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.11
/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.10
/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.9
/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.8

It would be useful to pass all branch versions, in a similar way we can with --languages:

/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.11 3.10 3.9 3.8

This PR does that.

I added unit tests for the Version.filter method I changed, along with coverage. We can use coverage to guide adding more tests in the future.


I also added --branches as a new name for this argument and kept the old --branch so as not to break any other scripts, but we could change it later.

We could also make it's use more explicitly deprecated, like print a warning if --branch is used? Maybe it's safe to rename it right away?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk hugovk mentioned this pull request Dec 8, 2024
Manually running a rebuild #216
Closed
@hugovk hugovk changed the title Allow passing multiple branches build via CLI Allow passing multiple branches to build via CLI Dec 8, 2024
m-aciek
m-aciek approved these changes Dec 8, 2024
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk commented Dec 8, 2024
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

hugovk added 7 commits April 11, 2025 13:42
@hugovk
Measure test coverage
f70b86d
@hugovk
Add a test for Version.filter for single version
22d1fba
@hugovk
Add a test for Versions.filter for single version
08cf923
@hugovk
Add a test for Version.filter with default branch
6979d6c
@hugovk
Add a test for Versions.filter with default branch
174c46d
@hugovk
Allow passing multiple branches build via CLI
40dc145
@hugovk
Use argparse's 'deprecated', added in 3.13
f7e617d
@hugovk
hugovk force-pushed the version-filter branch from 23df845 to f7e617d Compare April 11, 2025 11:26
@hugovk

hugovk commented Apr 11, 2025

Copy link
Copy Markdown
Member Author

Merge conflict fixed following refactor in #254.

Added f7e617d to use https://docs.python.org/3/library/argparse.html#deprecated, added in 3.13, to make the deprecation more visible.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk added 2 commits April 11, 2025 14:40
@hugovk
Upgrade action
f85bbfc
@hugovk
Correct --language to --languages in README
5b5d21a
hugovk referenced this pull request Apr 11, 2025
@AA-Turner
Add --language as a synonym of --languages
6d53796
@AA-Turner

AA-Turner commented Apr 11, 2025

Copy link
Copy Markdown
Member

We should just remove the singular variants of the flags. build_docs.py is only invoked by psf-salt, tests in python-docs-theme, and users with SSH access to the docs server. I added --language as a hot-fix in 6d53796 as the incorrect spelling of --language had spread, but was permitted due to allow_abbrev defaulting to True in ArgumentParser. See python/psf-salt#560 and python/python-docs-theme#228 to update usage to --languages.

For --version, it's not used externally, so we can just remove it.

A

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Just remove --branch
7aef3ec
AA-Turner
AA-Turner reviewed Apr 11, 2025
View reviewed changes
Comment thread build_docs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread build_docs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread build_docs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

hugovk and others added 2 commits April 11, 2025 17:27
@hugovk @AA-Turner
Apply suggestions from code review
212ec60
Co-authored-by: Adam Turner <[email protected]>
@AA-Turner
Format
36e1eb5
AA-Turner
AA-Turner approved these changes Apr 11, 2025
View reviewed changes
@AA-Turner
AA-Turner merged commit 2113fd7 into python:main Apr 11, 2025
@hugovk
hugovk deleted the version-filter branch April 11, 2025 14:54
@ewdurbin ewdurbin mentioned this pull request Apr 11, 2025
plausible analytics no longer loading #265
Closed
@hugovk hugovk mentioned this pull request Apr 13, 2025
CI: Use --branches for docsbuild-scripts python/python-docs-theme#232
Merged
@hugovk hugovk mentioned this pull request Sep 8, 2025
Use --branches in README example #312
Merged
@StanFromIreland StanFromIreland mentioned this pull request Sep 13, 2025
Allow --branch and --language to take multiple args #117
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner AA-Turner approved these changes
+1 more reviewer
@m-aciek m-aciek m-aciek approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@hugovk @AA-Turner @m-aciek
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.