Update hashlib to Python 3.14.2 #6862
Draft
+293
−195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates
hashlibmodule and tests to Python 3.14.2 compatibility.Changes
Updated
Lib/hashlib.pyandLib/test/test_hashlib.pyfrom CPython v3.14.2 usingupdate_libtooling, preserving 10 RustPython TODO markersCreated
_sha2module (crates/stdlib/src/sha2.rs): Python 3.14 consolidated_sha256and_sha512into a single_sha2module providing all SHA-2 family functions (sha224, sha256, sha384, sha512)Added
openssl_md_meth_namesattribute to_hashlibmodule: Returns frozenset of available hash algorithms, required by Python 3.14'shashlib.pyto populatealgorithms_availableTest Status
82 tests run: 8 expected failures (matching TODO markers), 2 TODO tests skipped (urlfetch disabled), 15 platform/resource skips.
Original prompt
This section details on the original issue you should resolve
<issue_title>Upgrade Python libraries and test from Python 3.14</issue_title>
<issue_description>## Summary
Check
scripts/update_libfor tools. As a note, the current latest Python version isv3.14.2.Previous versions' issues as reference
Details
2026-01-24
-...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.