Commit graph

129731 commits

Author SHA1 Message Date
Mark Shannon
92d4aeafd5
GH-142629: JIT: Fix out of bounds memory read in lltrace (GH-142821)
JIT: Fix out of bounds memory read in lltrace
2025-12-16 19:57:15 +00:00
Gabriele N. Tornetta
16a305f152
Make RESUME monitoring more readable and robust (GH-142136) 2025-12-16 16:23:27 +00:00
Edward Xu
a043407510
gh-142495: Make defaultdict keep existed value when racing with __missing__ (GH-142668) 2025-12-16 17:04:20 +02:00
Hugo van Kemenade
47ec96f133 Post 3.15.0a3 2025-12-16 16:31:52 +02:00
Hugo van Kemenade
f1eb0c0b0c Python 3.15.0a3 2025-12-16 14:26:12 +02:00
Petr Viktorin
1cc7551b3f
gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (#142794)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-16 12:20:48 +00:00
Hugo van Kemenade
c10ec48bb9
gh-76007: Deprecate __version__ attribute in wsgiref.simple_server (#142675) 2025-12-16 14:08:51 +02:00
1nftf
e27f76b6fe
gh-142019: Add description about the exponent of result formatted with presentation type 'e' (#142084) 2025-12-16 13:56:12 +02:00
Cody Maloney
e12c744b0a
gh-83926: BlockingIOError characters_written is byte count (#141215) 2025-12-16 13:53:56 +02:00
Mikhail Efimov
cf7a309fbf
gh-119786: Remove mention of _PyThreadState_BumpFramePointer from InternalDocs/interpreter.md (#141816)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-12-16 13:49:14 +02:00
Mohsin Mehmood
b372bd7295
gh-141218: Fix inaccurate object comparison documentation (#141221)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-16 13:46:42 +02:00
Owain Davies
a15bd217b2
Remove duplicate content in Mapping types - dict documentation (#141036) 2025-12-16 13:46:13 +02:00
Cameron Beck
190aa9fe7e
Correct Glossary key function example to use str.casefold instead of str.lower (#140316) 2025-12-16 13:44:12 +02:00
Sergey B Kirpichev
2450be607c
decimal docs: specification link and examples (#128698)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-16 11:41:59 +00:00
Adorilson Bezerra
ec2619c080
gh-106318: Add examples for str.ljust() method (#142719)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 13:39:20 +02:00
Petr Viktorin
dab9fb3dc2
Clarify that PyStructSequence is different from collections.namedtuple (#142626) 2025-12-16 13:38:11 +02:00
Arthur Wigo
ba587ed8f3
gh-130536: Add details to os.path documentation (#130557) 2025-12-16 13:29:52 +02:00
Stan Ulbrych
c24e238417
gh-85204: Improve locale.setlocale example (#132683) 2025-12-16 13:26:33 +02:00
Patrick R
58027999bf
gh-124864: Extends smtplib documentation on ESMTP options format (#132547) 2025-12-16 13:21:38 +02:00
Bartosz Sławecki
a44509ea87
gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) 2025-12-16 11:15:37 +01:00
Sergey B Kirpichev
15a9762500
gh-142595: Amend be5e0dcded (fix NULL pointer dereference) (GH-142775) 2025-12-16 10:52:20 +02:00
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