Commit Graph

266 Commits

Author SHA1 Message Date
Miss Islington (bot) e4cdee6c19 [3.15] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150614)
(cherry picked from commit 9baa7c63be)

Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
2026-05-30 20:03:58 +03:00
Hugo van Kemenade f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Victor Stinner feee573f36 gh-148014: Accept a function name in -X presite option (#148015) 2026-04-07 14:05:39 +00: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
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
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
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
Hugo van Kemenade aeff92d86a Python 3.15.0a1 2025-10-14 13:46:08 +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
Serhiy Storchaka cf9ef73121 gh-134716: Support regular expressions in -W and PYTHONWARNINGS (GH-138149) 2025-09-16 17:06:44 +00:00
sobolevn 1c984ba953 gh-136355: Deprecate -b and -bb CLI flags in 3.15 (#136363)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-09-14 20:00:03 +03:00
Stan Ulbrych b3ff3165d2 gh-89905: Correct -R option doc (#137608) 2025-09-01 19:58:25 +02:00
Brian Schubert 34ce1920ca Docs: Fix duplicate word typos (GH-135958) 2025-06-26 20:00:19 -04:00
mpage fea5ccc55d gh-135805: Document the X option and env var for controlling thread-local bytecode (#135868)
Document the X option and env var for controlling thread-local bytecode.
2025-06-24 10:02:50 -07:00
Hugo van Kemenade b092705907 Python 3.14.0b1 2025-05-06 18:33:52 +03:00
Noah Kim c4bcc6a778 gh-102567: Add -X importtime=2 for logging an importtime message for already-loaded modules (#118655)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-06 01:03:55 +01:00
Brandt Bucher b1aa515bd6 GH-133231: Add JIT utilities in sys._jit (GH-133233) 2025-05-05 15:25:22 -07:00
Adam Turner 4c56563f7a GH-133336: Remove reserved `-J` flag for Jython (#133444) 2025-05-05 15:09:19 +00:00
Jon Crall fc0ec29889 gh-103997: Automatically dedent the argument to "-c" (#103998)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-18 17:39:30 +09:00
Neil Schemenauer d687900f98 gh-128384: Use a context variable for warnings.catch_warnings (gh-130010)
Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true.  This makes using the context manager thread-safe in
multi-threaded programs.

Add the `sys.flags.thread_inherit_context` flag.  If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.

Both these flags are set to true by default for the free-threaded build
and false for the default build.

Move the Python implementation of warnings.py into _py_warnings.py.

Make _contextvars a builtin module.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-04-09 16:18:54 -07:00
Hugo van Kemenade 29af6cee02 Python 3.14.0a7 2025-04-08 14:20:51 +03:00
Pablo Galindo Salgado 943cc1431e gh-131591: Implement PEP 768 (#131937)
Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2025-04-03 16:20:01 +01:00
Michael Kashirin f18b226492 gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (#127203)
Fix a misleading statement in PYTHON_BASIC_REPL documentation.
2025-01-21 20:05:19 +00:00
Hugo van Kemenade 23f2e8f13c gh-127221: Add colour to unittest output (#127223)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-12-05 21:10:46 +02:00
Peter Bierma 84ad264ce6 gh-123275: Support -Xgil=1 and PYTHON_GIL=1 on non-free-threaded builds (gh-123276) 2024-09-06 08:53:47 +09:00
Wei-Hsiang (Matt) Wang 103a0470e3 gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
Adam Turner db6f5e1933 GH-109975: Copyedit 3.13 What's New: Release Highlights (#122958)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-13 15:30:59 +01:00
Wim Jeantine-Glenn c25898d51e Doc: cmdline.rst: Include -P and -R in usage (#122590)
* ``-P``: safe path (https://docs.python.org/3/using/cmdline.html#cmdoption-P)
* ``-R``: hash randomization (https://docs.python.org/3/using/cmdline.html#cmdoption-R)
2024-08-07 16:01:44 +01:00
Łukasz Langa dc93d1125f gh-121957: Emit audit events for python -i and python -m asyncio (GH-121958)
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
2024-07-22 13:04:08 +02:00
Wim Jeantine-Glenn 0a1e8ff9c1 gh-121101: Document -Wall option (an alias for -Walways) (#121102) 2024-06-29 12:10:13 +05:30
Brett Simmers 9fa206aaec Docs: Add central references to free-threading-related options (#119017) 2024-05-21 17:49:23 -04:00
Melanie Arbor 172690227e gh-102136: Add -m to options that work with -i (GH-119271)
* GH-102136: Add -m to options that work with -i

* Linting
2024-05-20 19:38:33 -04:00
Hugo van Kemenade 04859228aa gh-118518: Rename PYTHONPERFJITSUPPORT and -X perfjit with underscores (#118693) 2024-05-07 11:47:21 +00:00
Pablo Galindo Salgado f27f8c790a gh-111201: A new Python REPL (GH-111567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-05 21:32:23 +02:00
Pablo Galindo Salgado 1b22d801b8 gh-118518: Allow perf to work without frame pointers (#112254) 2024-05-05 03:07:29 +02:00
Hugo van Kemenade 164e2c31c0 gh-117225: Document colour use in doctest (#118268) 2024-05-01 12:25:11 -06:00
Serhiy Storchaka 10f1a2687a gh-115664: Reorganize versionadded directives for -X options (GH-116304)
Add the versionadded directives just under the description of the
corresponding option.
2024-04-15 18:01:17 +03:00
Serhiy Storchaka 33662d4e01 gh-90300: Fix cmdline.rst (GH-116721)
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
2024-03-13 15:03:13 +02:00
Brett Simmers 2731913dd5 gh-116167: Allow disabling the GIL with PYTHON_GIL=0 or -X gil=0 (#116338)
In free-threaded builds, running with `PYTHON_GIL=0` will now disable the
GIL. Follow-up issues track work to re-enable the GIL when loading an
incompatible extension, and to disable the GIL by default.

In order to support re-enabling the GIL at runtime, all GIL-related data
structures are initialized as usual, and disabling the GIL simply sets a flag
that causes `take_gil()` and `drop_gil()` to return early.
2024-03-11 11:02:58 -04:00
Serhiy Storchaka 808a77612f gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
Ned Batchelder 30b7b4f73c Docs: 'still' is a better word than 'nonetheless' (#114598) 2024-01-26 13:42:49 +00:00
Serhiy Storchaka a8629816c6 gh-113664: Improve style of Big O notation (GH-113695)
Use cursive to make it looking like mathematic formulas.
2024-01-10 15:01:18 +02:00
Zackery Spytz f19b93fce0 gh-73965: New environment variable PYTHON_HISTORY (#13208)
It can be used to set the location of a .python_history file

---------

Co-authored-by: Levi Sabah <0xl3vi@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-06 22:30:12 -08:00