Commit graph

126221 commits

Author SHA1 Message Date
Adam Turner
4d56c40440
GH-121970: Extract `implementation_detail` into a new extension (#129663) 2025-02-06 16:53:27 +00:00
Gregory P. Smith
ded54c3baa
Remove an inaccurate note from socket.recv (GH-129733)
Remove an inaccurate note from socket.recv.
2025-02-06 16:39:37 +00:00
Kumar Aditya
e7bc0cd182
gh-91048: fix _asyncio.future_discard_from_awaited_by (#129731)
fix discard
2025-02-06 16:35:33 +00:00
Kumar Aditya
75c551974f
gh-91048: fix thread safety for asyncio stack introspection APIs (#129399) 2025-02-06 21:33:52 +05:30
sobolevn
8b2fb62933
gh-129707: Check Tools/build/compute-changes.py with mypy (#129708)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-06 15:47:29 +00:00
Ken Jin
cb640b659e
gh-128563: A new tail-calling interpreter (GH-128718)
Co-authored-by: Garrett Gu <garrettgu777@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-06 23:21:57 +08:00
Sam Gross
555dc50c81
gh-129694: Add --parallel-threads TSAN job to CI (gh-129696)
For now, this just adds a single test suite to the TSAN CI to be run
with `--parallel-threads`.
2025-02-06 15:19:00 +00:00
Xuanteng Huang
55f17b77c3
gh-128714: Fix function object races in __annotate__, __annotations__ and __type_params__ in free-threading build (#129016) 2025-02-06 20:10:50 +05:30
sobolevn
63f0406d5a
gh-129643: Fix PyList_Insert in free-threading builds (#129680) 2025-02-06 15:54:40 +03:00
Miro Hrončok
779d06945c
gh-118915: Fix bad link in documentation (GH-129691) 2025-02-06 13:34:06 +01:00
Stan Ulbrych
a64e0a553b
_markupbase.py: Use a permalink for the analysis of MS-Word extensions (GH-129017)
Update _markupbase.py
2025-02-06 11:40:43 +01:00
Cody Maloney
052ca8ffe8
gh-129005: Update _pyio.BytesIO to use bytearray.resize on write (#129702)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-02-06 10:18:08 +00:00
Stan Ulbrych
d83a8a26f5
gh-86206: Change IDLE splash line (#129698)
Change splash line

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-06 07:55:25 +00:00
Stan Ulbrych
76e0182948
gh-69001: Replace maintainer email in IDLE credits (#129588)
Instead, anyone requesting credit should submit a PR with contribution summary.
(Also fix typo in existing name.)
2025-02-06 01:44:50 -05:00
Neil Schemenauer
cdcacec79f
gh-129201: Use prefetch in GC mark alive phase. (gh-129203)
For the free-threaded version of the cyclic GC, restructure the "mark alive" phase to use software prefetch instructions.  This gives a speedup in most cases when the number of objects is large enough.  The prefetching is enabled conditionally based on the number of long-lived objects the GC finds.
2025-02-05 11:38:30 -08:00
Cody Maloney
5fb019fc29
gh-129559: Add bytearray.resize() (GH-129560)
Add bytearray.resize() which wraps PyByteArray_Resize.

Make negative size passed to resize exception/error rather than crash in optimized builds.
2025-02-05 11:33:17 -08:00
Adam Turner
7d9a22f509
Convert change detection to a Python script (#129627)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-02-05 16:39:42 +00:00
Petr Viktorin
58a4357e29
gh-127833: Docs: Add a grammar-snippet directive & replace productionlist (GH-127835)
As a first step toward aligning the grammar documentation with Python's actual
grammar, this overrides the ReST `productionlist` directive to:
- use `:` instead of the `::=` symbol
- add syntax highlighting for strings (using a Pygments highlighting class)

All links and link targets should be preserved. (Unfortunately, this reaches
into some Sphinx internals; I don't see a better way to do exactly what
Sphinx does.)

This also adds a new directive, `grammar-snippet`, which formats the snippet
almost exactly like what's in the source, modulo syntax highlighting and
keeping the backtick character to mark links to other rules.
This will allow formatting the snippets as in the grammar file
(file:///home/encukou/dev/cpython/Doc/build/html/reference/grammar.html).

The new directive is applied to two simple rules in toplevel_components.rst

---------

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: William Ferreira <wqferr@gmail.com>
Co-authored-by: bswck <bartoszpiotrslawecki@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-05 16:12:23 +01:00
Victor Stinner
e5c3b7e349
gh-129354: Cleanup test_coroutines (#129684)
Remove unused variables.
2025-02-05 11:43:46 +00:00
Victor Stinner
a25042e6d2
gh-129354: Use PyErr_FormatUnraisable() function (#129523)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().

Update tests:

* test_coroutines
* test_exceptions
* test_generators
* test_struct
2025-02-05 10:31:59 +00:00
Victor Stinner
dc804ffb2f
gh-128911: Use PyImport_ImportModuleAttr() function (#129657)
* Replace PyImport_ImportModule() + PyObject_GetAttr() with
  PyImport_ImportModuleAttr().
* Replace PyImport_ImportModule() + PyObject_GetAttrString() with
  PyImport_ImportModuleAttrString().
2025-02-05 11:03:58 +01:00
Kumar Aditya
fb5d1c9236
gh-129643: fix thread safety of PyList_SetItem (#129644) 2025-02-05 13:08:02 +05:30
Tomas R.
e41ec8e18b
gh-104400: pygettext: Prepare to replace TokenEater with a NodeVisitor (#129672)
* Update the module docstring
* Move ``key_for`` inside the class
* Move ``write_pot_file`` outside the class
2025-02-04 22:59:23 +00:00
Sam Gross
e5f10a7414
gh-127933: Add option to run regression tests in parallel (gh-128003)
This adds a new command line argument, `--parallel-threads` to the
regression test runner to allow it to run individual tests in multiple
threads in parallel in order to find multithreading bugs.

Some tests pass when run with `--parallel-threads`, but there's still
more work before the entire suite passes.
2025-02-04 17:44:59 -05:00
neonene
285c1c4e95
gh-129660: Do not use test_embed in PGO profile builds (#129661) 2025-02-04 20:33:07 +01:00
Serhiy Storchaka
f61afca262
gh-129646: Update the locale alias mapping (#129647)
* gh-129646: Update the locale alias mapping

* Add a NEWS file.
2025-02-04 16:22:05 +01:00
Victor Stinner
14489c1bb4
gh-129354: Use PyErr_FormatUnraisable() function (#129656)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
2025-02-04 16:21:10 +01:00
Serhiy Storchaka
979d766209
gh-128772: Fix pydoc for methods with __module__ is None (GH-129177) 2025-02-04 16:25:49 +02:00
Serhiy Storchaka
8b5c8508c7
gh-129350: Make tests for glob with trailing slash more strict (GH-129376)
Test that the trailing pathname separator is preserved.

Multiple trailing pathname separators are only preserved if the pattern
does not contain metacharacters, otherwise only one trailing pathname
separator is preserved. This is rather an implementation detail.
2025-02-04 16:24:22 +02:00
Serhiy Storchaka
078ab828b9
Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
Mark Shannon
96ff4c2486
GH-128682: Mark two more macros as escaping. (GH-129645)
Expand out SETLOCAL so that code generator can see the decref. Mark Py_CLEAR as escaping
2025-02-04 14:00:51 +00:00
Mark Shannon
2effea4dab
GH-128682: Spill the stack pointer in labels, as well as instructions (GH-129618) 2025-02-04 12:18:31 +00:00
Yan Yanchii
d3c54f3788
gh-126835: Fix reference leak in Python/flowgrapc.::optimize_if_const_subscr (#129634) 2025-02-04 10:38:06 +00:00
Yan Yanchii
0664c1af9b
gh-126835: Move constant subscript folding to CFG (#129568)
Move folding of constant subscription from AST optimizer to CFG.

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-02-04 10:10:55 +02:00
donBarbos
bb5c6875d6
gh-111637: Clarify MIME type recognition behavior in mimetypes documentation (GH-129546) 2025-02-03 16:42:12 +00:00
Mark Shannon
75b628adeb
GH-128563: Generate opcode = ... in instructions that need opcode (GH-129608)
* Remove support for GO_TO_INSTRUCTION
2025-02-03 15:09:21 +00:00
Mark Shannon
808071b994
GH-128682: Make PyStackRef_CLOSE escaping. (GH-129404) 2025-02-03 12:41:32 +00:00
Victor Stinner
218f205f20
gh-129354: Use PyErr_FormatUnraisable() function (#129524)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().

Update test_sqlite3 tests.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2025-02-03 12:10:18 +00:00
Victor Stinner
04264a286e
gh-101944: Clarify PyModule_AddObjectRef() documentation (#129433) 2025-02-03 12:55:22 +01:00
Peter Bierma
39b754a359
gh-129407: Clarify that a SystemError isn't always CPython's fault (#129410) 2025-02-03 12:46:13 +01:00
Victor Stinner
632ca56821
gh-129342: Explain how to replace Py_GetProgramName() in C (#129361) 2025-02-03 12:36:41 +01:00
Illia Volochii
a33dcb9e43
gh-81340: Use copy_file_range in shutil.copyfile copy functions (GH-93152)
This allows the underlying file system an opportunity to optimise or avoid the actual copy.
2025-02-03 10:23:27 +00:00
Diego Russo
a29a9c0f38
GH-129231: Group executable JIT code in memory (GH-129232) 2025-02-02 15:19:55 -08:00
Diego Russo
567394517a
GH-128842: Collect JIT memory stats (GH-128941) 2025-02-02 15:17:53 -08:00
Yan Yanchii
e6c76b947b
GH-128872: Remove unused argument from _PyCode_Quicken (GH-128873)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-02-02 15:09:30 -08:00
Erlend E. Aasland
ecd2f84555
gh-105875: amend sqlite3 docstring wrt. SQLite requirement (#129599) 2025-02-02 23:03:54 +00:00
Victor Stinner
2ad069d906
gh-91417: Remove PySequence_Fast() from the limited C API (#129398)
The function never worked with the limited C API. It was added by
mistake.
2025-02-02 23:17:30 +01:00
Adam Turner
ae4788809d
GH-121970: Extract `misc_news` into a new extension (#129577) 2025-02-02 16:17:02 +00:00
Adam Turner
0612a89ffc
gh-126609: Allow translating the `availability` directive (#129549) 2025-02-02 16:12:01 +00:00
Vojtěch Boček
4e38eeafe2
gh-115514: Fix incomplete writes after close while using ssl in asyncio(#128037)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-02 15:11:25 +00:00