Skip to content

Commit 44b27f0

Browse files
Merge branch '3.13' into backport-5181a6e-3.13
2 parents 9ab84cc + bec0cbc commit 44b27f0

5 files changed

Lines changed: 71 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ jobs:
283283
with:
284284
free-threading: ${{ matrix.free-threading }}
285285

286+
build-ubuntu-installed:
287+
name: 'Ubuntu (installed)'
288+
needs: build-context
289+
if: needs.build-context.outputs.run-ubuntu == 'true'
290+
uses: ./.github/workflows/reusable-install.yml
291+
286292
build-ubuntu-ssltests:
287293
name: 'Ubuntu SSL tests with OpenSSL'
288294
runs-on: ${{ matrix.os }}
@@ -592,6 +598,7 @@ jobs:
592598
- build-windows-msi
593599
- build-macos
594600
- build-ubuntu
601+
- build-ubuntu-installed
595602
- build-ubuntu-ssltests
596603
- build-wasi
597604
- test-hypothesis
@@ -638,6 +645,7 @@ jobs:
638645
!fromJSON(needs.build-context.outputs.run-ubuntu)
639646
&& '
640647
build-ubuntu,
648+
build-ubuntu-installed,
641649
build-ubuntu-ssltests,
642650
test-hypothesis,
643651
build-asan,

.github/workflows/reusable-context.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ jobs:
8686
|| ''
8787
}}
8888
89+
- name: 'Downgrade Git'
90+
# Temporarily downgrade to 2.43 until 2.55 is in the runner image,
91+
# to avoid "fatal: shallow file has changed since we read it" bug.
92+
# See https://github.com/python/cpython/issues/151365.
93+
if: github.event_name == 'pull_request'
94+
run: |
95+
sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'
96+
git --version
97+
8998
# Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
9099
- name: Fetch commits to get branch diff
91100
if: github.event_name == 'pull_request'

.github/workflows/reusable-docs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ jobs:
4747
&& github.event.pull_request.head.sha
4848
|| ''
4949
}}
50+
- name: 'Downgrade Git'
51+
# Temporarily downgrade to 2.43 until 2.55 is in the runner image,
52+
# to avoid "fatal: shallow file has changed since we read it" bug.
53+
# See https://github.com/python/cpython/issues/151365.
54+
if: github.event_name == 'pull_request'
55+
run: |
56+
sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*'
57+
git --version
5058
# Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
5159
- name: 'Fetch commits to get branch diff'
5260
if: github.event_name == 'pull_request'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Reusable Ubuntu (installed)
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
FORCE_COLOR: 1
11+
12+
jobs:
13+
build-install-test:
14+
name: build, install and test
15+
runs-on: ubuntu-24.04-arm
16+
timeout-minutes: 60
17+
env:
18+
PYTHONSTRICTEXTENSIONBUILD: 1
19+
steps:
20+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21+
with:
22+
persist-credentials: false
23+
- name: Register gcc problem matcher
24+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
25+
- name: Set install dir
26+
run:
27+
echo "INSTALL_DIR=$(realpath "${GITHUB_WORKSPACE}/../installed-python")" >> "$GITHUB_ENV"
28+
- name: Install dependencies
29+
run: sudo ./.github/workflows/posix-deps-apt.sh
30+
- name: Configure CPython
31+
run: ./configure --config-cache --prefix="$INSTALL_DIR"
32+
- name: Build CPython
33+
run: make -j
34+
- name: Install CPython
35+
run: make install
36+
- name: Set installed interpreter
37+
run: |
38+
ldversion=$(./python -c 'import sysconfig; print(sysconfig.get_config_var("LDVERSION"))')
39+
echo "INSTALLED_PYTHON=${INSTALL_DIR}/bin/python${ldversion}" >> "$GITHUB_ENV"
40+
- name: Display build info
41+
run: |
42+
"$INSTALLED_PYTHON" -m test.pythoninfo
43+
- name: Test the installed Python
44+
run: xvfb-run "$INSTALLED_PYTHON" -m test --fast-ci --timeout=900

Lib/test/test_subprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,8 +2015,9 @@ def test_encoding_warning(self):
20152015
run("echo hello", shell=True, text=True)
20162016
check_output("echo hello", shell=True, text=True)
20172017
""")
2018+
env = support.make_clean_env()
20182019
cp = subprocess.run([sys.executable, "-Xwarn_default_encoding", "-c", code],
2019-
capture_output=True)
2020+
capture_output=True, env=env)
20202021
lines = cp.stderr.splitlines()
20212022
self.assertEqual(len(lines), 2, lines)
20222023
self.assertTrue(lines[0].startswith(b"<string>:2: EncodingWarning: "))

0 commit comments

Comments
 (0)