Issue ·
This Week in Python
This was a security-heavy week, with expedited and security releases across Python 3.11 through 3.15 fixing compromised eMudhra CA keys and tarfile issues. Upgrading now is strongly advised, ahead of the routine PEP changes, which include the new PEP 851 draft.
New proposals 1
PEP 851 Draft 3.16
Add list.discard()
A proposed list.discard(x) method would remove the first matching item if present and do nothing otherwise, avoiding the need to wrap list.remove() in a membership check or try block. It is still a draft, so it is not available yet.
lst = [1, 2, 3]
lst.discard(2)
lst.discard(9) # does nothing
Updates 1
PEP 832
Draft
3.15
Packaging
Virtual environment discovery
Tools can find a project's preferred virtual environment in one standard place by default, and a workflow tool can point them elsewhere if the environment lives somewhere else. The Python version field has been cleared, so this is no longer tied to a release.
Python releases 5
Bugfix release
Python 3.15.2
Expedited security release fixing compromised eMudhra intermediate CA keys and tarfile link handling, plus about 130 bugfixes; upgrade now, especially if you handle untrusted archives or use pip.
- Distrusts compromised eMudhra intermediate CA keys in the ssl module
- Rejects links that replace the destination in tarfile.tar_filter
- Rejects cookies with a negative version in http.cookiejar
Bugfix release
Python 3.14.10
Expedited security fix that blocks compromised eMudhra intermediate CA keys in ssl, plus about 120 bugfixes; upgrade now, especially if you handle certificates or untrusted tar archives.
- Blocks compromised eMudhra intermediate CA keys in the ssl module
- Rejects links that replace the destination in tarfile.tar_filter
- Rejects http.cookiejar cookies with a negative version
Security release
Python 3.13.18
Fixes security issues including the distrust of compromised eMudhra CA keys, a bundled Expat update, and tarfile link handling; upgrade now, as this series is source-only from here on.
- Distrusts compromised eMudhra intermediate CA keys in the ssl module
- Updates bundled Expat XML parser to 2.9.0
- Rejects links replacing the destination in tarfile.tar_filter
- Stops reading mimetypes.knownfiles by default on Windows
Security release
Python 3.12.16
Fixes security issues in ssl, tarfile, http.cookiejar, tempfile and mimetypes, and blocks compromised eMudhra CA keys; upgrade if you use tarfile on untrusted archives or rely on pip's TLS trust.
- Distrusts compromised eMudhra intermediate CA keys in the ssl module
- Rejects links that replace the destination in tarfile.tar_filter
- Updates bundled Expat XML parser to 2.9.0
- Fixes a race condition in tempfile.TemporaryDirectory cleanup
Security release
Python 3.11.18
Security update fixing a certificate-chain incident that affected pip downloads, plus Expat, tarfile and cookie vulnerabilities; upgrade if you rely on tarfile extraction or untrusted cookies, and note it is source-only.
- ssl rejects certificate chains using compromised eMudhra intermediate CA keys
- Bundled Expat upgraded to 2.9.0
- tarfile.tar_filter no longer accepts links that replace the extraction destination
- http.cookiejar rejects cookies with negative versions