Skip to content
Draft

gc #7

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
1268 commits
Select commit Hold shift + click to select a range
f2ef252
Update `random.py` to 3.14.5 (#7890)
ShaharNaveh May 17, 2026
8c98871
Update `http` to 3.14.5 (#7892)
ShaharNaveh May 17, 2026
5a5230a
Update `shutil.py` & `zipfile` to 3.14.5 (#7894)
ShaharNaveh May 17, 2026
b432d4c
Update `pickle.py` to 3.14.5 (#7895)
ShaharNaveh May 17, 2026
c77c56d
Update `venv` to 3.14.5 (#7897)
ShaharNaveh May 17, 2026
f4f0350
Update `test_rlcompleter.py` to 3.14.5 (#7898)
ShaharNaveh May 17, 2026
ab72b29
rustix/windows-sys for page size; drop maplit (#7876)
joshuamegnauth54 May 17, 2026
9c188b4
Update `ctypes` to 3.14.5 (#7899)
ShaharNaveh May 17, 2026
ea2a3d9
Build workspace cache (#7889)
ShaharNaveh May 17, 2026
a1a87dc
Add macro for type check functions in c-api (#7871)
bschoenmaeckers May 17, 2026
3ed8c91
Update `test/support` to 3.14.5 (#7896)
ShaharNaveh May 17, 2026
723766e
Don't skip passing ast tests (#7900)
ShaharNaveh May 17, 2026
883ce9d
Update `test_xpickle.py` to 3.14.5 (#7901)
ShaharNaveh May 17, 2026
a4579a9
Update NOP tests to 3.14.5 (#7902)
ShaharNaveh May 19, 2026
20cb884
Add unicode & bytes c-api support (#7904)
bschoenmaeckers May 19, 2026
6e56d93
Add integer c-api support (#7905)
bschoenmaeckers May 19, 2026
e16f1aa
Use correct dirs crate; drop uname for rustix (#7906)
joshuamegnauth54 May 19, 2026
67e66bd
code nits (#7908)
ShaharNaveh May 19, 2026
48ad238
Update some tests to 3.14.5 (#7909)
ShaharNaveh May 19, 2026
150b910
Fix "tried to pop from empty stack" with BlockExpr and const (#7916)
im-0 May 19, 2026
9c05578
Bump cargo-bins/cargo-binstall from 1.19.0 to 1.19.1 (#7917)
dependabot[bot] May 19, 2026
b902ffd
Bump github/gh-aw from 0.71.3 to 0.73.0 (#7918)
dependabot[bot] May 19, 2026
50f235a
Bump nix from 0.31.2 to 0.31.3 in the unix group across 1 directory (…
dependabot[bot] May 19, 2026
1fe4485
Bump siphasher from 1.0.2 to 1.0.3 (#7922)
dependabot[bot] May 19, 2026
5394129
Bump taiki-e/install-action from 2.76.0 to 2.77.6 (#7919)
dependabot[bot] May 19, 2026
e8d7437
Update `test_types.py` to 3.14.5 (#7912)
ShaharNaveh May 19, 2026
d8dee81
Bytecode parity (#7885)
youknowone May 19, 2026
276a0e6
Add tuple support to c-api (#7907)
bschoenmaeckers May 19, 2026
0a2461a
Update `test_grammar.py` to 3.14.5 (#7913)
ShaharNaveh May 19, 2026
c5143aa
Const eval all of version.rs (#7923)
joshuamegnauth54 May 19, 2026
ccf1508
Bump webpack-dev-server from 5.2.1 to 5.2.4 in /wasm/demo (#7924)
dependabot[bot] May 19, 2026
26f5bbf
Add type name c-api functions (#7925)
bschoenmaeckers May 19, 2026
62b081b
Resolve test_inspect bytecode parity gaps (#7926)
youknowone May 19, 2026
cea21f9
Add more c-api error functions (#7915)
bschoenmaeckers May 19, 2026
0063a6d
Align more error messages with CPython 3.14.5 (#7928)
ShaharNaveh May 19, 2026
d51069b
Align load-fast borrow barriers with CPython (#7930)
youknowone May 20, 2026
ae3804f
more hostenv isolation (#7886)
youknowone May 20, 2026
de06fc0
Add eval function to c-api (#7927)
bschoenmaeckers May 20, 2026
ee006af
Align more error messages with CPython 3.14.5 (#7933)
ShaharNaveh May 20, 2026
d073964
Remove unused binaries (#7936)
ShaharNaveh May 20, 2026
4daa526
Update `tzinfo` to 3.14.5 (#7934)
ShaharNaveh May 20, 2026
a6f13b9
Bump openssl from 0.10.79 to 0.10.80 (#7931)
dependabot[bot] May 20, 2026
ae6c160
Add call functions to c-api (#7937)
bschoenmaeckers May 20, 2026
948924a
Align cleanup bytecode layout with CPython (#7935)
youknowone May 20, 2026
a136f90
Add basic dict function to c-api (#7929)
bschoenmaeckers May 21, 2026
c845861
Add bool support to c-api (#7938)
bschoenmaeckers May 21, 2026
06f73f2
Align nested code object bytecode parity (#7942)
youknowone May 21, 2026
ab5bc43
Add float support to c-api (#7943)
bschoenmaeckers May 22, 2026
4eb9534
Add complex number support to c-api (#7945)
bschoenmaeckers May 22, 2026
2a16360
Rustls integration improvements (#7946)
im-0 May 22, 2026
cf3b639
Fix panic in select.select() when too many FDs specified (#7948)
im-0 May 22, 2026
c513b92
Update `test_socketserver.py` to 3.14.5 (#7949)
ShaharNaveh May 22, 2026
1a01393
Update `test_timeout.py` to 3.14.5 (#7950)
ShaharNaveh May 22, 2026
f3b83ef
Update `test_structseq.py` to 3.14.5 (#7951)
ShaharNaveh May 22, 2026
d3272e7
Align codegen metadata with CPython (#7952)
youknowone May 23, 2026
b9efe10
Add missing test for select.select() (#7953)
im-0 May 24, 2026
e1d9a11
Skip flaky tests (#7961)
ShaharNaveh May 24, 2026
b5ff41c
Align marshal and .pyc with CPython 3.14 (#7958)
youknowone May 24, 2026
d7d9365
General code nitpicks (#7955)
ShaharNaveh May 24, 2026
2fabf38
Impl `sys.audithook` (#7960)
ShaharNaveh May 24, 2026
4389254
Bump qs and express in /wasm/demo (#7959)
dependabot[bot] May 24, 2026
7011942
Add `builtin.PythonFinalizationError` (#7966)
ShaharNaveh May 24, 2026
52305c0
Skip flaky test (#7967)
ShaharNaveh May 24, 2026
bc3d00e
Replace `ahash` with `rapidhash` (#7954)
fanninpm May 25, 2026
a5775e0
Fix thread teardown panic when weakref callback fires during cleanup …
JamesClarke7283 May 25, 2026
f9e4988
Bump github/gh-aw from 0.73.0 to 0.74.4 (#7969)
dependabot[bot] May 25, 2026
6bbe24a
Bump zizmorcore/zizmor-action from 0.5.3 to 0.5.6 (#7970)
dependabot[bot] May 25, 2026
0237a1d
Bump taiki-e/install-action from 2.77.6 to 2.79.1 (#7971)
dependabot[bot] May 25, 2026
f4696ea
Bump peaceiris/actions-gh-pages from 4.0.0 to 4.1.0 (#7972)
dependabot[bot] May 25, 2026
a6fee92
Bump the wasmtime group across 1 directory with 2 updates (#7975)
dependabot[bot] May 25, 2026
b696441
Upgrade `pkcs8` to 0.11 (#7977)
ShaharNaveh May 25, 2026
411230a
Bump j178/prek-action from 2.0.3 to 2.0.4 (#7973)
dependabot[bot] May 25, 2026
021c786
docs: expand AGENTS.md with test marker guidance and CI audit notes (…
JamesClarke7283 May 25, 2026
9701c46
Clippy rules (test related) (#7968)
ShaharNaveh May 25, 2026
fb531ec
Bump cranelift in the wasmtime group across 1 directory (#7980)
dependabot[bot] May 26, 2026
3db172c
Update `ensurepip` to 3.14.5 (#7860)
ShaharNaveh May 26, 2026
dd8d250
Add list support to c-api (#7944)
bschoenmaeckers May 26, 2026
dcb273b
Add capsule support to c-api (#7940)
bschoenmaeckers May 26, 2026
ce79cd4
sqlite3: fix Blob.__setitem__ value range validation (#7981)
ever0de May 27, 2026
1cb24c5
Reject non-ASCII digits in JSON numbers (#7982)
teddygood May 27, 2026
f95b746
Autogen opcodes metadata (#7983)
ShaharNaveh May 27, 2026
ca412fc
Add support for creating functions with the c-api (#7984)
bschoenmaeckers May 27, 2026
1a959cf
Align codegen passes and opcode metadata with CPython (#7987)
youknowone May 28, 2026
30ae48b
Support custom `rustls` providers (#7657)
joshuamegnauth54 May 28, 2026
e80a14b
Align more error messages with CPython 3.14.5 (#7988)
ShaharNaveh May 28, 2026
7d54ba5
Fix `ssl-vendor` (OpenSSL) (#7985)
joshuamegnauth54 May 28, 2026
fc637a1
[META] AI policy (#7914)
ShaharNaveh May 28, 2026
1385c4e
rename ssl-vendor (#7989)
youknowone May 28, 2026
938d421
Update some tests to 3.14.5 (#7990)
ShaharNaveh May 30, 2026
26f817a
Fix broken CI (rustc 1.96) (#7992)
ShaharNaveh May 30, 2026
8018ba6
Add errno.EHWPOISON (#7996)
ShaharNaveh May 31, 2026
0e66439
Tests: update test_codecmaps_{cn,hk,jp,kr,tw}, test_pstats, test_prof…
JamesClarke7283 May 31, 2026
1ce37bf
Update `test_file_eintr.py` to 3.14.5 (#7999)
ShaharNaveh May 31, 2026
36a1722
Add agent skill for adding c-api functions (#8001)
bschoenmaeckers Jun 1, 2026
3e1c3bc
impl `_queue` module + Update `multiprocessing` to 3.14.5 (#7994)
ShaharNaveh Jun 1, 2026
885cf5c
Add `set` object functions to c-api (#8002)
bschoenmaeckers Jun 1, 2026
74b4707
Add mapping c-api functions (#8003)
bschoenmaeckers Jun 2, 2026
2c46b69
Add weakref support to c-api (#8006)
bschoenmaeckers Jun 2, 2026
0c9ed36
CI: Don't skip windows tests (#8004)
ShaharNaveh Jun 2, 2026
6a860b6
Update some tests to 3.14.5 (#7991)
ShaharNaveh Jun 2, 2026
a781980
Update `importlib` to 3.14.5 (#8013)
ShaharNaveh Jun 2, 2026
14cb5dd
Remove node24 installation. It's the default now (#8014)
ShaharNaveh Jun 2, 2026
ef74577
Bump codecov/codecov-action from 6.0.0 to 6.0.1 (#7979)
dependabot[bot] Jun 2, 2026
b5b8258
Update `test_super.py` to 3.14.5 (#8015)
ShaharNaveh Jun 2, 2026
5b2f6bc
Add sequence protocol to the c-api (#8016)
bschoenmaeckers Jun 2, 2026
8e35cc9
Update `asyncio` to 3.14.5 (#8012)
ShaharNaveh Jun 2, 2026
60b1346
Add number protocol functions (#8005)
bschoenmaeckers Jun 3, 2026
ad88d5a
Add slice functions to c-api (#8019)
bschoenmaeckers Jun 3, 2026
37fd1dd
Add bytesarray support to the c-api (#8009)
bschoenmaeckers Jun 3, 2026
6b2bdd9
Update `turtle.py` to 3.14.5 (#8017)
ShaharNaveh Jun 3, 2026
0862451
Update random and cryptography crates (#8010)
joshuamegnauth54 Jun 3, 2026
474758d
Add warning functions to c-api (#8020)
bschoenmaeckers Jun 3, 2026
0eb23ba
Bump github/gh-aw from 0.74.4 to 0.76.1 (#8021)
dependabot[bot] Jun 3, 2026
9f915f7
Bump taiki-e/install-action from 2.79.1 to 2.79.9 (#8022)
dependabot[bot] Jun 3, 2026
56b0715
Bump the wasmtime group across 1 directory with 3 updates (#8023)
dependabot[bot] Jun 3, 2026
e840544
Bump https://github.com/astral-sh/ruff-pre-commit (#8024)
dependabot[bot] Jun 3, 2026
376c4f1
Update thread related tests to 3.14.5 (#8018)
ShaharNaveh Jun 3, 2026
c5f555e
Fix WASM memory allocation failure (#4989) (#7887)
alok-108 Jun 3, 2026
23ba8d6
Update `test_sys{log,_settrace}.py` to 3.14.5 (#8030)
ShaharNaveh Jun 3, 2026
57d1695
Add basic module functions to c-api (#8032)
bschoenmaeckers Jun 3, 2026
f43ae46
xz (#7756)
youknowone Jun 3, 2026
c061013
Add `PyDictProxy_New` to the c-api (#8033)
bschoenmaeckers Jun 3, 2026
0f44672
Bump junction from 1.4.2 to 2.0.0 (#8027)
dependabot[bot] Jun 3, 2026
c2ed8d7
Bump libsqlite3-sys from 0.37.0 to 0.38.0 (#8029)
dependabot[bot] Jun 3, 2026
a0bc9a7
Bump log from 0.4.29 to 0.4.30 (#8036)
dependabot[bot] Jun 4, 2026
99bfbad
Bump memchr from 2.8.0 to 2.8.1 (#8038)
dependabot[bot] Jun 4, 2026
9cc37cd
Bump socket2 from 0.6.3 to 0.6.4 (#8039)
dependabot[bot] Jun 4, 2026
a8e8ba1
Bump xml from 1.2.1 to 1.3.0 (#8037)
dependabot[bot] Jun 4, 2026
d82250b
Bump constant_time_eq from 0.4.2 to 0.5.0 (#8028)
dependabot[bot] Jun 4, 2026
dec9942
Add iter support to c-api (#8035)
bschoenmaeckers Jun 4, 2026
51c97b9
Bump taiki-e/install-action from 2.79.9 to 2.79.10 (#8026)
dependabot[bot] Jun 4, 2026
fb422da
Add `set_attrs!` macro for setting multiple attributes on an object (…
ShaharNaveh Jun 9, 2026
c13db75
General code nits (#8041)
ShaharNaveh Jun 10, 2026
52afc12
Add more object functions to c-api (#8042)
bschoenmaeckers Jun 10, 2026
a575121
Add more dict functions to c-api (#8043)
bschoenmaeckers Jun 10, 2026
ee4e720
Add more unicode functions to c-api (#8044)
bschoenmaeckers Jun 10, 2026
19ca508
Add more list functions to the c-api (#8045)
bschoenmaeckers Jun 10, 2026
16f661e
Bump uuid from 1.23.1 to 1.23.2 (#8046)
dependabot[bot] Jun 10, 2026
3ea3780
Bump lz4_flex from 0.13.0 to 0.13.1 (#8047)
dependabot[bot] Jun 10, 2026
9f05508
Bump rustls-native-certs from 0.8.3 to 0.8.4 (#8049)
dependabot[bot] Jun 10, 2026
28addda
more clippy rules (#8050)
ShaharNaveh Jun 10, 2026
c864885
Add `_blake2` consts (#8053)
ShaharNaveh Jun 10, 2026
a50880e
Update `test_code.py` to 3.14.5 (#8054)
ShaharNaveh Jun 10, 2026
7f75ef1
`scripts/update_lib migrate` to preserve patches on classes (#8057)
ShaharNaveh Jun 10, 2026
b77ada9
Code nitpicks (#8058)
ShaharNaveh Jun 11, 2026
b25155e
Add `_heapq` module (#8059)
ShaharNaveh Jun 11, 2026
50eb2b4
Bump taiki-e/install-action from 2.79.10 to 2.81.1 (#8060)
dependabot[bot] Jun 11, 2026
2450a7b
Bump github/gh-aw from 0.76.1 to 0.77.5 (#8062)
dependabot[bot] Jun 11, 2026
65a2c1d
Skip flakey windows test (#8063)
ShaharNaveh Jun 11, 2026
11e1471
Bump https://github.com/astral-sh/ruff-pre-commit (#8061)
dependabot[bot] Jun 11, 2026
110f27b
Convert claude skills to more generic agent skills (#8064)
bschoenmaeckers Jun 11, 2026
d8380f7
Fix `test_tty.py` tests (#8065)
ShaharNaveh Jun 11, 2026
e452be9
Conditionally skip `test_pty` tests (#8066)
ShaharNaveh Jun 11, 2026
e45bc44
Remove stale patches from `test_traceback.py` (#8068)
ShaharNaveh Jun 11, 2026
4bc80c8
Bump shell-quote from 1.8.2 to 1.8.4 in /wasm/demo (#8069)
dependabot[bot] Jun 11, 2026
ec60bda
Update `pdb.py` to 3.14.5 (#8070)
ShaharNaveh Jun 11, 2026
0f36637
Don't skip test in `test_typing.py` (#8073)
ShaharNaveh Jun 11, 2026
3a81361
Update some tests to 3.14.5 (#8072)
ShaharNaveh Jun 11, 2026
9259d22
Avoid callable iterator deadlock during sentinel comparison (#8040)
doma17 Jun 11, 2026
27fbe24
Don't skip test in `test_tempfile.py` on all platforms (#8067)
ShaharNaveh Jun 11, 2026
65dee6c
Skip flaky asyncio tests (#8075)
ShaharNaveh Jun 11, 2026
f38b8b8
Bump targeted CPython version to 3.14.6 (#8074)
ShaharNaveh Jun 12, 2026
b35c5c3
Remove redundant `to_owned()` calls (#8077)
ShaharNaveh Jun 12, 2026
1526a06
`TODO: Flaky test` -> `TODO: RUSTPYTHON; Flaky test` (#8078)
ShaharNaveh Jun 12, 2026
61f4961
Bump the wasmtime group across 1 directory with 2 updates (#8079)
dependabot[bot] Jun 12, 2026
1ff05a4
Bump chrono from 0.4.44 to 0.4.45 (#8080)
dependabot[bot] Jun 12, 2026
0fe0c70
Bump libsqlite3-sys from 0.38.0 to 0.38.1 (#8081)
dependabot[bot] Jun 12, 2026
f92eed5
Bump bitflags from 2.11.1 to 2.12.1 (#8082)
dependabot[bot] Jun 12, 2026
ac3d442
Update `pyrepl` to 3.14.5 (#7823)
ShaharNaveh Jun 12, 2026
d18d35f
cleanup the signals module (#8076)
ShaharNaveh Jun 12, 2026
404ee2a
Update some of changed libs and tests from `3.14.5` -> `3.14.6` (part…
ShaharNaveh Jun 12, 2026
057e968
Update some of changed libs and tests from `3.14.5` -> `3.14.6` (part…
ShaharNaveh Jun 12, 2026
fa84378
Update some of changed libs and tests from `3.14.5` -> `3.14.6` (part…
ShaharNaveh Jun 12, 2026
be6017c
Update doc DB for CPython 3.14.6 (#8088)
github-actions[bot] Jun 12, 2026
1abbde3
Newtype SignalHandlers (#8089)
ShaharNaveh Jun 14, 2026
c77d553
Bump cranelift in the wasmtime group across 1 directory (#8090)
dependabot[bot] Jun 14, 2026
468eb73
Bump uuid from 1.23.2 to 1.23.3 (#8091)
dependabot[bot] Jun 14, 2026
4493abe
Bump which from 8.0.2 to 8.0.3 (#8092)
dependabot[bot] Jun 14, 2026
0dd90fc
Bump log from 0.4.31 to 0.4.32 (#8093)
dependabot[bot] Jun 14, 2026
a7c1509
Bump pyo3 from 0.28.3 to 0.29.0 (#8094)
dependabot[bot] Jun 14, 2026
e423160
Fix most of `unicodedata`; unmask multiple tests (#7947)
joshuamegnauth54 Jun 14, 2026
3f5d23d
Get all builtin types dynamiclly (#8095)
ShaharNaveh Jun 15, 2026
370fc76
Newtype SigalNum (#8096)
ShaharNaveh Jun 15, 2026
a0fcafd
host_env: Use Rustix for copy_file_range (#8099)
joshuamegnauth54 Jun 15, 2026
12f8b77
Update `libregtest` to 3.14.6 (#8100)
ShaharNaveh Jun 15, 2026
eccbc5e
Update `xml` to 3.14.6 (#8101)
ShaharNaveh Jun 15, 2026
1dc57e8
Update some libs to 3.14.6 (#8102)
ShaharNaveh Jun 15, 2026
c0e3066
Reduce number of string clones when compiling python source code (#8103)
ShaharNaveh Jun 15, 2026
880040d
clippy `significant_drop_in_scrutinee` & `explicit_deref_methods` (#8…
ShaharNaveh Jun 15, 2026
dbfd69e
Update `idlelib` to 3.14.6 (#8105)
ShaharNaveh Jun 15, 2026
6ba2097
Dedent -c command-line parameter value (#8056)
roryyorke Jun 16, 2026
4ba1807
Update doc DB for CPython 3.14.6 (#8106)
github-actions[bot] Jun 16, 2026
d2907b9
Bump https://github.com/astral-sh/ruff-pre-commit (#8110)
dependabot[bot] Jun 16, 2026
4c04731
Bump actions/checkout from 6.0.2 to 6.0.3 (#8111)
dependabot[bot] Jun 16, 2026
984f280
Bump cargo-bins/cargo-binstall from 1.19.1 to 1.20.0 (#8112)
dependabot[bot] Jun 16, 2026
a4a2f41
Bump codecov/codecov-action from 6.0.1 to 7.0.0 (#8113)
dependabot[bot] Jun 16, 2026
80ab37f
Bump memchr from 2.8.1 to 2.8.2 (#8114)
dependabot[bot] Jun 16, 2026
3aa94d8
Bump taiki-e/install-action from 2.81.1 to 2.81.8 (#8115)
dependabot[bot] Jun 16, 2026
808b071
Fix builtin class names not being interned (#8116)
ShaharNaveh Jun 16, 2026
2ee463d
Bump launch-editor from 2.10.0 to 2.14.1 in /wasm/demo (#8119)
dependabot[bot] Jun 16, 2026
08a1d6f
Use KwArgs newtype struct (#8120)
ShaharNaveh Jun 16, 2026
4b0d6b6
host_env: `renameat` support for `os.rename` (#8118)
joshuamegnauth54 Jun 17, 2026
3e047bd
clippy `enum_glob_use` (#8121)
ShaharNaveh Jun 17, 2026
23e076a
Clippy `ref_option` (#8122)
ShaharNaveh Jun 17, 2026
93fbe4f
More clippy rules (#8123)
ShaharNaveh Jun 17, 2026
fe2a7db
Bump the openssl group across 1 directory with 2 updates (#8124)
dependabot[bot] Jun 17, 2026
6a786a7
General code nits (#8107)
ShaharNaveh Jun 22, 2026
0f539cc
Support csv writer QUOTE_STRINGS and QUOTE_NOTNULL (#8109)
doma17 Jun 22, 2026
4b70b01
Skip flaky test at `test_thread.py` (#8125)
ShaharNaveh Jun 22, 2026
2e6ca88
Align patches at `test_types.py` (#8126)
ShaharNaveh Jun 22, 2026
a826600
More clippy rules (#8127)
ShaharNaveh Jun 22, 2026
d748c12
Bump insta from 1.47.2 to 1.48.0 (#8130)
dependabot[bot] Jun 22, 2026
be10ab0
Add stdlib to c-api (#8133)
bschoenmaeckers Jun 22, 2026
828cf21
Replace `&String` -> `&str` (#8136)
ShaharNaveh Jun 22, 2026
8214c90
Fix symtable type_param_block name (#8137)
ShaharNaveh Jun 22, 2026
9bb6ba8
General code nits (#8135)
ShaharNaveh Jun 22, 2026
55b96f9
Run windows tests with `-u all` (#8134)
ShaharNaveh Jun 22, 2026
83beb3e
Use `ast::visitor::Visitor` for collection annotations (#8139)
ShaharNaveh Jun 22, 2026
94ecb56
Bump webpack-dev-server from 5.2.4 to 5.2.5 in /wasm/demo (#8140)
dependabot[bot] Jun 22, 2026
73b0c9f
Remove duplicated code in `compile.rs` (#8141)
ShaharNaveh Jun 22, 2026
18dc6b3
Newtype for `[ir::Block]` (#8142)
ShaharNaveh Jun 22, 2026
af6b517
Implement `collections.defaultdict` in rust (#8132)
ShaharNaveh Jun 23, 2026
efa585b
Bump https://github.com/astral-sh/ruff-pre-commit (#8143)
dependabot[bot] Jun 23, 2026
2e40f78
Bump github/gh-aw from 0.77.5 to 0.79.9 (#8144)
dependabot[bot] Jun 23, 2026
05ff78e
Bump https://github.com/rbubley/mirrors-prettier from v3.8.3 to 3.8.4…
dependabot[bot] Jun 23, 2026
83e3399
Bump the malachite group across 1 directory with 3 updates (#8146)
dependabot[bot] Jun 23, 2026
838b0c4
Bump getrandom in the random group across 1 directory (#8149)
dependabot[bot] Jun 23, 2026
83799fc
Bump webpki-roots in the webpki-root group across 1 directory (#8150)
dependabot[bot] Jun 23, 2026
e629857
Bump which from 8.0.3 to 8.0.4 (#8151)
dependabot[bot] Jun 23, 2026
15a754f
Use `stable` toolchain when updating caches (#8153)
ShaharNaveh Jun 23, 2026
8905b80
Move some of free standing functions to be `ir::Blocks` method (#8154)
ShaharNaveh Jun 23, 2026
39a2fda
unicodedata: Remove UnicodeVersion struct (#8131)
joshuamegnauth54 Jun 24, 2026
c5f318a
Add remaining float functions to c-apo (#8157)
bschoenmaeckers Jun 25, 2026
9acc473
Bump taiki-e/install-action from 2.81.8 to 2.81.11 (#8147)
dependabot[bot] Jun 25, 2026
870ad2d
Move some of free standing functions to be ir::Blocks methods (part 2…
ShaharNaveh Jun 25, 2026
6938f36
Add more number functions to c-api (#8158)
bschoenmaeckers Jun 25, 2026
41d6dab
Update ensurepip to 26.1.2 (cpython 3.14.6) (#8163)
ShaharNaveh Jun 25, 2026
4f9754b
Update `test_repl.py` to 3.14.6 (#8164)
ShaharNaveh Jun 25, 2026
89c46bf
Update `test_tempfile.py` to 3.14.6 (#8165)
ShaharNaveh Jun 25, 2026
23e2723
Update `test_ssl.py` to 3.1.46 (#8166)
ShaharNaveh Jun 25, 2026
4d3ddac
Update some tests to 3.14.6 (#8167)
ShaharNaveh Jun 25, 2026
dda5516
Add allocator functions to c-api (#8168)
bschoenmaeckers Jun 25, 2026
c876709
Add more mapping functions to c-api (#8169)
bschoenmaeckers Jun 25, 2026
3b4c5f6
Align compiler and AST behavior with CPython (#8138)
youknowone Jun 26, 2026
2a344a5
Update `test_subprocess.py` to 3.14.6 (#8171)
ShaharNaveh Jun 26, 2026
83ce1a7
Update `test/signalinterproctester.py` to 3.14.6 (#8173)
ShaharNaveh Jun 26, 2026
c449564
Add more object c-api's (#8170)
bschoenmaeckers Jun 26, 2026
0009dd6
Clean up compiler parity leftovers (#8174)
youknowone Jun 26, 2026
f28ea16
Fix GC weakref clearing order
youknowone Jun 26, 2026
574e86a
Run CDPT in cooperative collection mode
youknowone Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_ssl.py to 3.1.46 (RustPython#8166)
* Update `test_ssl.py` to 3.14.6

* Add `Lib/test/ssltests.py`

* Mark failing test correctly
  • Loading branch information
ShaharNaveh authored Jun 25, 2026
commit 23e27236d8422f5547e0607af2de1c297da3a5ec
37 changes: 37 additions & 0 deletions Lib/test/ssltests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Convenience test module to run all of the OpenSSL-related tests in the
# standard library.

import ssl
import sys
import subprocess

TESTS = [
'test_asyncio', 'test_ensurepip.py', 'test_ftplib', 'test_hashlib',
'test_hmac', 'test_httplib', 'test_imaplib',
'test_poplib', 'test_ssl', 'test_smtplib', 'test_smtpnet',
'test_urllib2_localnet', 'test_venv', 'test_xmlrpc'
]

def run_regrtests(*extra_args):
print(ssl.OPENSSL_VERSION)
args = [
sys.executable,
'-Werror', '-bb', # turn warnings into exceptions
'-m', 'test',
]
if not extra_args:
args.extend([
'-r', # randomize
'-w', # re-run failed tests with -v
'-u', 'network', # use network
'-u', 'urlfetch', # download test vectors
'-j', '0' # use multiple CPUs
])
else:
args.extend(extra_args)
args.extend(TESTS)
result = subprocess.call(args)
sys.exit(result)

if __name__ == '__main__':
run_regrtests(*sys.argv[1:])
254 changes: 232 additions & 22 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test the support for SSL and sockets

import contextlib
import sys
import unittest
import unittest.mock
Expand Down Expand Up @@ -47,9 +48,20 @@

PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
HOST = socket_helper.HOST
IS_AWS_LC = "AWS-LC" in ssl.OPENSSL_VERSION
IS_OPENSSL_3_0_0 = ssl.OPENSSL_VERSION_INFO >= (3, 0, 0)
PY_SSL_DEFAULT_CIPHERS = sysconfig.get_config_var('PY_SSL_DEFAULT_CIPHERS')

HAS_KEYLOG = hasattr(ssl.SSLContext, 'keylog_filename')
requires_keylog = unittest.skipUnless(
HAS_KEYLOG, 'test requires OpenSSL 1.1.1 with keylog callback')
CAN_SET_KEYLOG = HAS_KEYLOG and os.name != "nt"
requires_keylog_setter = unittest.skipUnless(
CAN_SET_KEYLOG,
"cannot set 'keylog_filename' on Windows"
)


PROTOCOL_TO_TLS_VERSION = {}
for proto, ver in (
("PROTOCOL_SSLv3", "SSLv3"),
Expand Down Expand Up @@ -258,26 +270,67 @@ def utc_offset(): #NOTE: ignore issues like #1647654
)


def test_wrap_socket(sock, *,
cert_reqs=ssl.CERT_NONE, ca_certs=None,
ciphers=None, certfile=None, keyfile=None,
**kwargs):
if not kwargs.get("server_side"):
kwargs["server_hostname"] = SIGNED_CERTFILE_HOSTNAME
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
else:
def make_test_context(
*,
server_side=False,
check_hostname=None,
cert_reqs=ssl.CERT_NONE,
ca_certs=None, certfile=None, keyfile=None,
ciphers=None,
min_version=None, max_version=None,
):
if server_side:
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
if cert_reqs is not None:
else:
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)

if check_hostname is None:
if cert_reqs == ssl.CERT_NONE:
context.check_hostname = False
else:
context.check_hostname = check_hostname

if cert_reqs is not None:
context.verify_mode = cert_reqs

if ca_certs is not None:
context.load_verify_locations(ca_certs)
if certfile is not None or keyfile is not None:
context.load_cert_chain(certfile, keyfile)

if ciphers is not None:
context.set_ciphers(ciphers)
return context.wrap_socket(sock, **kwargs)

if min_version is not None:
context.minimum_version = min_version
if max_version is not None:
context.maximum_version = max_version

return context


def test_wrap_socket(
sock,
*,
server_side=False,
check_hostname=None,
cert_reqs=ssl.CERT_NONE,
ca_certs=None, certfile=None, keyfile=None,
ciphers=None,
min_version=None, max_version=None,
**kwargs,
):
context = make_test_context(
server_side=server_side,
check_hostname=check_hostname,
cert_reqs=cert_reqs,
ca_certs=ca_certs, certfile=certfile, keyfile=keyfile,
ciphers=ciphers,
min_version=min_version, max_version=max_version,
)
if not server_side:
kwargs.setdefault("server_hostname", SIGNED_CERTFILE_HOSTNAME)
return context.wrap_socket(sock, server_side=server_side, **kwargs)


USE_SAME_TEST_CONTEXT = False
Expand Down Expand Up @@ -317,6 +370,20 @@ def testing_context(server_cert=SIGNED_CERTFILE, *, server_chain=True):
return client_context, server_context, hostname


def do_ssl_object_handshake(sslobject, outgoing, max_retry=25):
"""Call do_handshake() on the sslobject and return the sent data.

If do_handshake() fails more than *max_retry* times, return None.
"""
data, attempt = None, 0
while not data and attempt < max_retry:
with contextlib.suppress(ssl.SSLWantReadError):
sslobject.do_handshake()
data = outgoing.read()
attempt += 1
return data


class BasicSocketTests(unittest.TestCase):

def test_constants(self):
Expand Down Expand Up @@ -698,6 +765,7 @@ def test_dealloc_warn(self):
support.gc_collect()
self.assertIn(r, str(cm.warning.args[0]))

@unittest.expectedFailureIf(sys.platform == "android", "TODO: RUSTPYTHON; TypeError: path should be string, bytes, os.PathLike or integer, not NoneType")
def test_get_default_verify_paths(self):
paths = ssl.get_default_verify_paths()
self.assertEqual(len(paths), 6)
Expand Down Expand Up @@ -1035,7 +1103,6 @@ def test_hostname_checks_common_name(self):
with self.assertRaises(AttributeError):
ctx.hostname_checks_common_name = True

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <TLSVersion.TLSv1_2: 771> not found in {<TLSVersion.TLSv1: 769>, <TLSVersion.TLSv1_1: 770>, <TLSVersion.SSLv3: 768>}
@ignore_deprecation
def test_min_max_version(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
Expand Down Expand Up @@ -1089,7 +1156,12 @@ def test_min_max_version(self):
ctx.maximum_version = ssl.TLSVersion.MINIMUM_SUPPORTED
self.assertIn(
ctx.maximum_version,
{ssl.TLSVersion.TLSv1, ssl.TLSVersion.TLSv1_1, ssl.TLSVersion.SSLv3}
{
ssl.TLSVersion.TLSv1,
ssl.TLSVersion.TLSv1_1,
ssl.TLSVersion.TLSv1_2,
ssl.TLSVersion.SSLv3,
}
)

ctx.minimum_version = ssl.TLSVersion.MAXIMUM_SUPPORTED
Expand Down Expand Up @@ -1410,6 +1482,50 @@ def dummycallback(sock, servername, ctx):
ctx.set_servername_callback(None)
ctx.set_servername_callback(dummycallback)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: Expected 'mock' to not have been called. Called 1 times.
def test_sni_callback_on_dead_references(self):
# See https://github.com/python/cpython/issues/146080.
c_ctx = make_test_context()
c_inc, c_out = ssl.MemoryBIO(), ssl.MemoryBIO()
client = c_ctx.wrap_bio(c_inc, c_out, server_hostname=SIGNED_CERTFILE_HOSTNAME)

def sni_callback(sock, servername, ctx): pass
sni_callback = unittest.mock.Mock(wraps=sni_callback)
s_ctx = make_test_context(server_side=True, certfile=SIGNED_CERTFILE)
s_ctx.set_servername_callback(sni_callback)

s_inc, s_out = ssl.MemoryBIO(), ssl.MemoryBIO()
server = s_ctx.wrap_bio(s_inc, s_out, server_side=True)
server_impl = server._sslobj

# Perform the handshake on the client side first.
data = do_ssl_object_handshake(client, c_out)
sni_callback.assert_not_called()
if data is None:
self.skipTest("cannot establish a handshake from the client")
s_inc.write(data)
sni_callback.assert_not_called()
# Delete the server object before it starts doing its handshake
# and ensure that we did not call the SNI callback yet.
del server
gc.collect()
# Try to continue the server's handshake by directly using
# the internal SSL object. The latter is a weak reference
# stored in the server context and has now a dead owner.
with self.assertRaises(ssl.SSLError) as cm:
server_impl.do_handshake()
# The SNI C callback raised an exception before calling our callback.
sni_callback.assert_not_called()

# In AWS-LC, any handshake failures reports SSL_R_PARSE_TLSEXT,
# while OpenSSL uses SSL_R_CALLBACK_FAILED on SNI callback failures.
if IS_AWS_LC:
libssl_error_reason = "PARSE_TLSEXT"
else:
libssl_error_reason = "callback failed"
self.assertIn(libssl_error_reason, str(cm.exception))
self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_SSL)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <SSLContext(protocol=17)> is not None
def test_sni_callback_refcycle(self):
# Reference cycles through the servername callback are detected
Expand All @@ -1423,6 +1539,59 @@ def dummycallback(sock, servername, ctx, cycle=ctx):
gc.collect()
self.assertIs(wr(), None)

@unittest.skipUnless(support.Py_GIL_DISABLED,
"test is only useful if the GIL is disabled")
@threading_helper.requires_working_threading()
def test_sni_callback_race(self):
# Replacing sni_callback while handshakes are in-flight must not
# crash (use-after-free on the callback in free-threaded builds).
client_ctx, server_ctx, hostname = testing_context()

server_ctx.sni_callback = lambda *a: None
done = threading.Event()

def do_handshakes():
while not done.is_set():
c_in = ssl.MemoryBIO()
c_out = ssl.MemoryBIO()
s_in = ssl.MemoryBIO()
s_out = ssl.MemoryBIO()
client = client_ctx.wrap_bio(
c_in, c_out, server_hostname=hostname)
server = server_ctx.wrap_bio(s_in, s_out, server_side=True)
for _ in range(50):
try:
client.do_handshake()
except ssl.SSLWantReadError:
pass
except ssl.SSLError:
break
if c_out.pending:
s_in.write(c_out.read())
try:
server.do_handshake()
except ssl.SSLWantReadError:
pass
except ssl.SSLError:
break
if s_out.pending:
c_in.write(s_out.read())

def toggle_callback():
while not done.is_set():
server_ctx.sni_callback = lambda *a: None
server_ctx.sni_callback = None

workers = max(4, (os.cpu_count() or 4) * 2)
threads = [threading.Thread(target=do_handshakes)
for _ in range(workers)]
threads.append(threading.Thread(target=toggle_callback))

with threading_helper.catch_threading_exception() as cm:
with threading_helper.start_threads(threads):
done.set()
self.assertIsNone(cm.exc_value)

def test_cert_store_stats(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
self.assertEqual(ctx.cert_store_stats(),
Expand Down Expand Up @@ -1665,6 +1834,39 @@ def test_num_tickest(self):
with self.assertRaises(ValueError):
ctx.num_tickets = 1

@support.cpython_only
def test_refcycle_msg_callback(self):
# See https://github.com/python/cpython/issues/142516.
ctx = make_test_context()
def msg_callback(*args, _=ctx, **kwargs): ...
ctx._msg_callback = msg_callback

@support.cpython_only
@requires_keylog_setter
def test_refcycle_keylog_filename(self):
# See https://github.com/python/cpython/issues/142516.
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
ctx = make_test_context()
class KeylogFilename(str): ...
ctx.keylog_filename = KeylogFilename(os_helper.TESTFN)
ctx.keylog_filename._ = ctx

@support.cpython_only
@unittest.skipUnless(ssl.HAS_PSK, 'requires TLS-PSK')
def test_refcycle_psk_client_callback(self):
# See https://github.com/python/cpython/issues/142516.
ctx = make_test_context()
def psk_client_callback(*args, _=ctx, **kwargs): ...
ctx.set_psk_client_callback(psk_client_callback)

@support.cpython_only
@unittest.skipUnless(ssl.HAS_PSK, 'requires TLS-PSK')
def test_refcycle_psk_server_callback(self):
# See https://github.com/python/cpython/issues/142516.
ctx = make_test_context(server_side=True)
def psk_server_callback(*args, _=ctx, **kwargs): ...
ctx.set_psk_server_callback(psk_server_callback)


class SSLErrorTests(unittest.TestCase):

Expand Down Expand Up @@ -4922,10 +5124,6 @@ def test_internal_chain_server(self):
self.assertEqual(res, b'\x02\n')


HAS_KEYLOG = hasattr(ssl.SSLContext, 'keylog_filename')
requires_keylog = unittest.skipUnless(
HAS_KEYLOG, 'test requires OpenSSL 1.1.1 with keylog callback')

class TestSSLDebug(unittest.TestCase):

def keylog_lines(self, fname=os_helper.TESTFN):
Expand Down Expand Up @@ -5164,15 +5362,27 @@ def non_linux_skip_if_other_okay_error(self, err):
return # Expect the full test setup to always work on Linux.
if (isinstance(err, ConnectionResetError) or
(isinstance(err, OSError) and err.errno == errno.EINVAL) or
re.search('wrong.version.number', str(getattr(err, "reason", "")), re.I)):
re.search(
# Matches the following error messages:
# '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)'
# '[SSL: RECORD_LAYER_FAILURE] record layer failure (_ssl.c:1109)'
# '[SSL: HTTP_REQUEST] http request (_ssl.c:1143)'
r'wrong.version.number|record.layer.failure|http.request',
str(getattr(err, "reason", "")),
re.IGNORECASE,
)
):
# On Windows the TCP RST leads to a ConnectionResetError
# (ECONNRESET) which Linux doesn't appear to surface to userspace.
# If wrap_socket() winds up on the "if connected:" path and doing
# the actual wrapping... we get an SSLError from OpenSSL. Typically
# WRONG_VERSION_NUMBER. While appropriate, neither is the scenario
# we're specifically trying to test. The way this test is written
# is known to work on Linux. We'll skip it anywhere else that it
# does not present as doing so.
# the actual wrapping... we get an SSLError from OpenSSL. This is
# typically WRONG_VERSION_NUMBER. The same happens on iOS, but
# RECORD_LAYER_FAILURE or HTTP_REQUEST is the error.
#
# While appropriate, these scenarios aren't what we're specifically
# trying to test. The way this test is written is known to work on
# Linux. We'll skip it anywhere else that it does not present as
# doing so.
try:
self.skipTest(f"Could not recreate conditions on {sys.platform}:"
f" {err=}")
Expand Down