Commit graph

129819 commits

Author SHA1 Message Date
AZero13
44d3dc6491
gh-142438: Added missing GIL release in _PySSL_keylog_callback when keylog_bio is unset (gh-142439) 2025-12-11 23:30:39 +09:00
elenril
79aa43a979
gh-79986: Add parsing for References/In-Reply-To email headers (#137201)
This is a followup to 46d88a1131 (#13397),
which added parsing for Message-ID. Similar handling is needed for the
other two identification headers.
2025-12-11 09:20:53 -05:00
Mark Shannon
4eab90f4f3
GH-140683: JIT: Improve machine code for loading smaller constants on AArch64. (GH-142511)
* Use movz and movk instructions for loading 16 and 32 bit operands and oparg.
* Loading of 64 bit operands is unchanged.
2025-12-11 12:33:39 +00:00
Mark Shannon
469f191a85
GH-135379: Top of stack caching for the JIT. (GH-135465)
Uses three registers to cache values at the top of the evaluation stack
This significantly reduces memory traffic for smaller, more common uops.
2025-12-11 10:32:52 +00:00
Stan Ulbrych
80c9756e3f
Remove file accidentally added to Doc/ (#142563) 2025-12-11 10:11:36 +00:00
Kumar Aditya
42d2bedb87
gh-142556: fix crash when a task gets re-registered during finalization in asyncio (#142565) 2025-12-11 15:04:49 +05:30
Dino Viehland
da8199f884
gh-123241: Don't modify ref count during visitation (GH-142232) 2025-12-11 09:54:29 +01:00
Stan Ulbrych
0dd83111ab
Tachyon: Fix heatmap line highlight animation overriding heat colors (#142522) 2025-12-11 04:30:16 +00:00
Stan Ulbrych
b52e8ce4af
gh-142539: Fix traceback caret location calculation for SyntaxErrors with wide chars (#142540) 2025-12-11 04:20:55 +00:00
Pablo Galindo Salgado
5b19c75b47
gh-138122: Make the tachyon profiler opcode-aware (#142394) 2025-12-11 03:41:47 +00:00
Steve Dower
fa448451ab
gh-140172: Skip JSON tools test during PGO training (GH-140809) 2025-12-11 00:34:49 +00:00
Brett Cannon
880a7905ca
GH-97850: Remove all uses and definitions of load_module() from importlib (#142205) 2025-12-10 15:35:51 -08:00
Victor Stinner
dc3ece2bc0
gh-142489: Increase ssl_handshake_timeout in asyncio tests (#142523)
Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
And add the HANDSHAKE_TIMEOUT constant.
2025-12-10 22:21:03 +00:00
Ken Jin
97e19014dd
gh-137007: Track executor before any possible deallocations (GH-137016) 2025-12-11 05:09:56 +08:00
Ethan Furman
26757d1351
gh-135559: [Enum] dir() on a Flag now shows aliases (GH-136527) 2025-12-10 11:46:10 -08:00
Ken Jin
ebf3427615
gh-141976: Protect against non-progressing specializations in tracing JIT (GH-141989) 2025-12-10 19:39:11 +00:00
Diego Russo
46295677a1
GH-142305: JIT: Deduplicating GOT symbols in the trace (#142316) 2025-12-10 16:04:04 +00:00
AZero13
785268fdce
gh-142433: Move deref to below the error when checking for laststring (#142402)
Move deref of laststring to below the error checking so the deref
is applied after the object in strings is replaced.
2025-12-10 16:41:52 +01:00
Victor Stinner
c76cfe8d89
gh-139927: Fix test_embed on OpenIndiana (#142514)
Avoid swprintf() function in Programs/_testembed.c since it doesn't
work as expected on OpenIndiana.
2025-12-10 15:31:12 +00:00
Stan Ulbrych
2db9573e23
Tachyon: Set favicon for heatmap pages (#142493) 2025-12-10 14:10:23 +00:00
Karolina Surma
c0d0f4b72a
gh-131372: Include LDVERSION and EXE in base_interpreter value (#142256)
* Include LDVERSION and EXE in base_interpreter value

In Fedora, build-details.json created and installed for python3.14t
contains "/usr/bin/python3.14" as the base_interpreter value.
Create a correct string, taking into account both LDVERSION and EXE
config variables, similarly to how it's defined in altbininstall in Makefile.

* Add news

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Filipe Laíns <lains@riseup.net>
2025-12-10 12:09:41 +00:00
Kevin Wang
49b1fb43f6
gh-142048: Fix lost gc allocations count on thread cleanup (#142233) 2025-12-10 07:29:40 +00:00
dr-carlos
70671267c1
gh-142029: Raise ValueError instead of crashing on empty name given to create_builtin() (#142033)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-10 12:01:57 +05:30
Bartosz Sławecki
d716e3b2dd
gh-142315: Don't pass the "real path" of Pdb script target to system functions (#142371)
* Pick target depending on preconditions

* Clarify the news fragment

* Add test capturing missed expectation.

* Add more idiomatic safe realpath helper

* Restore logic where existance and directoriness are checked on realpath.

* Link GH issue to test.

* Extract a function to check the target. Remove the _safe_realpath, now no longer needed.

* Extract method for replacing sys_path, and isolate realpath usage there.

* Revert "Extract method for replacing sys_path, and isolate realpath usage there."

This reverts commit 855aac3d28.

* Restore _safe_realpath.

---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-12-09 20:04:49 -05:00
Steve Dower
37fe9a90c5
Updates to PyManager docs based on feedback. (GH-142473) 2025-12-09 23:07:50 +00:00
Russell Keith-Magee
91884838bc
gh-140189: Use macos-14 runner for iOS CI tests (#142444)
Switch to the macos-14 runner for iOS CI, working around some instability 
in the macos-15 runner.
2025-12-10 05:52:52 +08:00
Filipe Laíns
7f497c3c71
GH-108819: fix LIBDEST not honoring --with-platlibdir (#133163)
* GH-108819: fix LIBDEST not honoring --with-platlibdir

We look for the pure-Python part of the standard library in
PLATSTDLIBDIR, which may not match the default LIBDIR subdir.

From ``getpath.py``:

```python
    ...
    STDLIB_SUBDIR = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}'
    STDLIB_LANDMARKS = [f'{STDLIB_SUBDIR}/os.py', f'{STDLIB_SUBDIR}/os.pyc']
    PLATSTDLIB_LANDMARK = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}/lib-dynload'
    ...
```

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add news

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Always set LIBDEST and BINLIBDEST based on PLATLIBDIR

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add XXX comment on PLATLIBDIR default value

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Regen configure

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
2025-12-09 19:14:51 +00:00
Stan Ulbrych
b5576d8146
Tachyon: Remove spurious CSS for stat-card (#142487) 2025-12-09 19:13:54 +00:00
Stan Ulbrych
9b4ce3c429
Tachyon: Make "Tachyon" in navbar link to index.html (#142486) 2025-12-09 18:51:57 +00:00
Stan Ulbrych
09d6bf20b6
Tachyon: Fix unesecarry plural when there is a single file/sample (#142478) 2025-12-09 17:45:52 +00:00
Miro Hrončok
bcf90de8ba
gh-142454: Make the JIT digest more deterministic by sorting the files in Tools/jit (#142455)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-09 17:33:09 +00:00
Fabian Henze
1adb17b1a2
gh-112527: Fix help text for required options in argparse (GH-112528)
For optional arguments with required=True, the ArgumentDefaultsHelpFormatter
would always add a " (default: None)" to the end of the help text.
Since that's a bit misleading, it is removed with this commit.
2025-12-09 16:48:35 +00:00
Victor Stinner
b20722c300
gh-142447: Fix cast warning in pycore_backoff.h (#142465)
MAKE_VALUE_AND_BACKOFF() macro casts its result to uint16_t.

Add pycore_backoff.h header to test_cppext tests.
2025-12-09 17:03:13 +01:00
Filipe Laíns
1b460fcddc
gh-84530: fix namespace package support in modulefinder (#29196)
* bpo-40350: fix namespace package support in modulefinder

Signed-off-by: Filipe Laíns <lains@riseup.net>

* consider that namespace package specs might have the loader set

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Revert "consider that namespace package specs might have the loader set"

This reverts commit 23fb4e0de3.

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix load_module and load_package to handle namespace packages

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Drop _NAMESPACE constant

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Drop importlib changes

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Update NamespacePath check

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Mixed some

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
2025-12-09 15:50:50 +00:00
Victor Stinner
49207a5226
gh-140222: Increase stack margin on debug build (#142452)
Increase _PyOS_MIN_STACK_SIZE if Python is built in debug mode.
2025-12-09 16:25:46 +01:00
Filipe Laíns
bcb6cbdf3b
GH-131372: only install build-details.json in the main install (#142269)
* GH-131372: only install build-details.json in the main install

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add news

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
2025-12-09 14:25:34 +00:00
John Paul Adrian Glaubitz
02c085d48b
gh-142342: Fix m68k assembler operand constraints for %fpcr access (gh-142343)
On m68k, an fmove instruction accessing %fpcr may only move from
or to a data register or a memory operand. The constraint "g" also
permits the use of address registers, which is invalid. The correct
constraint is "dm". Beginning with GCC 15, the register allocator
picks an address register in the code which causes SIGILL during
runtime.

Co-authored-by: Michael Karcher <github@mkarcher.dialup.fu-berlin.de>
2025-12-09 13:46:40 +00:00
Pablo Galindo Salgado
4279785b31
gh-140727: Restructure profiling documentation for PEP 799 (#142373)
* Add profiling module documentation structure

PEP 799 introduces a new `profiling` package that reorganizes Python's
profiling tools under a unified namespace. This commit adds the documentation
structure to match: a main entry point (profiling.rst) that helps users choose
between profilers, detailed docs for the tracing profiler (profiling-tracing.rst),
and separated pstats documentation.

The tracing profiler docs note that cProfile remains as a backward-compatible
alias, so existing code continues to work. The pstats module gets its own page
since it's used by both profiler types and deserves focused documentation.

* Add profiling.sampling documentation

The sampling profiler is new in Python 3.15 and works fundamentally differently
from the tracing profiler. It observes programs from outside by periodically
capturing stack snapshots, which means zero overhead on the profiled code. This
makes it practical for production use where you can attach to live servers.

The docs explain the key concepts (statistical vs deterministic profiling),
provide quick examples upfront, document all output formats (pstats, flamegraph,
gecko, heatmap), and cover the live TUI mode. The defaults table helps users
understand what happens without any flags.

* Wire profiling docs into the documentation tree

Add the new profiling module pages to the Debugging and Profiling toctree.
The order places the main profiling.rst entry point first, followed by the
two profiler implementations, then pstats, and finally the deprecated profile
module last.

* Convert profile.rst to deprecation stub

The pure Python profile module is deprecated in 3.15 and scheduled for removal
in 3.17. Users should migrate to profiling.tracing (or use the cProfile alias
which continues to work).

The page now focuses on helping existing users migrate: it shows the old vs new
import style, keeps the shared API reference since both modules have the same
interface, and preserves the calibration docs for anyone still using the pure
Python implementation during the transition period.

* Update CLI module references for profiling restructure

Point cProfile to profiling.tracing docs and add profiling.sampling to the
list of modules with CLI interfaces. The old profile-cli label no longer
exists after the documentation restructure.

* Update whatsnew to link to profiling module docs

Enable cross-references to the new profiling module documentation and update
the CLI examples to use the current syntax with the attach subcommand. Also
reference profiling.tracing instead of cProfile since that's the new canonical
name.
2025-12-09 12:55:04 +00:00
Miro Hrončok
8914148151
gh-141808: Don't remove the JIT stencils when building with PGO (#141809)
See: https://discuss.python.org/t/building-the-jit-with-pre-built-stencils/91838/12

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-12-09 13:44:19 +01:00
Adam Turner
c5825ff4c9
GH-139436: Remove PDF and CHM from IDLE HelpSource (#140418) 2025-12-09 12:32:53 +00:00
Jeong, YunWon
3ec941b364
gh-142282 Fix winreg.QueryValueEx() under race condition (GH-142283) 2025-12-09 12:09:07 +00:00
AZero13
756e7d1f3b
Silence warning on conversion from uint64_t to uintptr_t in threads.c (#142437) 2025-12-09 10:18:51 +00:00
Stan Ulbrych
726e8e8def
Tachyon: Fix html output sidebar cards hidden behind section headers on hover (#142428) 2025-12-08 21:10:48 +00:00
Stan Ulbrych
719d7960e2
Fix typo in Tools/wasm/README.md (#142426) 2025-12-08 12:48:17 -08:00
Sam Gross
80c2c2dfb5
gh-138122: Fix unused variable warning in threads.c (#142425) 2025-12-08 19:05:11 +00:00
Stan Ulbrych
9e3d7cdec1
gh-142278: Add granular change detection for platforms in CI (#142350)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-08 18:04:17 +00:00
Ken Jin
97f0a1f203
gh-142276: Watch attribute loads when promoting JIT constants (GH-142303)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-12-08 18:03:15 +00:00
Mark Shannon
e0451ceef8
GH-139757: JIT: Remove redundant branches to jumps in the assembly optimizer (GH-140800)
JIT: Remove redundant branches to jump in the assembly optimizer

* Refactor JIT assembly optimizer making instructions instances not just strings
* Remove redundant jumps and branches where legal to do so
* Modifies _BINARY_OP_SUBSCR_STR_INT to avoid excessive inlining depth
2025-12-08 17:57:11 +00:00
Sam Gross
37988c57ea
gh-123241: Document restrictions for tp_traverse implementations (gh-142272) 2025-12-08 12:22:13 -05:00
Sam Gross
f2fba4c99a
gh-124379: Document _PyStackRef (gh-142321) 2025-12-08 12:14:50 -05:00