Skip to content

Commit def7a7b

Browse files
committed
Merge main (frozendict bit reallocation)
MS_TYPE_FROZENDICT took bits 38-39, MS_CONSTR_DECIMAL moved to bit 40.
2 parents 38f7e7c + 4440c96 commit def7a7b

49 files changed

Lines changed: 2745 additions & 314 deletions

Some content is hidden

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

‎.cibuildwheel.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ build = "cp310-* cp311-* cp312-* cp313-* cp314-* cp314t-*"
33
build-frontend = "build[uv]"
44
test-command = "pytest {project}/tests/unit"
55
test-groups = ["test-unit"]
6+
7+
[tool.cibuildwheel.pyodide]
8+
build = "cp314-*"
9+
# https://cibuildwheel.pypa.io/en/stable/platforms/#pyodide
10+
test-command = "python -m pytest {project}/tests/unit"

‎.editorconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*.{py,c,h,rst,yml,yaml,toml,md}]
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style = space
7+
8+
[*.{py,c,h,rst}]
9+
indent_size = 4
10+
11+
[*.{yml,yaml,toml,md}]
12+
indent_size = 2

‎.github/dependabot.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
github-actions:
9+
patterns:
10+
- "*"
11+
cooldown:
12+
default-days: 7

‎.github/workflows/build-wheels.yml‎

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,77 +13,102 @@ on:
1313

1414
jobs:
1515
build-wheels:
16-
name: Build wheels on ${{ matrix.os }} for ${{ matrix.archs }}
17-
runs-on: "${{ matrix.os }}"
16+
name: Build ${{ matrix.wheel.target }}
17+
runs-on: "${{ matrix.wheel.os }}"
1818
permissions:
1919
actions: read
2020
contents: read
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
include:
25-
- os: ubuntu-24.04-arm
24+
wheel:
25+
- target: Linux (aarch64)
26+
os: ubuntu-24.04-arm
2627
archs: aarch64
27-
- os: ubuntu-latest
28+
- target: Linux (x86_64)
29+
os: ubuntu-latest
2830
archs: x86_64
29-
- os: macos-latest
31+
- target: Linux (riscv64)
32+
os: ubuntu-24.04-riscv
33+
archs: riscv64
34+
required-label: build-riscv64
35+
- target: macOS (arm64)
36+
os: macos-latest
3037
archs: arm64
31-
- os: macos-15-intel
38+
- target: macOS (x86_64)
39+
os: macos-15-intel
3240
archs: x86_64
33-
- os: windows-11-arm
41+
- target: Windows (ARM64)
42+
os: windows-11-arm
3443
archs: ARM64
35-
- os: windows-latest
44+
- target: Windows (AMD64)
45+
os: windows-latest
3646
archs: AMD64
47+
- target: Pyodide (wasm32)
48+
os: ubuntu-latest
49+
archs: wasm32
50+
cibw_platform: pyodide
51+
exclude:
52+
- wheel:
53+
target: Linux (riscv64)
54+
os: ubuntu-24.04-riscv
55+
archs: riscv64
56+
# Unlabeled PRs match riscv64's required-label; otherwise empty keeps it.
57+
required-label: >-
58+
${{
59+
github.event_name == 'pull_request' &&
60+
!contains(github.event.pull_request.labels.*.name, 'build-riscv64') &&
61+
'build-riscv64' ||
62+
''
63+
}}
3764
3865
env:
66+
CIBW_ARCHS: "${{ matrix.wheel.archs }}"
67+
CIBW_PLATFORM: "${{ matrix.wheel.cibw_platform || 'auto' }}"
3968
CIBW_SKIP: "${{ !inputs.build-all && '*-musllinux_*' || '' }}"
69+
ARTIFACT_NAME: artifact-wheels-${{ matrix.wheel.cibw_platform || matrix.wheel.os }}-${{ matrix.wheel.archs }}
70+
PACKAGE_DIR: dist/${{ inputs.sdist-name }}
4071

4172
steps:
4273
- name: Checkout code
43-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
74+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4475
with:
4576
persist-credentials: false
4677

4778
- name: Download source distribution
48-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
79+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
4980
with:
5081
name: artifact-sdist
5182
path: dist
5283

5384
- name: Install uv
54-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
85+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
5586
with:
5687
enable-cache: false
5788

5889
# The upstream composite action calls actions/setup-python@v6, which is
5990
# incompatible with the repository's full-SHA pinning requirement.
6091
- name: Build & Test Wheels
6192
if: runner.os != 'Windows'
62-
env:
63-
CIBW_ARCHS: "${{ matrix.archs }}"
64-
PACKAGE_DIR: "dist/${{ inputs.sdist-name }}"
6593
run: >-
66-
uvx --from cibuildwheel==3.2.1
94+
uvx --from cibuildwheel==4.1.0
6795
cibuildwheel
6896
--config-file .cibuildwheel.toml
6997
--output-dir wheelhouse
7098
"${PACKAGE_DIR}"
7199
72100
- name: Build & Test Wheels
73101
if: runner.os == 'Windows'
74-
env:
75-
CIBW_ARCHS: "${{ matrix.archs }}"
76-
PACKAGE_DIR: "dist/${{ inputs.sdist-name }}"
77102
run: >-
78-
uvx --from cibuildwheel==3.2.1
103+
uvx --from cibuildwheel==4.1.0
79104
cibuildwheel
80105
--config-file .cibuildwheel.toml
81106
--output-dir wheelhouse
82107
"$env:PACKAGE_DIR"
83108
84109
- name: Upload artifact
85-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
110+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
86111
with:
87-
name: artifact-wheels-${{ matrix.os }}-${{ matrix.archs }}
112+
name: "${{ env.ARTIFACT_NAME }}"
88113
path: wheelhouse/*.whl
89114
if-no-files-found: error

‎.github/workflows/ci-capability-policy.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ jobs:
2424
contents: read
2525
steps:
2626
- name: Checkout proposed repository
27-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2828
with:
2929
persist-credentials: false
3030
# pull_request_target runs this trusted workflow from the default branch.
31-
# The proposed merge is checked out only to parse its workflow YAML.
31+
# The proposed merge is checked out only to parse workflow YAML as data.
32+
# Do not execute checked-out repository content in this workflow.
3233
ref: "${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.sha }}"
34+
sparse-checkout: .github
35+
allow-unsafe-pr-checkout: true
3336

3437
- name: Audit CI definitions
3538
env:

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ on:
77
pull_request:
88
branches:
99
- main
10+
types:
11+
- opened
12+
- synchronize
13+
- reopened
14+
- labeled
15+
- unlabeled
1016
paths:
1117
# Changes to the package itself
1218
- src/msgspec/**
1319
- pyproject.toml
1420
- setup.py
1521
- MANIFEST.in
1622
# Changes to CI execution
17-
- .github/workflows/ci.yml
18-
- .github/workflows/prepare-build.yml
19-
- .github/workflows/build-wheels.yml
20-
- .github/workflows/profile.yml
21-
- .github/actions/latest-supported-python/action.yml
22-
- .github/actions/fetch-release-history/action.yml
23+
- .github/workflows/*
2324
- .cibuildwheel.toml
2425
- .justfile
2526
# Changes to testing
@@ -74,17 +75,17 @@ jobs:
7475

7576
steps:
7677
- name: Checkout code
77-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
78+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7879
with:
7980
persist-credentials: false
8081

8182
- name: Install Python
82-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
83+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
8384
with:
8485
python-version: "${{ matrix.python-version }}"
8586

8687
- name: Install uv
87-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
88+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
8889
with:
8990
enable-cache: false
9091

@@ -111,7 +112,7 @@ jobs:
111112
find build/temp*/ -name '*.o' -exec gcov -abcu {} +
112113
113114
- name: Upload coverage artifacts
114-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
115+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
115116
with:
116117
name: coverage-${{ matrix.python-version }}-${{ matrix.os }}
117118
path: |-
@@ -133,12 +134,12 @@ jobs:
133134

134135
steps:
135136
- name: Checkout code
136-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
137+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
137138
with:
138139
persist-credentials: false
139140

140141
- name: Download coverage artifacts
141-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
142+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
142143
with:
143144
pattern: coverage-*
144145
path: coverage-files
@@ -147,7 +148,7 @@ jobs:
147148
run: tree -sh coverage-files
148149

149150
- name: Upload Codecov
150-
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
151+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
151152
with:
152153
use_oidc: true
153154
directory: coverage-files
@@ -162,17 +163,17 @@ jobs:
162163

163164
steps:
164165
- name: Checkout code
165-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
166+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
166167
with:
167168
persist-credentials: false
168169

169170
- name: Install Python
170-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
171+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
171172
with:
172173
python-version-file: pyproject.toml
173174

174175
- name: Install uv
175-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
176+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
176177
with:
177178
enable-cache: false
178179

@@ -201,18 +202,6 @@ jobs:
201202
sdist-name: "${{ needs.prepare.outputs.sdist-name }}"
202203
build-all: ${{ github.event_name == 'release' }}
203204

204-
profile:
205-
name: Run profiling tests on Python ${{ needs.prepare.outputs.latest-supported-python }}
206-
needs:
207-
- prepare
208-
- build-wheels
209-
uses: ./.github/workflows/profile.yml
210-
permissions:
211-
actions: read
212-
contents: read
213-
with:
214-
python: "${{ needs.prepare.outputs.latest-supported-python }}"
215-
216205
upload-pypi:
217206
name: Upload artifacts to PyPI
218207
if: github.event_name == 'release' && github.event.action == 'published'
@@ -225,11 +214,11 @@ jobs:
225214
id-token: write
226215

227216
steps:
228-
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
217+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
229218
with:
230219
pattern: artifact-*
231220
merge-multiple: true
232221
path: dist
233222

234223
- name: Publish package distributions to PyPI
235-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
224+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

0 commit comments

Comments
 (0)