Commit graph

129560 commits

Author SHA1 Message Date
Savannah Ostrowski
bef63d2fb8
GH-134584: Remove redundant refcount from _STORE_ATTR_SLOT (#142729) 2025-12-15 15:18:44 -08:00
Bartosz Sławecki
f277781bba
gh-142737: Handle lost io.open in _Py_FindSourceFile (GH-142747) 2025-12-15 22:58:50 +00:00
Ken Jin
790a46a449
gh-134584: JIT: Eliminate redundant refcount ops for X_INT (GH-142765) 2025-12-15 22:22:18 +00:00
AN Long
0978b9a7d5
gh-85222: Document the global start method side effect in multiprocessing (GH-136426)
* Document the ctx parameter in some types in multiprocessing.
* Reduce duplication while still linking to the central explanation from API points with the side effect.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com>
2025-12-15 14:12:52 -08:00
Ken Jin
b6d708ff2c
Add Fidget-Spinner to more JIT CODEOWNERS (GH-142768) 2025-12-15 21:50:42 +00:00
Nadeshiko Manju
059316ade6
gh-134584: Eliminate redundant refcounting from _STORE_ATTR_INSTANCE_VALUE (GH-142759)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-15 20:17:12 +00:00
Ken Jin
0ac4e6c6cd
gh-134584: Remove custom float decref ops (GH-142576) 2025-12-15 19:38:58 +00:00
Hugo van Kemenade
b3b644b6b8
gh-141081: Revert "Add a .gitignore file to __pycache__ folders (#141162)" (#142758) 2025-12-15 21:27:06 +02:00
Mark Shannon
27a2e49d18
GH-142718: JIT: Fix crash due to incorrect caching on side exits when exiting jitted code. (GH-142762)
JIT: Fix crash due to incorrect caching on side exits when exiting jitted code.

* Make sure that stack is in correct state at side exits with TOS cached values
* Simplify choice of cached items for side exits
2025-12-15 19:01:29 +00:00
Alper
1a9cdaf63a
gh-116738: Make _bz2 module thread-safe (gh-142756)
Make the attributes in _bz2 module thread-safe on the free-threading build.
Attributes (eof, needs_input, unused_data) are now stored atomically or
accessed via mutex-protected getters.
2025-12-15 12:47:04 -05:00
Sam Gross
a882ae198a
gh-142472: Clean-up _PyStackRef functions (gh-142479)
This combines most _PyStackRef functions and macros between the free
threaded and default builds.

- Remove Py_TAG_DEFERRED (same as Py_TAG_REFCNT)
- Remove PyStackRef_IsDeferred (same as !PyStackRef_RefcountOnObject)
2025-12-15 12:03:49 -05:00
Donghee Na
abaaeee6a0
gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_DICT (GH-142712)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-15 16:42:32 +00:00
Nadeshiko Manju
872ab51f32
gh-134584: Eliminate redundant refcounting from _CALL_LIST_APPEND (GH-142711)
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-15 15:49:36 +00:00
Lucas Colley
8bb5b6e8ce
gh-142466: Pixi package definitions for downstream use (#142469)
* WIP: ENH: Pixi package definitions for downstream development

[skip ci]

* linux-64 support

* tidy gitignore

* respond to review
- switch cases on `PYTHON_VARIANT`
- remove `minor_version` by using `python3`
- remove runtime-only asan options

* README updates

* use `.md` to preview rendering

* Apply suggestions from code review

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Apply suggestion from @FFY00

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>

* Apply suggestion from @FFY00

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>

* Apply suggestion from @FFY00

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>

* Apply suggestion from @lucascolley

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
2025-12-15 15:04:16 +00:00
Stan Ulbrych
a7501f07da
Move doc on structure from devguide to InternalDocs (GH-142237)
Co-Authored-By: Paul Ross <apaulross@gmail.com>
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-Authored-By: Ezio Melotti <ezio.melotti@gmail.com>
Co-Authored-By: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-12-15 15:19:02 +01:00
Petr Viktorin
e4d32a3ef9
gh-142020: ctypes docs: Note that find_library relies on the programs it runs (GH-142134) 2025-12-15 15:15:22 +01:00
yihong
1d3854a19a
gh-142594: fix by property calls io.TextIOWrapper.detach (GH-142706)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2025-12-15 15:13:58 +01:00
Victor Stinner
14d3974db0
gh-142217: Recommend PyUnicode_InternFromString() to replace _PyUnicode_FromId() (GH-142746) 2025-12-15 14:25:30 +01:00
dr-carlos
cd2ca74c53
gh-142029: Raise ModuleNotFoundError instead of crashing on nonexsistent module name given to create_builtin() (#142054)
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-15 13:20:19 +01:00
Pablo Galindo Salgado
6658e2cb07
gh-138122: Add --subprocesses flag to profile child processes in tachyon (#142636) 2025-12-15 12:11:40 +00:00
Cody Maloney
14e6052b43
gh-139871: Optimize bytearray construction with encoding (#142243)
When a `str` is encoded in `bytearray.__init__` the encoder tends to
create a new unique bytes object. Rather than allocate new memory and
copy the bytes use the already created bytes object as bytearray
backing. The bigger the `str` the bigger the saving.

Mean +- std dev: [main_encoding] 497 us +- 9 us -> [encoding] 14.2 us +- 0.3 us: 34.97x faster

```python
import pyperf

runner = pyperf.Runner()

runner.timeit(
    name="encode",
    setup="a = 'a' * 1_000_000",
    stmt="bytearray(a, encoding='utf8')")
```
2025-12-15 13:10:31 +01:00
chaope
850f95f6f6
gh-142651: make Mock.call_count thread-safe (#142656) 2025-12-15 17:13:15 +05:30
Hugo van Kemenade
38ad651b67
gh-76007: Deprecate __version__ attribute in ctypes (#142679) 2025-12-15 13:30:23 +02:00
Kumar Aditya
fb554ad68d
gh-140414: streamline thread state access in asyncio (#142742) 2025-12-15 16:57:51 +05:30
Stan Ulbrych
15c9d9027e
gh-141081: Add a .gitignore file to __pycache__ folders (#141162)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2025-12-15 12:16:56 +02:00
Neil Schemenauer
19c72d23fd
gh-132657: Use stronger memory ordering for so->mask. (gh-142735)
We need to use release/acquire ordering for the 'mask' member of the set
structure. Without this, `set_lookkey_threadsafe()` could be looking at
the old value of `table` but the new value of `mask`.
2025-12-14 20:27:37 -08:00
AZero13
d844d22cb0
gh-142724: fix error path in _PyPegen_raise_tokenizer_init_error (#142725) 2025-12-14 21:23:38 +00:00
Neil Schemenauer
3f56186a2d
Use threading.Event rather than boolean flag. (gh-142722) 2025-12-14 12:42:11 -08:00
Adorilson Bezerra
3596dba691
gh-106318: Add examples for str.isnumeric() (#142680)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-14 20:12:12 +02:00
Pablo Galindo Salgado
e4d3c8395c
gh-138122: Add some screenshots to the profiling.sampling docs (#142676)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-14 17:43:03 +00:00
Stan Ulbrych
78a50ee10e
gh-76007: pydoc: Catch DeprecationWarning for stdlib module __version__ attributes (#139997) 2025-12-14 14:59:05 +02:00
Donghee Na
04da416e6b
gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_LIST_INT (gh-142703) 2025-12-14 12:26:00 +00:00
Serhiy Storchaka
af7cca3c39
gh-142681: Improve unicodedata tests (GH-142682) 2025-12-14 13:03:27 +02:00
Hugo van Kemenade
04a9009a53
gh-140189: Revert "Temporarily allow CI failures for iOS (#142365)" (#142660) 2025-12-14 12:54:42 +02:00
Stephen Morton
81bfcf1aae
gh-127930: use explicit imports in tkinter.simpledialog (#127931)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-14 12:38:42 +02:00
PuQing
a2a400af1e
gh-134584: Eliminate redundant refcounting from _CALL_BUILTION_O (GH-142695)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-14 10:28:02 +00:00
Bénédikt Tran
11aef219f5
gh-141938: document treatment of OSError raised by HTTPConnection.getresponse (#142339) 2025-12-14 11:12:20 +01:00
Yongtao Huang
e90e6d155a
gh-142666: Remove unused variable package in import logic (GH-142667)
The variable was previously used, but became unused after 133138a284.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
2025-12-14 11:39:45 +02:00
Nadeshiko Manju
a154c9ed4e
gh-134584: Eliminate redundant refcounting from _CALL_STR_1 (GH-136070)
Signed-off-by: Manjusaka <me@manjusaka.me>
2025-12-14 09:33:05 +00:00
Bénédikt Tran
d3ef5ba34d
gh-142451: correctly copy HMAC attributes in HMAC.copy() (#142510) 2025-12-14 09:45:36 +01:00
Bénédikt Tran
4e4163676a
gh-142554: avoid divmod crashes due to bad _pylong.int_divmod (#142673) 2025-12-14 09:38:23 +01:00
SYan212
39ecb17103
typo fixes in docs (#142683) 2025-12-14 13:47:22 +05:30
Savannah Ostrowski
f893e8f256
GH-142591: Tachyon does not handle non-existent file/module (#142592)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-14 04:58:40 +00:00
Pablo Galindo Salgado
52daab111b
gh-138122: Fix sample counting for filtered profiling modes (#142677) 2025-12-14 03:31:51 +00:00
Pablo Galindo Salgado
2eb9537509
gh-142368: Fix race comparing locations in test_external_inspection (#142691) 2025-12-14 03:31:42 +00:00
Stan Ulbrych
6cddf04344
Add 'Show translation source' to docs sidebar (#130355)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-12-14 01:03:23 +02:00
dr-carlos
e5a48480c0
Add missing comma to tuple in except* docs (#142395) 2025-12-14 00:51:35 +02:00
Serhiy Storchaka
87e152d203
gh-142461: Move misplaced NEWS entries to an appropriate section (#142464) 2025-12-14 00:44:25 +02:00
decorator-factory
f6b6a99aa5
gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (#142413) 2025-12-14 00:29:59 +02:00
Pablo Galindo Salgado
ff52e90ea4
Add pablogsal as codeowner for profiling sampling files and docs (#142678) 2025-12-13 19:10:59 +00:00