Commit Graph

657 Commits

Author SHA1 Message Date
Steve Dower e28a2f4930 Add shebang documentation for PyManager 26.3b1 (GH-150931) 2026-06-04 21:37:18 +01:00
Dhruv Singla 9baa7c63be gh-129851: Fix the documentation for -m command (GH-129862) 2026-05-30 15:47:14 +00:00
Stefano Rivera 9c23f3452d gh-131372: Configurable build-details.json name (#150098)
* Configurable build-details.json name

Linux distributions that co-install multiple Python versions in the same
path (e.g. multiarch on Debian, debug builds, and free-threading) need a
way to place multiple build-details.jsons side-by-side.

PEP-739 is being updated [0] to recommend renaming in this situation. To
ensure some standardization, this PR generates appropriate names for
distributions that need to use this feature.

[0]: https://github.com/python/peps/pull/4889

* NEWS entry

* Document configure option and add to whatsnew
2026-05-25 13:37:50 +01:00
Pablo Galindo Salgado 1f3c2679f1 gh-149321: Remove lazy_imports=none startup mode (#149389) 2026-05-19 16:01:15 -07:00
Sergey B Kirpichev 9eb3b14668 gh-115119: Removed bundled copy of the libmpdec (GH-133964)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-12 21:34:37 +00:00
Stan Ulbrych 6a0be131c3 gh-149595: Remove the sys._enablelegacywindowsfsencoding() function (#149596)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-12 17:11:34 +01:00
Hugo van Kemenade f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Victor Stinner b3cfd36ba4 gh-149202: Don't use -fno-omit-frame-pointer on ppc64le (#149485)
The power ABI specification requires that compilers maintain a back
chain by default, so unwinding already works without a dedicated
frame pointer. Don't use -fno-omit-frame-pointer on ppc64le.
2026-05-07 11:47:08 +02:00
Petr Viktorin 612140e7dd gh-149202: Fix frame pointer unwinding on ppc64le and armv7/clang (#149409)
- ppc64's backchain format is also different from x86
- On 32-bit ARM, clang needs `-mno-thumb`, not `-marm` like GCC
2026-05-07 10:37:00 +02:00
Pablo Galindo Salgado 4ed40146f1 gh-149202: Fix frame pointer unwinding on s390x and ARM (GH-149362)
-fno-omit-frame-pointer is not enough to make every target walkable by the
simple manual frame pointer unwinder.

The helper used by test_frame_pointer_unwind used to assume the frame pointer
named a two-word record where fp[0] was the previous frame pointer and fp[1]
was the return address. That is only the generic layout used by some targets.
This patch keeps that default, but moves the slots behind named offsets so
architecture-specific layouts can describe where the backchain and return
address really live.

On s390x, GCC and Clang do not emit a usable backchain unless -mbackchain is
enabled. Without it, the unwinder stops at the current C frame and the test
reports no Python frames. Once backchains are present, the helper must also
stop at the current thread's known C stack bounds; otherwise it can follow the
final backchain far enough to dereference an invalid frame and segfault.
For Linux s390x backchain frames, the documented z/Architecture stack-frame
layout saves r14, the return-address register, at byte offset 112 from the
frame pointer, so read the return address from that named slot instead of fp[1].

The 112-byte offset comes from Linux's s390 debugging documentation: its Stack
Frame Layout table shows z/Architecture backchain frames with the backchain at
offset 0 and saved r14 of the caller function at offset 112:
https://www.kernel.org/doc/html/v5.3/s390/debugging390.html#stack-frame-layout

This helper remains scoped to Linux s390x backchain frames. GNU SFrame's s390x
notes state that the s390x ELF ABI does not generally mandate where RA and FP
are saved, or whether they are saved at all:
https://sourceware.org/binutils/docs/sframe-spec.html#s390x

As Jens Remus noted, -fno-omit-frame-pointer is not needed when -mbackchain is
present.

On 32-bit ARM, GCC defaults to Thumb mode on common armhf toolchains. The Thumb
prologue keeps the saved frame pointer and link register at offsets that depend
on the generated frame, which breaks the fp[0]/fp[1] walk used by the helper.
Use -marm when it is supported for frame-pointer builds, and teach the helper
the GCC ARM-mode slots where the previous frame pointer is at fp[-1] and the
saved LR return address is at fp[0].


Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:03:37 +00:00
Pablo Galindo Salgado 3236773257 gh-149202: Implement PEP 831 – Frame Pointers Everywhere: Enabling System-Level Observability for Python (#149201)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2026-05-01 21:16:11 +01:00
partev 82767780f8 gh-148779: Update Briefcase link in android.rst documentation (#148777)
Use canonical beeware.org URL for link to Briefcase.
2026-04-20 05:44:08 +08:00
Steve Dower 54607eec34 Add PyManager documentation for index signatures (GH-148631) 2026-04-15 22:48:14 +01:00
Geoffrey Thomas c88c27b0c1 gh-133312: configure: add --enable-static-libpython-for-interpreter (#133313)
This option changes the behavior of --enable-shared to continue to build
the libpython3.x.so shared library, but not use it for linking the
python3 interpreter executable. Instead, the executable is linked
directly against the libpython .o files as it would be with
--disable-shared.

There are two benefits of this change. First, libpython uses
thread-local storage, which is noticeably slower when used in a loaded
module instead of in the main program, because the main program can take
advantage of constant offsets from the thread state pointer but loaded
modules have to dynamically call a function __tls_get_addr() to
potentially allocate their thread-local storage area. (There is another
thread-local storage model for dynamic libraries which mitigates most of
this performance hit, but it comes at the cost of preventing
dlopen("libpython3.x.so"), which is a use case we want to preserve.)

Second, this improves the user experience around relocatable Python a
little bit, in that we don't need to use an $ORIGIN-relative path to
locate libpython3.x.so, which has some mild benefits around musl (which
does not support $ORIGIN-relative DT_NEEDED, only $ORIGIN-relative
DT_RPATH/DT_RUNPATH), users who want to make the interpreter setuid or
setcap (which prevents processing $ORIGIN), etc.
2026-04-14 16:26:19 +01:00
Ken Jin e007631e99 gh-148284: Block inlining of gigantic functions in ceval.c for clang 22 (GH-148334)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-11 00:52:23 +08:00
Hugo van Kemenade d518f15ea4 Merge branch 'main' of https://github.com/python/cpython 2026-04-07 20:34:01 +03:00
Victor Stinner feee573f36 gh-148014: Accept a function name in -X presite option (#148015) 2026-04-07 14:05:39 +00:00
Hugo van Kemenade 55ea59e7dc Python 3.15.0a8 2026-04-07 14:24:03 +03:00
Antonio Cuni 1c4408aeca gh-130472: Integrate fancycompleter with the new repl, to get colored tab completions (#130473)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2026-04-05 14:23:07 +00:00
konsti 03f3b9ade9 gh-146907: Clarify ABI compatibility between debug and release builds (GH-146925) 2026-04-01 16:17:56 +02:00
Marcel Telka 7b2495e811 gh-138850: Add --disable-epoll to configure (GH-145768)
* gh-138850: Add --disable-epoll to configure


Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-30 11:55:42 +02:00
Chris Eibl 306c556fdb gh-144319: obtain SeLockMemoryPrivilege on Windows (#144928) 2026-03-23 23:00:26 +00:00
Lysandros Nikolaou 7a1da4575b gh-142518: Improve mimalloc allocator docs (#145224) 2026-03-11 15:14:47 +01:00
Hugo van Kemenade 6024d3c6da Python 3.15.0a7 2026-03-10 14:31:15 +02:00
Stan Ulbrych bdf0105291 gh-103997: Remove incorrect statements about -c dedenting (gh-138624) 2026-03-10 09:56:00 +01:00
Filipe Laíns eb611a8515 GH-145275: add -X pathconfig_warnings and PYTHON_PATHCONFIG_WARNINGS (#145277) 2026-03-02 19:19:05 +00:00
Thomas A Caswell 201d251567 DOC: clarify and expand documentation about PYTHONUSERBASE and PYTHONNOUSERSITE (#144637) 2026-03-02 15:54:26 +00:00
indoor47 11eec7a492 gh-145305: Update ocert.org URLs in docs from http to https (#145304)
Co-authored-by: Adam (indoor47) <adamai@agentmail.to>
2026-02-27 18:24:39 +02:00
rueteh 4e45c9c309 gh-136677: Introduce executable specific linker flags to configure (#137296)
* introduce executable specific linker flags

Add PY_CORE_EXE_LDFLAGS and EXE_LDFLAGS which stores executable specific
LDFLAGS, replacing PY_CORE_LDFLAGS for building
executable targets.

If PY_CORE_EXE_LDFLAGS / EXE_LDFLAGS is not provided, then it defaults
to the value of PY_CORE_LDFLAGS which is the existing behaviour.

If both flags are supplied, and there is a need
to distinguish between executable and shared specific LDFLAGS,
in particular, PY_CORE_LDFLAGS should contain the shared specific LDFLAGS.

* documentation for new linker flags

* update Misc folder documentation

* Update Makefile.pre.in

Co-authored-by: Victor Stinner <vstinner@python.org>

---------

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Filipe Laíns <lains@riseup.net>
2026-02-24 22:52:02 +00:00
Steve Dower da39c68c2f Update Python install manager docs (GH-145160)
These updates align with v26.0 that was just released.
2026-02-23 22:28:23 +00:00
Ned Batchelder 852ec18978 Docs: remove unneeded author attributions (#145002)
These directives are not maintained and misleadingly indicate individual
rather than community ownership.

See https://github.com/python/docs-community/issues/180 for discussion,
and https://github.com/python/devguide/pull/1740 for an update to the
devguide.

Also ensured that everyone is in the Misc/ACKS file.
2026-02-19 18:45:28 -05:00
Pablo Galindo Salgado 46d5106cfa gh-142349: Implement PEP 810 - Explicit lazy imports (#142351)
Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-02-12 00:15:33 +00:00
Hugo van Kemenade 15b216f30d Python 3.15.0a6 2026-02-11 14:23:15 +02:00
Peter Bierma 3a0e183556 gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333) 2026-02-01 20:39:26 -05:00
Pablo Galindo Salgado 96e4cd698a gh-144319: Fix huge page safety in pymalloc arenas (#144331)
The pymalloc huge page support had two problems. First, on
architectures where the default huge page size exceeds the arena
size (e.g. 32 MiB on PPC, 512 MiB on ARM64 with 64 KB base
pages), mmap with MAP_HUGETLB silently allocates a full huge page
even when the requested size is smaller. The subsequent munmap
with the original arena size then fails with EINVAL, permanently
leaking the entire huge page. Second, huge pages were always
attempted when compiled in, with no way to disable them at
runtime. On Linux, if the huge page pool is exhausted, page
faults including copy-on-write faults after fork deliver SIGBUS
and kill the process.

The arena allocator now queries the system huge page size from
/proc/meminfo and skips MAP_HUGETLB when the arena size is not a
multiple of it. Huge pages also now require explicit opt-in at
runtime via the PYTHON_PYMALLOC_HUGEPAGES environment variable,
which is read through PyConfig and respects -E and -I flags.
The config field pymalloc_hugepages is propagated to the runtime
allocators struct so the low-level arena allocator can check it
without calling getenv directly.
2026-01-30 18:18:56 +00:00
Pablo Galindo Salgado b1bc868fba gh-144319: Add huge pages support for pymalloc (#144320) 2026-01-29 12:26:11 +00:00
Steve Dower f52af86cba Update install manager docs (python/pymanager#227) (GH-144079) 2026-01-21 15:33:05 +00:00
Hugo van Kemenade f1eb0c0b0c Python 3.15.0a3 2025-12-16 14:26:12 +02:00
Steve Dower 37fe9a90c5 Updates to PyManager docs based on feedback. (GH-142473) 2025-12-09 23:07:50 +00:00
Stan Ulbrych d3c888b4ec gh-139707: Fix example for configure option (GH-142153)
Fix example for nre configure option
2025-12-02 14:12:20 +01:00
Stan Ulbrych d4fa70706c gh-139707: Add mechanism for distributors to supply error messages for missing stdlib modules (GH-140783) 2025-12-01 14:36:17 +01:00
Steve Dower b101e9d36b Add PyManager troubleshooting steps for direct launch of script files (GH-141530) 2025-11-14 15:23:01 +00:00
Steve Dower 336154f4b0 Add documentation for Python install manager's install_dir, global_dir and download_dir (GH-140223) 2025-11-11 20:02:49 +00:00
Petr Viktorin d2ce6d708a gh-139707: Add docs for optional modules (GH-140171)
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: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Author: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-06 11:49:44 +01:00
Stan Ulbrych 2ca3c85054 Update documented minimum required zlib library version (#140116) 2025-10-15 00:16:00 +02:00
Hugo van Kemenade aeff92d86a Python 3.15.0a1 2025-10-14 13:46:08 +03:00
Hugo van Kemenade 88fc0a0fdc Using Python on Windows: Free-threaded is supported from 3.14 (#139992) 2025-10-13 17:18:45 +03:00
Bartosz Sławecki 0344db8d60 gh-131189: Remove curses mention from PYTHON_BASIC_REPL docs (#140022)
The `curses` dependency for the default REPL has been removed
in 09dfb50f1b.
2025-10-13 10:40:39 +02:00
Stan Ulbrych 8f14bddeae gh-139823: Extend list of optional dependencies in configure.rst (#139826)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-10 06:48:09 +00:00
Zachary Ware 98e748b3a0 gh-139573: Update OpenSSL in CI (GH-139577) 2025-10-04 19:43:17 -05:00