Skip to content

Replace PyYAML with astral-yaml in the build and CI scripts - #1453

Merged
jjhelmus merged 1 commit into
ww/deduplicate-needs-toolchainfrom
ww/astral-yaml
Nov 24, 2026
Merged

jjhelmus merged 1 commit into
ww/deduplicate-needs-toolchainfrom
ww/astral-yaml

Conversation

@woodruffw

Copy link
Copy Markdown
Member
Automated notes

Use astral-yaml to load the build configuration and CI matrices. Its YAML 1.2 loader rejects duplicate keys, including the repeated needs_toolchain entry fixed in #1452. The JSON Schema checks are unchanged.

Remove types-pyyaml since astral-yaml ships type stubs. MkDocs still depends on PyYAML. The Linux wheels for astral-yaml 0.0.7 require glibc 2.34 or newer on the build host.

Verified that both parsers produce identical data for all six configuration files and that the new loader rejects the original duplicate. The push and pull request matrices matched for Linux, macOS, and Windows with a fixed Python hash seed. check.py and the CI unit tests passed locally.

@woodruffw
woodruffw added this pull request to stack #1454 November 24, 2026 21:29
@woodruffw
woodruffw marked this pull request as ready for review November 24, 2026 21:32
@woodruffw

Copy link
Copy Markdown
Member Author

It arguably hardly matters here, but astral-yaml is ~96x faster:

YAML input PyYAML SafeLoader astral-yaml Speedup
cpython-unix/targets.yml 15.69 ms 0.139 ms 113×
extension-modules.yml 17.86 ms 0.162 ms 110×
stdlib-test-annotations.yml 59.16 ms 0.567 ms 104×
Three CI YAML files 8.12 ms 0.187 ms 44×
Total 100.82 ms 1.055 ms 96×

@jjhelmus
jjhelmus merged commit 139273f into main Nov 24, 2026
22 checks passed
@jjhelmus
jjhelmus deleted the ww/astral-yaml branch November 24, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants