Skip to content

Commit e0de3c3

Browse files
authored
Merge branch 'develop' into register-email-3pid-race
2 parents 9c80713 + 3eb9236 commit e0de3c3

File tree

414 files changed

+42021
-11264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+42021
-11264
lines changed

.ci/scripts/calculate_jobs.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def set_output(key: str, value: str):
3636
# First calculate the various trial jobs.
3737
#
3838
# For PRs, we only run each type of test with the oldest Python version supported (which
39-
# is Python 3.8 right now)
39+
# is Python 3.9 right now)
4040

4141
trial_sqlite_tests = [
4242
{
43-
"python-version": "3.8",
43+
"python-version": "3.9",
4444
"database": "sqlite",
4545
"extras": "all",
4646
}
@@ -53,12 +53,12 @@ def set_output(key: str, value: str):
5353
"database": "sqlite",
5454
"extras": "all",
5555
}
56-
for version in ("3.9", "3.10", "3.11", "3.12")
56+
for version in ("3.10", "3.11", "3.12", "3.13")
5757
)
5858

5959
trial_postgres_tests = [
6060
{
61-
"python-version": "3.8",
61+
"python-version": "3.9",
6262
"database": "postgres",
6363
"postgres-version": "11",
6464
"extras": "all",
@@ -68,16 +68,16 @@ def set_output(key: str, value: str):
6868
if not IS_PR:
6969
trial_postgres_tests.append(
7070
{
71-
"python-version": "3.12",
71+
"python-version": "3.13",
7272
"database": "postgres",
73-
"postgres-version": "16",
73+
"postgres-version": "17",
7474
"extras": "all",
7575
}
7676
)
7777

7878
trial_no_extra_tests = [
7979
{
80-
"python-version": "3.8",
80+
"python-version": "3.9",
8181
"database": "sqlite",
8282
"extras": "",
8383
}
@@ -99,24 +99,24 @@ def set_output(key: str, value: str):
9999

100100
# First calculate the various sytest jobs.
101101
#
102-
# For each type of test we only run on focal on PRs
102+
# For each type of test we only run on bullseye on PRs
103103

104104

105105
sytest_tests = [
106106
{
107-
"sytest-tag": "focal",
107+
"sytest-tag": "bullseye",
108108
},
109109
{
110-
"sytest-tag": "focal",
110+
"sytest-tag": "bullseye",
111111
"postgres": "postgres",
112112
},
113113
{
114-
"sytest-tag": "focal",
114+
"sytest-tag": "bullseye",
115115
"postgres": "multi-postgres",
116116
"workers": "workers",
117117
},
118118
{
119-
"sytest-tag": "focal",
119+
"sytest-tag": "bullseye",
120120
"postgres": "multi-postgres",
121121
"workers": "workers",
122122
"reactor": "asyncio",
@@ -127,11 +127,11 @@ def set_output(key: str, value: str):
127127
sytest_tests.extend(
128128
[
129129
{
130-
"sytest-tag": "focal",
130+
"sytest-tag": "bullseye",
131131
"reactor": "asyncio",
132132
},
133133
{
134-
"sytest-tag": "focal",
134+
"sytest-tag": "bullseye",
135135
"postgres": "postgres",
136136
"reactor": "asyncio",
137137
},

.ci/scripts/prepare_old_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# this script is run by GitHub Actions in a plain `focal` container; it
2+
# this script is run by GitHub Actions in a plain `jammy` container; it
33
# - installs the minimal system requirements, and poetry;
44
# - patches the project definition file to refer to old versions only;
55
# - creates a venv with these old versions using poetry; and finally

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
id-token: write # needed for signing the images with GitHub OIDC Token
1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-22.04
1818
steps:
1919
- name: Set up QEMU
2020
id: qemu
@@ -30,7 +30,7 @@ jobs:
3030
run: docker buildx inspect
3131

3232
- name: Install Cosign
33-
uses: sigstore/cosign-installer@v3.5.0
33+
uses: sigstore/cosign-installer@v3.7.0
3434

3535
- name: Checkout repository
3636
uses: actions/checkout@v4

.github/workflows/docs-pr-netlify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
1515
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
1616
- name: 📥 Download artifact
17-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
17+
uses: dawidd6/action-download-artifact@80620a5d27ce0ae443b965134db88467fc607b43 # v7
1818
with:
1919
workflow: docs-pr.yaml
2020
run_id: ${{ github.event.workflow_run.id }}

.github/workflows/fix_lint.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ jobs:
2929
with:
3030
install-project: "false"
3131

32-
- name: Import order (isort)
32+
- name: Run ruff check
3333
continue-on-error: true
34-
run: poetry run isort .
34+
run: poetry run ruff check --fix .
3535

36-
- name: Code style (black)
36+
- name: Run ruff format
3737
continue-on-error: true
38-
run: poetry run black .
39-
40-
- name: Semantic checks (ruff)
41-
continue-on-error: true
42-
run: poetry run ruff --fix .
38+
run: poetry run ruff format --quiet .
4339

4440
- run: cargo clippy --all-features --fix -- -D warnings
4541
continue-on-error: true
@@ -49,4 +45,4 @@ jobs:
4945

5046
- uses: stefanzweifel/git-auto-commit-action@v5
5147
with:
52-
commit_message: "Attempt to fix linting"
48+
commit_message: "Attempt to fix linting"

.github/workflows/latest_deps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ jobs:
132132
fail-fast: false
133133
matrix:
134134
include:
135-
- sytest-tag: focal
135+
- sytest-tag: bullseye
136136

137-
- sytest-tag: focal
137+
- sytest-tag: bullseye
138138
postgres: postgres
139139
workers: workers
140140
redis: redis

.github/workflows/release-artifacts.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,27 @@ jobs:
9191
rm -rf /tmp/.buildx-cache
9292
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
9393
94+
- name: Artifact name
95+
id: artifact-name
96+
# We can't have colons in the upload name of the artifact, so we convert
97+
# e.g. `debian:sid` to `sid`.
98+
env:
99+
DISTRO: ${{ matrix.distro }}
100+
run: |
101+
echo "ARTIFACT_NAME=${DISTRO#*:}" >> "$GITHUB_OUTPUT"
102+
94103
- name: Upload debs as artifacts
95-
uses: actions/upload-artifact@v3 # Don't upgrade to v4; broken: https://github.com/actions/upload-artifact#breaking-changes
104+
uses: actions/upload-artifact@v4
96105
with:
97-
name: debs
106+
name: debs-${{ steps.artifact-name.outputs.ARTIFACT_NAME }}
98107
path: debs/*
99108

100109
build-wheels:
101110
name: Build wheels on ${{ matrix.os }} for ${{ matrix.arch }}
102111
runs-on: ${{ matrix.os }}
103112
strategy:
104113
matrix:
105-
os: [ubuntu-20.04, macos-12]
114+
os: [ubuntu-22.04, macos-13]
106115
arch: [x86_64, aarch64]
107116
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
108117
# It is not read by the rest of the workflow.
@@ -112,9 +121,9 @@ jobs:
112121
exclude:
113122
# Don't build macos wheels on PR CI.
114123
- is_pr: true
115-
os: "macos-12"
124+
os: "macos-13"
116125
# Don't build aarch64 wheels on mac.
117-
- os: "macos-12"
126+
- os: "macos-13"
118127
arch: aarch64
119128
# Don't build aarch64 wheels on PR CI.
120129
- is_pr: true
@@ -144,7 +153,7 @@ jobs:
144153

145154
- name: Only build a single wheel on PR
146155
if: startsWith(github.ref, 'refs/pull/')
147-
run: echo "CIBW_BUILD="cp38-manylinux_${{ matrix.arch }}"" >> $GITHUB_ENV
156+
run: echo "CIBW_BUILD="cp39-manylinux_${{ matrix.arch }}"" >> $GITHUB_ENV
148157

149158
- name: Build wheels
150159
run: python -m cibuildwheel --output-dir wheelhouse
@@ -156,9 +165,9 @@ jobs:
156165
CARGO_NET_GIT_FETCH_WITH_CLI: true
157166
CIBW_ENVIRONMENT_PASS_LINUX: CARGO_NET_GIT_FETCH_WITH_CLI
158167

159-
- uses: actions/upload-artifact@v3 # Don't upgrade to v4; broken: https://github.com/actions/upload-artifact#breaking-changes
168+
- uses: actions/upload-artifact@v4
160169
with:
161-
name: Wheel
170+
name: Wheel-${{ matrix.os }}-${{ matrix.arch }}
162171
path: ./wheelhouse/*.whl
163172

164173
build-sdist:
@@ -177,7 +186,7 @@ jobs:
177186
- name: Build sdist
178187
run: python -m build --sdist
179188

180-
- uses: actions/upload-artifact@v3 # Don't upgrade to v4; broken: https://github.com/actions/upload-artifact#breaking-changes
189+
- uses: actions/upload-artifact@v4
181190
with:
182191
name: Sdist
183192
path: dist/*.tar.gz
@@ -194,17 +203,23 @@ jobs:
194203
runs-on: ubuntu-latest
195204
steps:
196205
- name: Download all workflow run artifacts
197-
uses: actions/download-artifact@v3 # Don't upgrade to v4, it should match upload-artifact
206+
uses: actions/download-artifact@v4
198207
- name: Build a tarball for the debs
199-
run: tar -cvJf debs.tar.xz debs
208+
# We need to merge all the debs uploads into one folder, then compress
209+
# that.
210+
run: |
211+
mkdir debs
212+
mv debs*/* debs/
213+
tar -cvJf debs.tar.xz debs
200214
- name: Attach to release
201-
uses: softprops/action-gh-release@a929a66f232c1b11af63782948aa2210f981808a # PR#109
215+
# Pinned to work around https://github.com/softprops/action-gh-release/issues/445
216+
uses: softprops/action-gh-release@v0.1.15
202217
env:
203218
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204219
with:
205220
files: |
206221
Sdist/*
207-
Wheel/*
222+
Wheel*/*
208223
debs.tar.xz
209224
# if it's not already published, keep the release as a draft.
210225
draft: true

.github/workflows/tests.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,11 @@ jobs:
131131
with:
132132
install-project: "false"
133133

134-
- name: Import order (isort)
135-
run: poetry run isort --check --diff .
134+
- name: Run ruff check
135+
run: poetry run ruff check --output-format=github .
136136

137-
- name: Code style (black)
138-
run: poetry run black --check --diff .
139-
140-
- name: Semantic checks (ruff)
141-
# --quiet suppresses the update check.
142-
run: poetry run ruff check --quiet .
137+
- name: Run ruff format
138+
run: poetry run ruff format --check .
143139

144140
lint-mypy:
145141
runs-on: ubuntu-latest
@@ -401,7 +397,7 @@ jobs:
401397
needs:
402398
- linting-done
403399
- changes
404-
runs-on: ubuntu-20.04
400+
runs-on: ubuntu-22.04
405401
steps:
406402
- uses: actions/checkout@v4
407403

@@ -413,12 +409,12 @@ jobs:
413409
# their build dependencies
414410
- run: |
415411
sudo apt-get -qq update
416-
sudo apt-get -qq install build-essential libffi-dev python-dev \
412+
sudo apt-get -qq install build-essential libffi-dev python3-dev \
417413
libxml2-dev libxslt-dev xmlsec1 zlib1g-dev libjpeg-dev libwebp-dev
418414
419415
- uses: actions/setup-python@v5
420416
with:
421-
python-version: '3.8'
417+
python-version: '3.9'
422418

423419
- name: Prepare old deps
424420
if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true'
@@ -462,7 +458,7 @@ jobs:
462458
runs-on: ubuntu-latest
463459
strategy:
464460
matrix:
465-
python-version: ["pypy-3.8"]
461+
python-version: ["pypy-3.9"]
466462
extras: ["all"]
467463

468464
steps:
@@ -584,11 +580,11 @@ jobs:
584580
strategy:
585581
matrix:
586582
include:
587-
- python-version: "3.8"
583+
- python-version: "3.9"
588584
postgres-version: "11"
589585

590-
- python-version: "3.11"
591-
postgres-version: "15"
586+
- python-version: "3.13"
587+
postgres-version: "17"
592588

593589
services:
594590
postgres:

.github/workflows/twisted_trunk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ jobs:
9999
if: needs.check_repo.outputs.should_run_workflow == 'true'
100100
runs-on: ubuntu-latest
101101
container:
102-
# We're using ubuntu:focal because it uses Python 3.8 which is our minimum supported Python version.
102+
# We're using debian:bullseye because it uses Python 3.9 which is our minimum supported Python version.
103103
# This job is a canary to warn us about unreleased twisted changes that would cause problems for us if
104104
# they were to be released immediately. For simplicity's sake (and to save CI runners) we use the oldest
105105
# version, assuming that any incompatibilities on newer versions would also be present on the oldest.
106-
image: matrixdotorg/sytest-synapse:focal
106+
image: matrixdotorg/sytest-synapse:bullseye
107107
volumes:
108108
- ${{ github.workspace }}:/src
109109

0 commit comments

Comments
 (0)