Commit graph

126914 commits

Author SHA1 Message Date
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 942673ed19 (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
Hugo van Kemenade
942673ed19
Finishing touches to update main branch for 3.15 (#133588) 2025-05-07 20:46:41 +03:00
Hugo van Kemenade
5ea24116b0 Merge branch 'main' of https://github.com/python/cpython 2025-05-07 18:53:08 +03:00
Brian Schubert
ee76e36d76
gh-131535: Fix stale example in html.parser docs, make examples doctests (GH-131551) 2025-05-07 18:50:05 +03:00
Sascha Ißbrücker
77b14a6d58
gh-69426: HTMLParser: only unescape properly terminated character entities in attribute values (GH-95215)
According to the HTML5 spec, named character references in attribute values
should only be processed if they are not followed by an ASCII alphanumeric,
or an equals sign.

https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
2025-05-07 18:49:49 +03:00
Hugo van Kemenade
9748fb3867 Python 3.15.0a0 2025-05-07 18:47:42 +03:00
Hugo van Kemenade
b092705907 Python 3.14.0b1 2025-05-06 18:33:52 +03:00
Hugo van Kemenade
5f01b00dea Python 3.14.0b1 2025-05-06 18:32:57 +03:00
Hugo van Kemenade
3dfed23092
gh-123299: Copyedit "What's New in Python 3.14" (#133452)
Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
2025-05-06 15:05:20 +03:00
Adam Turner
f8691901d7
GH-132983: Remove zstd version check in the header file (#133502) 2025-05-06 15:04:50 +03:00
Semyon Moroz
bf8bbe9a81
gh-77065: Add optional keyword-only argument echo_char for getpass.getpass (#130496)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-06 14:56:20 +03:00
T. Wouters
53e6d76aa3
gh-132917: Fix data race detected by tsan (#133508)
Fix data race detected by tsan
(4171271720):
young.count can be modified by other threads even while the gcstate is
locked.

This is the simplest fix to (potentially) unblock beta 1, although this
particular code path seems like it could just be an atomic swap followed by
an atomic add, without having the lock at all.
2025-05-06 11:23:10 +00:00
Irit Katriel
296cd128bf
Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498) 2025-05-06 13:12:26 +03:00
Petr Viktorin
3c73cf51df
gh-132775: Revert "gh-132775: Add _PyCode_VerifyStateless() (gh-133221)" (#133497) 2025-05-06 13:09:41 +03:00
Matt Wozniski
fd37f1a8ad
gh-133490: Fix syntax highlighting for remote PDB (#133494) 2025-05-06 11:44:49 +02:00
Emma Smith
120c9d42f2
gh-132983: Add What's New entry for PEP 784 implementation (#133495)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-06 06:54:40 +00:00
Zachary Ware
5b07c6eb89
gh-81793: Replace skip decorators with specific helpers (GH-133493) 2025-05-06 05:58:38 +00:00
Jelle Zijlstra
6a8f6eddd3
typing: Modernize type annotations on IO classes (#133487)
Remove unnecessary strings, use of Union[], use of List[], and reliance
on implicit Optional.

These type annotations are not actually used for anything but I feel
we should set a good example.
2025-05-06 05:32:38 +00:00
Matt Wozniski
982830ce56
gh-133490: Add color support to remote PDB (#133491) 2025-05-06 01:28:16 -04:00
Brandt Bucher
57c9810ba4
GH-113464: Add the JIT to What's New (GH-133486) 2025-05-05 20:06:41 -07:00
Jelle Zijlstra
dbee142a01
gh-132493: Avoid eager evaluation of annotations in @reprlib.recursive_repr() (#133411) 2025-05-05 19:20:11 -07:00
Valentin Berlier
b936ccdb6f
gh-130117: Document why nested Union, Literal, and Annotated types referenced through a type alias are not flattened (#130119)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-05 19:05:16 -07:00
Adam Turner
529012e26f
Remove duplicate includes: Include/internal/ (#132624) 2025-05-06 02:08:42 +01:00