Skip to content

Commit f158051

Browse files
authored
Update patch for Python 3.10.19 (#344)
1 parent 0908e21 commit f158051

9 files changed

Lines changed: 20076 additions & 17266 deletions

File tree

.github/dependabot.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
# Check for updates on Sunday, 8PM UTC
8-
interval: "weekly"
9-
day: "sunday"
10-
time: "20:00"
7+
# Check for updates on the first Sunday of every month, 8PM UTC
8+
interval: "cron"
9+
cronjob: "0 20 * * sun#1"

.github/workflows/ci.yaml

Lines changed: 188 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
XZ_VERSION: ${{ steps.extract.outputs.XZ_VERSION }}
5353

5454
steps:
55-
- uses: actions/checkout@v4.1.7
55+
- uses: actions/checkout@v6
5656

5757
- name: Extract config variables
5858
id: extract
@@ -78,28 +78,27 @@ jobs:
7878
echo "XZ_VERSION=${XZ_VERSION}" | tee -a ${GITHUB_OUTPUT}
7979
8080
build:
81-
runs-on: macOS-latest
81+
runs-on: macOS-15
8282
needs: [ config ]
8383
strategy:
8484
fail-fast: false
8585
matrix:
86-
target: ['macOS', 'iOS', 'tvOS', 'watchOS']
87-
include:
88-
- briefcase-run-args:
89-
- run-tests: false
90-
91-
- target: macOS
92-
run-tests: true
93-
94-
- target: iOS
95-
briefcase-run-args: ' -d "iPhone SE (3rd generation)"'
96-
run-tests: true
86+
platform: ['macOS', 'iOS', 'tvOS', 'watchOS']
9787

9888
steps:
99-
- uses: actions/checkout@v4.1.7
89+
- uses: actions/checkout@v6
90+
91+
- name: Set up Xcode
92+
# GitHub recommends explicitly selecting the desired Xcode version:
93+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
94+
# This became a necessity as a result of
95+
# https://github.com/actions/runner-images/issues/12541 and
96+
# https://github.com/actions/runner-images/issues/12751.
97+
run: |
98+
sudo xcode-select --switch /Applications/Xcode_16.4.app
10099
101100
- name: Set up Python
102-
uses: actions/setup-python@v5.4.0
101+
uses: actions/setup-python@v6.1.0
103102
with:
104103
# Appending -dev ensures that we can always build the dev release.
105104
# It's a no-op for versions that have been published.
@@ -108,31 +107,193 @@ jobs:
108107
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
109108
check-latest: true
110109

111-
- name: Build ${{ matrix.target }}
110+
- name: Build ${{ matrix.platform }}
112111
run: |
113-
# Do the build for the requested target.
114-
make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
112+
# Do the build for the requested platform.
113+
make ${{ matrix.platform }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
115114
116115
- name: Upload build artefacts
117-
uses: actions/upload-artifact@v4.6.1
116+
uses: actions/upload-artifact@v6.0.0
117+
with:
118+
name: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
119+
path: dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
120+
121+
briefcase-testbed:
122+
name: Briefcase testbed (${{ matrix.platform }})
123+
runs-on: macOS-15
124+
needs: [ config, build ]
125+
strategy:
126+
fail-fast: false
127+
matrix:
128+
platform: ["macOS", "iOS"]
129+
include:
130+
- briefcase-run-args:
131+
132+
- platform: iOS
133+
briefcase-run-args: ' -d "iPhone 16e::iOS 18.5"'
134+
135+
steps:
136+
- uses: actions/checkout@v6
137+
138+
- name: Set up Xcode
139+
# GitHub recommends explicitly selecting the desired Xcode version:
140+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
141+
# This became a necessity as a result of
142+
# https://github.com/actions/runner-images/issues/12541 and
143+
# https://github.com/actions/runner-images/issues/12751.
144+
run: |
145+
sudo xcode-select --switch /Applications/Xcode_16.4.app
146+
147+
- name: Get build artifact
148+
uses: actions/download-artifact@v7.0.0
118149
with:
119-
name: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
120-
path: dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
150+
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
151+
path: dist
152+
merge-multiple: true
121153

122-
- uses: actions/checkout@v4.1.7
123-
if: matrix.run-tests
154+
- name: Set up Python
155+
uses: actions/setup-python@v6.1.0
156+
with:
157+
# Appending -dev ensures that we can always build the dev release.
158+
# It's a no-op for versions that have been published.
159+
python-version: ${{ needs.config.outputs.PYTHON_VER }}-dev
160+
# Ensure that we *always* use the latest build, not a cached version.
161+
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
162+
check-latest: true
163+
164+
- uses: actions/checkout@v6
124165
with:
125166
repository: beeware/Python-support-testbed
126167
path: Python-support-testbed
127168

128169
- name: Install dependencies
129-
if: matrix.run-tests
130170
run: |
131171
# Use the development version of Briefcase
132172
python -m pip install git+https://github.com/beeware/briefcase.git
133173
134174
- name: Run support testbed check
135-
if: matrix.run-tests
136-
timeout-minutes: 10
175+
timeout-minutes: 15
137176
working-directory: Python-support-testbed
138-
run: briefcase run ${{ matrix.target }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz\'
177+
run: briefcase run ${{ matrix.platform }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz\'
178+
179+
cpython-testbed:
180+
name: CPython testbed (${{ matrix.platform }})
181+
runs-on: macOS-15
182+
needs: [ config, build ]
183+
strategy:
184+
fail-fast: false
185+
matrix:
186+
platform: ["iOS", "tvOS"]
187+
include:
188+
- platform: "iOS"
189+
testbed-args: '--simulator "iPhone 16e,arch=arm64,OS=18.5"'
190+
191+
steps:
192+
- uses: actions/checkout@v6
193+
194+
- name: Get build artifact
195+
uses: actions/download-artifact@v7.0.0
196+
with:
197+
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
198+
path: dist
199+
merge-multiple: true
200+
201+
- name: Set up Xcode
202+
# GitHub recommends explicitly selecting the desired Xcode version:
203+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
204+
# This became a necessity as a result of
205+
# https://github.com/actions/runner-images/issues/12541 and
206+
# https://github.com/actions/runner-images/issues/12751.
207+
run: |
208+
sudo xcode-select --switch /Applications/Xcode_16.4.app
209+
210+
- name: Set up Python
211+
uses: actions/setup-python@v6.1.0
212+
with:
213+
# Appending -dev ensures that we can always build the dev release.
214+
# It's a no-op for versions that have been published.
215+
python-version: ${{ needs.config.outputs.PYTHON_VER }}-dev
216+
# Ensure that we *always* use the latest build, not a cached version.
217+
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
218+
check-latest: true
219+
220+
- name: Unpack support package
221+
run: |
222+
mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
223+
cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
224+
tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
225+
226+
- name: Run CPython testbed
227+
timeout-minutes: 15
228+
working-directory: support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
229+
run: |
230+
# Run a representative subset of CPython core tests:
231+
# - test_builtin as a test of core language tools
232+
# - test_grammar as a test of core language features
233+
# - test_os as a test of system library calls
234+
# - test_bz2 as a simple test of third party libraries
235+
# - test_ctypes as a test of FFI
236+
python -m testbed run --verbose ${{ matrix.testbed-args }} -- test -W --timeout=-1 test_builtin test_grammar test_os test_bz2 test_ctypes
237+
238+
crossenv-test:
239+
name: Cross-platform env test (${{ matrix.multiarch }})
240+
runs-on: macOS-latest
241+
needs: [ config, build ]
242+
strategy:
243+
fail-fast: false
244+
matrix:
245+
include:
246+
- platform: iOS
247+
slice: ios-arm64_x86_64-simulator
248+
multiarch: arm64-iphonesimulator
249+
- platform: iOS
250+
slice: ios-arm64_x86_64-simulator
251+
multiarch: x86_64-iphonesimulator
252+
- platform: iOS
253+
slice: ios-arm64
254+
multiarch: arm64-iphoneos
255+
256+
steps:
257+
- uses: actions/checkout@v6
258+
259+
- name: Get build artifact
260+
uses: actions/download-artifact@v7.0.0
261+
with:
262+
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
263+
path: dist
264+
merge-multiple: true
265+
266+
- name: Set up Python
267+
uses: actions/setup-python@v6.1.0
268+
with:
269+
# Appending -dev ensures that we can always build the dev release.
270+
# It's a no-op for versions that have been published.
271+
python-version: ${{ needs.config.outputs.PYTHON_VER }}-dev
272+
# Ensure that we *always* use the latest build, not a cached version.
273+
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
274+
check-latest: true
275+
276+
- name: Unpack support package
277+
run: |
278+
mkdir -p support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
279+
cd support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
280+
tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
281+
282+
- name: Run cross-platform environment test
283+
env:
284+
PYTHON_CROSS_PLATFORM: ${{ matrix.platform }}
285+
PYTHON_CROSS_SLICE: ${{ matrix.slice }}
286+
PYTHON_CROSS_MULTIARCH: ${{ matrix.multiarch }}
287+
run: |
288+
# Create and activate a native virtual environment
289+
python${{ needs.config.outputs.PYTHON_VER }} -m venv cross-venv
290+
source cross-venv/bin/activate
291+
292+
# Install pytest
293+
python -m pip install pytest
294+
295+
# Convert venv into cross-venv
296+
python support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}/Python.xcframework/${{ matrix.slice }}/platform-config/${{ matrix.multiarch }}/make_cross_venv.py cross-venv
297+
298+
# Run the test suite
299+
python -m pytest tests

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v6
1212

1313
- name: Set up Python environment
14-
uses: actions/setup-python@v5.4.0
14+
uses: actions/setup-python@v6.1.0
1515
with:
1616
python-version: "3.X"
1717

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
needs: [ config, ci ]
4141
steps:
4242
- name: Get build artifacts
43-
uses: actions/download-artifact@v4.1.9
43+
uses: actions/download-artifact@v7.0.0
4444
with:
4545
pattern: Python-*
4646
path: dist
4747
merge-multiple: true
4848

4949
- name: Create Release
50-
uses: ncipollo/release-action@v1.16.0
50+
uses: ncipollo/release-action@v1.20.0
5151
with:
5252
name: ${{ needs.ci.outputs.PYTHON_VER }}-${{ needs.config.outputs.BUILD_NUMBER }}
5353
tag: ${{ needs.ci.outputs.PYTHON_VER }}-${{ needs.config.outputs.BUILD_NUMBER }}

0 commit comments

Comments
 (0)