126936 Commits

Author SHA1 Message Date
Tomas R.
c492ac7252
GH-131798: Split up and optimize CALL_ISINSTANCE (GH-133339) 2025-05-08 14:26:30 -07:00
Łukasz Langa
b2fabce6ab
gh-133541: Handle SyntaxError raised by the tokenizer on user input (#133606) 2025-05-08 21:14:38 +01:00
Steve Dower
6ce469dcba
gh-133626: Ensure the traditional Windows installer doesn't accidentally pick up site-packages (GH-133693) 2025-05-08 20:47:36 +01:00
Rafael Fontenelle
9546eeea90
Fix typo in pending-removal-in-3.14.rst (GH-133680) 2025-05-08 18:57:23 +00:00
Tomasz Pytel
5dd3a3a58c
gh-132551: make io.BytesIO thread safe (#132616)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-08 18:51:36 +00:00
Adam Turner
bd7c5859c6
GH-132983: Remove subclassing support from zstd types (#133694)
For consistency with ``bz2``, ``lzma``, and ``zlib``.
2025-05-08 18:35:22 +00:00
Steve Dower
dd670fa7ca
Adds docs to help with troubleshooting pip installs. (GH-133692) 2025-05-08 19:30:01 +01:00
Adam Turner
6f6f48d289
gh-103092: Support subinterpreters in `_zstd` (#133674) 2025-05-08 19:11:34 +01:00
Tomas R.
3f2f59a91d
gh-133273: Keep instruction definitions in bytecodes.c and optimizer_bytecodes.c in sync (GH-133320) 2025-05-09 01:54:49 +08:00
Flosckow
5f3d3f2a6c
gh-133403: Check Tools/build/verify_ensurepip_wheels.py with mypy (#133453)
Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-08 17:53:47 +00:00
Angela Liss
421ba589d0
gh-132762: Fix underallocation bug in dict.fromkeys()(gh-133627)
The function `dict_set_fromkeys()` adds elements of a set to an existing
dictionary. The size of the expanded dictionary was estimated with
`PySet_GET_SIZE(iterable)`, which did not take into account the size of the
existing dictionary.
2025-05-08 13:13:11 -04:00
Kumar Aditya
2d82ab761a
gh-132886: use relaxed atomics for sock_fd in gil builds in socket module (#133208) 2025-05-08 22:33:41 +05:30
Brett Cannon
7d129f99ab
Clarify some wording in wasi(\.py)? (GH-133619) 2025-05-08 09:54:46 -07:00
Eric Snow
c81fa2b9cd
gh-132775: Add _PyCode_GetScriptXIData() (gh-133480)
This converts functions, code, str, bytes, bytearray, and memoryview objects to PyCodeObject,
and ensure that the object looks like a script.  That means no args, no return, and no closure.
_PyCode_GetPureScriptXIData() takes it a step further and ensures there are no globals.

We also add _PyObject_SupportedAsScript() to the internal C-API.
2025-05-08 15:07:46 +00:00
Xuehai Pan
f0f93ba5fa
gh-131942: Use the Python-specific Py_DEBUG macro rather than _DEBUG in Windows-related C code (GH-131944) 2025-05-08 15:01:25 +00:00
Serhiy Storchaka
e15bbfafbc
gh-131031: Fix test_pickle when invoked directly (GH-133356) 2025-05-08 17:51:18 +03:00
Jelle Zijlstra
bfac7d2edc
gh-133581: Improve AST unparsing of t-strings (#133635) 2025-05-08 06:13:57 -07:00
Bénédikt Tran
a2c4467d06
gh-133644: remove deprecated PyImport_ImportModuleNoBlock (#133655) 2025-05-08 13:08:43 +00:00
Serhiy Storchaka
26839eae20
gh-133454: Mark tests with many threads that use much memory as bigmem (GH-133456) 2025-05-08 15:57:30 +03:00
Serhiy Storchaka
dcf93c4c93
gh-133595: Clean up sqlite3.Connection APIs (GH-133605)
* All parameters of sqlite3.connect() except "database" are now keyword-only.
* The first three parameters of methods create_function() and
  create_aggregate() are now positional-only.
* The first parameter of methods set_authorizer(), set_progress_handler()
  and set_trace_callback() is now positional-only.
2025-05-08 15:42:00 +03:00
Duane Griffin
2561e148ec
gh-91555: disable logger while handling log record (GH-131812)
Prevent the possibility of re-entrancy leading to deadlock or infinite recursion (caused by logging triggered by logging), by disabling logging while the logger is handling log messages.
2025-05-08 13:33:06 +01:00
Adam Turner
8bb92863de
Update the PCbuild sub-projects list (GH-133397) 2025-05-08 12:31:24 +01:00
Sergey Miryanov
0ec8fc83a8
gh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32 (GH-133598) 2025-05-08 12:09:20 +01:00
Petr Viktorin
45bb5ba61a
gh-127833: Add links to token types to the lexical analysis intro (#131468)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 09:38:29 +00:00
Serhiy Storchaka
4c914e7a36
gh-133583: Add support for fixed size unsigned integers in argument parsing (GH-133584)
* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().
2025-05-08 12:27:50 +03:00
Stan Ulbrych
3224b99872
Doc: Allow translating a code block in the tutorial (#131353)
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 09:22:04 +00:00
Tan Long
4617d68d73
gh-133639: Fix test_auto_indent_default() doesn't run input_code (#133640) 2025-05-08 09:24:19 +01:00
dgpb
afed5f8835
gh-125028: Prohibit placeholders in partial keywords (GH-126062) 2025-05-08 10:53:53 +03:00
Jonas Obrist
4fcd377563
gh-133641: Doc: Add missing source link in `concurrent.futures` (#133642)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 07:21:51 +00:00
Neil Schemenauer
8679c8d5cc
gh-133467: Add TSAN suppressions for races in typeobject (gh-133534) 2025-05-08 04:46:23 +00:00
Neil Schemenauer
8598e57942
gh-133532: Run GC fast cycles test in subprocess. (gh-133533)
This makes the test more reliable since there are not extra objects on the heap leftover
from other tests.
2025-05-08 04:38:57 +00:00
Neil Schemenauer
751db4e649
gh-132917: Use /proc/self/status for mem usage info. (#133544)
On Linux, use /proc/self/status for mem usage info.  Using smaps_rollup is quite a lot slower and
we can get the similar info from /proc/self/status.
2025-05-08 04:32:23 +00:00
Jelle Zijlstra
0a3ccb8dff
gh-133551: Skip annotationlib for now in ast roundtrip tests (#133634) 2025-05-07 19:35:44 -07:00
Stan Ulbrych
0552ce0fb2
gh-127833: lexical analysis: Add backticks to BOM example (#132407) 2025-05-08 02:34:48 +01:00
Alex Prengère
b48599b801
gh-133555: Allow regenerating the parser with Python < 3.14 (#133557)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 02:28:20 +01:00
Jelle Zijlstra
90f476e0f8
gh-133551: Support t-strings in annotationlib (#133553)
I don't know why you'd use t-strings in annotations, but now if you do,
the STRING format will do a great job of recovering the source code.
2025-05-07 18:10:35 -07:00
Rogdham
2cc6de77bd
gh-132983: Remove pyzstd in identifiers (#133535) 2025-05-08 01:47:42 +01:00
Stan Ulbrych
9fcebb3611
gh-133530: Replace binary tree textual digram with image (gh-133591)
Replace with image
2025-05-07 19:05:06 -05:00
Eric Snow
27128e4fa8
gh-132775: Unrevert "Add _PyCode_VerifyStateless()" (gh-133528)
This reverts commit 3c73cf5 (gh-133497), which itself reverted
the original commit d270bb5 (gh-133221).

We reverted the original change due to failing android tests.
The checks in _PyCode_CheckNoInternalState() were too strict,
so we've relaxed them.
2025-05-08 00:00:33 +00:00
Yongzi Li
61ac88c06e
gh-133361: move the explanation of dict equal before its use (#133424)
Also move up the explanation of insertion order preservation.  Both paragraphs seemed out of place down where they were.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-07 18:04:49 -04:00
Victor Stinner
79b8a32fcb
gh-133558: Skip test_pdb tests on FreeBSD (#133566)
'\x08' is not interpreted as backspace on FreeBSD.
2025-05-07 22:59:29 +02:00
Zachary Ware
14291faa52
wasi: Update the location of the 'config.site' file in the build script (GH-133611)
Also remove Tools/wasm from mypy CI workflow
2025-05-07 20:48:41 +00:00
Zachary Ware
74e2acddf6
Test fixes for 3.15 (GH-133599)
Followup to 942673ed194813015d98819cfae7eba78ba5e1f9 (GH-133588)

* Update configure for Python 3.15

* Update magic number for 3.15

* Remove deprecated 'check_home' argument from sysconfig.is_python_build

* Add warningignore entries for Modules/_sqlite/clinic/connection.c.h

* Work around c-analyzer complaints about _testclinic deprecation tests

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-07 14:50:39 -05:00
Max Bachmann
1460ccefd0
gh-133537: Avoid using console I/O in WinAPI partitions that don't support it (GH-133538) 2025-05-07 20:47:05 +01:00
Max Bachmann
427f8c366d
gh-133517: Remove os.listdrive, os.listvolumes and os.listmounts in non-desktop Windows builds (GH-133518) 2025-05-07 20:45:42 +01:00
Brett Cannon
1a137bc320 Merge branch 'main' of https://github.com/python/cpython 2025-05-07 12:12:01 -07:00
sobolevn
50b52cba2d
gh-133403: Type Tools/build/update_file.py and check it with mypy (#133404) 2025-05-07 22:11:04 +03:00
Brett Cannon
ee49644cc9 GH-133600: Refactor wasi.py into wasi/__main__.py
Along the way, also move related files into their appropriate directories and update `.github/CODEOWNERS`.
2025-05-07 12:10:53 -07:00
Bénédikt Tran
a054af6edd
gh-133575: eliminate legacy checks in Lib/curses/__init__.py (#133576) 2025-05-07 20:28:32 +02:00
TERESH1
d9b0b07098
gh-133516: Raise ValueError when constants True, False or None are used as an identifier after NFKC normalization (#133523) 2025-05-07 19:11:25 +01:00