Commit Graph

31542 Commits

Author SHA1 Message Date
ed
72e370c910 gh-139736: Fix argparse indentation overshoot (#139738)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2025-10-08 15:36:53 +00:00
Bénédikt Tran
b04a57deef gh-139748: fix leaks in AC error paths when using unicode FS-based converters (#139765) 2025-10-08 20:52:44 +05:30
Serhiy Storchaka
162997bb70 gh-139700: Check consistency of the zip64 end of central directory record (GH-139702)
Support records with "zip64 extensible data" if there are no bytes
prepended to the ZIP file.
2025-10-07 20:15:26 +03:00
Tomasz Pytel
539461d9ec gh-139516: Fix lambda colon start format spec in f-string in tokenizer (#139657) 2025-10-07 17:28:15 +01:00
danigm
96c59a6e42 gh-138497: Support LLVM_VERSION configuration via env (#138498)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-10-07 07:54:31 -07:00
Ned Deily
6d804e4efb gh-124111: Update macOS installer to use Tcl/Tk 8.6.17. (#139682) 2025-10-07 00:53:05 -04:00
Zachary Ware
23410f0a9e gh-139573: Update macOS installer to use OpenSSL 3.0.18 (#139575) 2025-10-06 22:17:09 -04:00
Sebastian Pipping
55a44ccf5e gh-139400: Move NEWS item from section "Core and Builtins" to section "Security" (GH-139606) (#139664) 2025-10-06 16:55:58 +02:00
Adam Turner
3195da0b1a gh-105812: Use the `:deco:` role in place of manual decorator markup (#139619) 2025-10-05 21:15:36 +01:00
Sebastian Pipping
6edb2ddb5f gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (#139403)
* Modules/pyexpat.c: Disallow collection of in-use parent parsers.

Within libexpat, a parser created via `XML_ExternalEntityParserCreate`
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.
2025-10-05 17:37:42 +02:00
Bénédikt Tran
13dc2fde8c gh-70765: avoid waiting for HTTP headers when parsing HTTP/0.9 requests (#139514) 2025-10-05 12:03:25 +00:00
Zachary Ware
063cef9999 gh-139573: Update Windows builds to use OpenSSL 3.0.18 (GH-139574) 2025-10-04 19:56:59 -05:00
Serhiy Storchaka
9e3542a6c2 gh-136097: Fix sysconfig._parse_makefile() (#136166)
* Fix potential infinite recursion.
* Fix a bug when reference can cross boundaries of substitutions, e.g.
  a=$(
  b=$(a)a)
* Fix potential quadratic complexity.
* Fix KeyError for undefined CFLAGS, LDFLAGS, or CPPFLAGS.
* Fix infinite recursion when keep_unresolved=False.
* Unify behavior with keep_unresolved=False for bogus $ occurred before
  and after variable references.
2025-10-04 14:57:12 +01:00
Cycloctane
a7a485558c gh-133951: Remove lib64->lib symlink in venv creation (#137139)
* Remove lib64->lib symlink in venv directory

* fix test

* remove unused import

* add news
2025-10-04 14:55:17 +01:00
Semyon Moroz
8d17d79299 gh-138044: Remove deprecated parameter alias for importlib.resources.files (#138059) 2025-10-04 14:53:43 +01:00
Ho Kim
db53ca30d7 gh-138489: Add missing build-details.json step for building wasm (#139302)
* fix: add missing `build-details.json` step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* gh-138489: Add missing build-details.json step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* Update Makefile.pre.in

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-04 14:26:20 +01:00
Sergey Miryanov
e6e376a760 gh-132042: Remove resolve_slotdups() to speedup class creation (#132156)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-10-03 11:58:00 +02:00
Angela Liss
fd7dac0430 gh-137840: Implement PEP 728 (closed and extra_items in typing.TypedDict) (#137933)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-10-02 22:50:19 -07:00
Victor Stinner
4e7e2dd043 gh-139322: Reenable test_os.test_getlogin() (#139498)
Fix also getlogin() errno.
2025-10-02 20:51:57 +00:00
ivonastojanovic
75b1afe562 gh-135953: Add Gecko reporter to sampling profiler (#139364)
Signed-off-by: Pablo Galindo Salgado <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-10-01 21:18:54 +01:00
Ken Jin
d936dbeb1f gh-139210: Move gh-139210 patch NEWS file to correct section (#139469)
Move gh-139210 patch NEWS file to correct section
2025-10-01 09:48:37 +01:00
yihong
22f7ccfad6 gh-138899: fix sys.ps1 in asyncio repl (#138900) 2025-10-01 11:19:49 +05:30
Ken Jin
c86eb4d3ac gh-139210: Fix use-after-free in xml.etree.ElementTree.iterparse() (GH-139211) 2025-09-30 20:50:50 +03:00
Petr Viktorin
01157e0cdf gh-139116: tracemalloc: Detach thread state when acquiring tables_lock (GH-139449)
* gh-139116: tracemalloc: Detach thread state when acquiring tables_lock

This prevents a deadlock when:

- One thread is in `_PyTraceMalloc_Stop`, with `TABLES_LOCK` held, calling
  `PyRefTracer_SetTracer` which wants to stop the world
- Another is thread in `PyTraceMalloc_Track`, just attached thread state, waiting
  for `TABLES_LOCK`

Detaching the thread state while waiting for `TABLES_LOCK` allows
`PyRefTracer_SetTracer` to stop the world.


Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-09-30 16:43:49 +02:00
Bénédikt Tran
bc172ee830 gh-139283: correctly handle size limit in cursor.fetchmany() (#139296)
Passing a negative or zero size to `cursor.fetchmany()` made it fetch all rows
instead of none.

While this could be considered a security vulnerability, it was decided to treat
this issue as a regular bug as passing a non-sanitized *size* value in the first
place is not recommended.
2025-09-30 11:18:55 +02:00
AN Long
bd1ada6df3 gh-138092: Allow calling mmap.flush with offset only (#138093) 2025-09-30 11:08:50 +02:00
Adam Turner
8bfdda21a3 GH-123299: Copyedit 3.14 What's New: CPython bytecode changes (#139402)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-29 15:11:54 +00:00
Hugo van Kemenade
872eafd2b0 gh-76007: Deprecate __version__ attribute (#138675)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-09-29 12:03:23 +03:00
Gordon Messmer
408154d64a gh-78319: Fix implementation of IMAP APPEND UTF8 (GH-9436)
Make UTF8 support for the IMAP APPEND command RFC 6855 compliant.
2025-09-29 09:03:06 +03:00
Russell Keith-Magee
195d13c85e gh-132006: Add support for handling XCPrivacy manifests (#139163)
Adds a PrivacyInfo.xcprivacy file when packaging `_hashlib` and `_ssl` modules
for iOS (based on the original OpenSSL sources); and adds handling to the build
script to allow any app to add `xcprivacy` handling for a binary module.
2025-09-29 05:50:46 +08:00
yihong
e18dda96c9 gh-139374: colorize traceback when using timeit command-line interface (#139375)
---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-09-28 11:49:18 +00:00
Bénédikt Tran
666112376d gh-90949: expose Expat API to tune exponential expansion protections (#139368)
Expose the XML Expat 2.7.2 APIs to tune protections against
"billion laughs" [1] attacks.

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetBillionLaughsAttackProtectionActivationThreshold(threshold)`, and
- `parser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor)`.

This completes the work in f04bea44c3,
and improves the existing related documentation.

[1]: https://en.wikipedia.org/wiki/Billion_laughs_attack
2025-09-28 08:27:04 +00:00
Stan Ulbrych
48d0d0dd97 gh-139312: Update bundled libexpat to 2.7.3 (GH-139319)
+ Blurb
+ Update sbom.spdx.json
2025-09-26 19:44:36 -07:00
Bénédikt Tran
68a1778b77 gh-90949: amend GH-139234 in prevision of future mitigation API (#139366)
Fix some typos left in f04bea44c3,
and simplify some internal functions to ease maintenance of future
mitigation APIs.
2025-09-26 17:59:40 +00:00
Tian Gao
8288f3693f gh-139289: Lazy import rlcompleter to fix the refleak (#139305) 2025-09-26 22:17:02 +08:00
Bénédikt Tran
f04bea44c3 gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (#139234)
Expose the XML Expat 2.7.2 mitigation APIs to disallow use of
disproportional amounts of dynamic memory from within an Expat
parser (see CVE-2025-59375 for instance).

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetAllocTrackerActivationThreshold(threshold)`, and
- `parser.SetAllocTrackerMaximumAmplification(max_factor)`.
2025-09-26 14:13:56 +00:00
Raymond Hettinger
7909b30493 gh-138682: Add symmetric difference to Counter (gh-138766) 2025-09-26 00:04:49 -05:00
Seth Michael Larson
89b5571025 gh-139330: Check expat version/checksum in SBOM with refresh.sh
Check expat version/checksum in SBOM with refresh.sh
2025-09-25 17:13:45 +00:00
Pablo Galindo Salgado
1963e70100 gh-139275: Fix compilation of Modules/_remote_debugging_module.c when the system doesn't have process_vm_readv (#139307) 2025-09-25 00:16:44 +01:00
dgpb
7ce25edb8f gh-133059: Increase the small positive integer cache to 1024 (GH-133160) 2025-09-24 17:05:30 -04:00
Bénédikt Tran
a5e0562350 gh-133644: remove PyWeakref_GetObject and PyWeakref_GET_OBJECT (GH-133657) 2025-09-24 11:25:56 +02:00
Stan Ulbrych
30f849250b gh-83336: Add alias for consistency to utf-8-sig (#136530)
Closes #83336
2025-09-24 10:38:57 +02:00
Tian Gao
c8624cd367 gh-138860: Lazy import rlcompleter in pdb to avoid deadlock in subprocess (#139185) 2025-09-24 11:46:05 +08:00
Serhiy Storchaka
1a2e00c97a gh-67795: Accept any real numbers as timestamp and timeout (GH-139224)
Functions that take timestamp or timeout arguments now accept any
real numbers (such as Decimal and Fraction), not only integers or floats,
although this does not improve precision.
2025-09-23 21:31:42 +03:00
Dave Peck
6ec058a1f7 gh-138558: Improve handling of Template annotations in annotationlib (#139072) 2025-09-23 11:25:51 -07:00
Victor Stinner
e8382e55c5 gh-74857, PEP 538: Coerce POSIX locale to UTF-8 based locale (#139238) 2025-09-23 19:20:59 +02:00
Serhiy Storchaka
5854cf38a2 gh-130567: Fix possible crash in locale.strxfrm() (GH-138940)
On some macOS versions there was an off-by-one error in wcsxfrm() which
caused writing past the end of the array if its size was not calculated
by running wcsxfrm() first.

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2025-09-23 15:11:50 +00:00
Victor Stinner
dd683f8f34 gh-139208: Fix regrtest --fast-ci --verbose (#139240)
Don't ignore the --verbose option anymore.
2025-09-23 16:09:01 +02:00
Katie Gardner
e642a24b50 gh-95953: Add a css class to changed lines of difflib.HtmlDiff make_table (#139226) 2025-09-22 13:19:37 +00:00
Jason R. Coombs
a756a4b953 gh-138313: Suppress ResourceWarnings and restore skipped test (#138597) 2025-09-21 20:53:57 -04:00