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

Rewrite RTD configuration to use build.jobs rather than build.commands by zware · Pull Request #149429 · python/cpython · GitHub

Repository navigation

Rewrite RTD configuration to use build.jobs rather than build.commands - #149429

Merged
zware merged 7 commits into
python:mainfrom
zware:rewrite_rtd_config
May 6, 2026
Merged

zware merged 7 commits into
python:mainfrom
zware:rewrite_rtd_config

Conversation

zware commented May 5, 2026

Copy link
Copy Markdown
Member

No description provided.

zware force-pushed the rewrite_rtd_config branch 2 times, most recently from dfcae69 to 7438633 Compare May 5, 2026 20:02
Comment thread .readthedocs.yml
then
base_branch=main;
git fetch --depth=50 origin $base_branch;
for attempt in $(seq 10);

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

I think @StanFromIreland added a bash script for progressive unshallowing some time ago based on my experiments elsewhere. We could probably reuse that.

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

Oh, he embedded bash in YAML: #147975 (comment). But perhaps, if it's extracted into Tools/, we could deduplicate the logic.

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

Deduplicating sounds good, but I think I'll leave that for a later cleanup.

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

Ack. A follow-up sounds good.

Comment thread .readthedocs.yml Outdated
zware and others added 2 commits May 5, 2026 15:45
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Comment thread .readthedocs.yml Outdated
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
zware marked this pull request as ready for review May 5, 2026 20:58
zware requested a review from AA-Turner as a code owner May 5, 2026 20:58

bedevere-app Bot commented May 5, 2026

Copy link
Copy Markdown

GH-149432 is a backport of this pull request to the 3.14 branch.

zware commented May 5, 2026

Copy link
Copy Markdown
Member Author

Opened the backport ahead of time because it needs to be manually adjusted anyway, and I want to make sure it doesn't do anything too weird on the 3.14 branch.

zware added a commit to zware/cpython that referenced this pull request May 5, 2026
zware added a commit to zware/cpython that referenced this pull request May 5, 2026
… build.commands (pythonGH-149429)

no --set-upstream, add explicit origin/?
Comment thread .readthedocs.yml
set -eEux;
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ];
then
base_branch=main;

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

Is there an env var that could be used instead of main? I imagine this isn't going to work well in backport PRs unless we check against stable branches.

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

My plan is to manually set base_branch to the right branch in each backport; I'm afraid RTD doesn't provide the base branch anywhere (that's documented, anyway).

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

Alright, that works as a workaround. Though, I'd rather have RTD fix it.

curl -s https://api.github.com/repos/python/cpython/pulls/149429 | jq --raw-output '.base.ref' will get you what you want unless they rate-limit you (which is likely).


GHA provides a GITHUB_EVENT_PATH env var with a file path to the entire webhook payload. RTD should do the same so that people wouldn't have to ask them to expose every single bit that GH sends them w/o additional API requests one by one.

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

Oh I just saw this discussion, I wrote #150690 with it.

webknjaz left a comment

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

I think this can be merged, keeping in mind possible follow-up improvements in the future.

…commands

Add explicit local branch name needed in backports

read-the-docs-community Bot commented May 6, 2026 •
edited
Loading

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32563876 | 📁 Comparing 569bf42 against main (f6d16a0)

  🔍 Preview build  

9 files changed · ± 9 modified

± Modified

…commands

Avoid "refname 'origin/main' is ambiguous" warnings
Comment thread .readthedocs.yml
zware added a commit to zware/cpython that referenced this pull request May 6, 2026
zware merged commit 1dcc546 into python:main May 6, 2026
49 checks passed
zware deleted the rewrite_rtd_config branch May 6, 2026 15:44
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL