Skip to content

Commit 1664635

Browse files
authored
Merge branch '3.10' into backport-d3ab945-3.10
2 parents e43929d + bd3939e commit 1664635

5 files changed

Lines changed: 62 additions & 14 deletions

File tree

.readthedocs.yml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,60 @@
1-
# This is a dummy config file so that readthedocs.org doesn't fail on security branches.
2-
# Note that this won't result in docs actually getting built;
3-
# clicking on the docs preview link on a PR will result in a 404.
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
# Project page: https://readthedocs.org/projects/cpython-previews/
4+
45
version: 2
5-
formats: []
6+
67
sphinx:
7-
configuration: Doc/conf.py
8+
configuration: Doc/conf.py
9+
810
build:
9-
os: "ubuntu-22.04"
11+
os: ubuntu-24.04
1012
tools:
11-
python: "3.11"
13+
python: "3.10"
14+
apt_packages:
15+
- jq
16+
1217
jobs:
13-
post_checkout:
14-
- exit 183
18+
post_system_dependencies:
19+
# https://docs.readthedocs.com/platform/stable/guides/build/skip-build.html#skip-builds-based-on-conditions
20+
#
21+
# Cancel building pull requests when there are no changes in the Doc
22+
# directory or RTD configuration, or if we can't cleanly merge the base
23+
# branch.
24+
- |
25+
set -eEux;
26+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ];
27+
then
28+
base_branch=$(wget -qO- "https://api.github.com/repos/python/cpython/pulls/$READTHEDOCS_VERSION" | jq -er ".base.ref");
29+
git fetch --depth=50 origin $base_branch:origin-$base_branch;
30+
for attempt in $(seq 10);
31+
do
32+
if ! git merge-base HEAD origin-$base_branch;
33+
then
34+
git fetch --deepen=50 origin $base_branch;
35+
else
36+
break;
37+
fi;
38+
done;
39+
if ! git -c "user.name=rtd" -c "user.email=no-reply@readthedocs.org" merge --no-stat --no-edit origin-$base_branch;
40+
then
41+
echo "Unsuccessful merge with '$base_branch' branch, skipping the build";
42+
exit 183;
43+
fi;
44+
if git diff --exit-code --stat origin-$base_branch -- Doc/ .readthedocs.yml;
45+
then
46+
echo "No changes to Doc/ - skipping the build.";
47+
exit 183;
48+
fi;
49+
fi;
50+
create_environment:
51+
- echo "Skipping default environment creation"
52+
install:
53+
- asdf plugin add uv
54+
- asdf install uv latest
55+
- asdf global uv latest
56+
build:
57+
html:
58+
- make -C Doc venv html
59+
- mkdir -p "$READTHEDOCS_OUTPUT"
60+
- mv Doc/build/html "$READTHEDOCS_OUTPUT/"

Doc/using/windows.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ on using nuget. What follows is a summary that is sufficient for Python
397397
developers.
398398

399399
The ``nuget.exe`` command line tool may be downloaded directly from
400-
``https://aka.ms/nugetclidl``, for example, using curl or PowerShell. With the
401-
tool, the latest version of Python for 64-bit or 32-bit machines is installed
402-
using::
400+
``https://dist.nuget.org/win-x86-commandline/latest/nuget.exe``, for example,
401+
using curl or PowerShell. With the tool, the latest version of Python for
402+
64-bit or 32-bit machines is installed using::
403403

404404
nuget.exe install python -ExcludeVersion -OutputDirectory .
405405
nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory .
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update Windows build and installer tooling and documentation to use the
2+
current download URL for ``nuget.exe``.

PCbuild/find_python.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
@set _Py_HOST_PYTHON=%HOST_PYTHON%
4646
@if "%_Py_HOST_PYTHON%"=="" set _Py_HOST_PYTHON=py
4747
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe)
48-
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
48+
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)
4949
@if NOT exist "%_Py_NUGET%" (
5050
@echo Downloading nuget...
5151
@rem NB: Must use single quotes around NUGET here, NOT double!

Tools/msi/get_externals.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set HERE=%~dp0
66
if "%PCBUILD%"=="" (set PCBUILD=%HERE%..\..\PCbuild\)
77
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%HERE%..\..\externals\windows-installer)
88
if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\..\nuget.exe)
9-
if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)
9+
if "%NUGET_URL%"=="" (set NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)
1010

1111
set DO_FETCH=true
1212
set DO_CLEAN=false

0 commit comments

Comments
 (0)