FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for Python 3.15 by hugovk · Pull Request #282 · python/python-docs-theme · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .toml  (1) .yml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: ["3.14", "3.13", "3.12"]
python-version: ["3.15", "3.14", "3.13", "3.12"]
include:
- python-version: "3.15"
branch: "main"
Comment on lines +16 to +18

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A possible improvement is to compute the branch and extra opts once and assign them to env vars:

Suggested change
include:
- python-version: "3.15"
branch: "main"
include:
- python-version: "3.15"
branch: "main"
extra_opts: '--select-output no-html'
env:
# set the branch name to either 'main' or the version number
BRANCH: ${{ matrix.branch || matrix.version }}
# define optional extra options if specified
EXTRA_OPTS: ${{ matrix.extra_opts || '' }}

This keeps all the data and logic closer and avoids duplication. However we only need the branch and the extra opts once in the workflow, so your less-verbose solution is fine too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah, that is quite a bit more verbose, let's stick with the current version. Thanks!

steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.branch }}
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: Clone docsbuild scripts
Expand All @@ -38,16 +41,16 @@ jobs:
--skip-cache-invalidation
--theme "$(pwd)"
--languages en
--branches ${{ matrix.branch }}
${{ matrix.branch == '3.14' && '--select-output no-html' || '' }}
--branches ${{ matrix.branch || matrix.python-version }}
${{ matrix.branch == 'main' && '--select-output no-html' || '' }}
Comment on lines +44 to +45

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
--branches ${{ matrix.branch || matrix.python-version }}
${{ matrix.branch == 'main' && '--select-output no-html' || '' }}
--branches env.BRANCH env.EXTRA_OPTS

- name: Show logs
if: failure()
run: |
cat ./logs/docsbuild.log
- name: Upload
uses: actions/upload-artifact@v5
with:
name: doc-html-${{ matrix.branch }}
name: doc-html-${{ matrix.python-version }}
path: www/

translations:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
]
Expand Down Expand Up @@ -70,4 +71,4 @@ lint.ignore = [
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pyproject-fmt]
max_supported_python = "3.14"
max_supported_python = "3.15"
Loading

Back | FazBrowse Home | New Git URL