Commit Graph

123124 Commits

Author SHA1 Message Date
Sam Gross 2b163aa9e7
gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded build (#122190)
The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.
2024-07-30 13:53:47 -04:00
Łukasz Langa 1d8e453907
gh-116402: Avoid readline in test_builtin TTY input tests (GH-122447) 2024-07-30 16:57:19 +00:00
Sam Gross 8fb88b22b7
gh-121946: Temporarily switch to llvm-17 in TSan CI again (GH-122466)
The Ubuntu package for llvm-18 is broken
2024-07-30 15:30:52 +00:00
Dino Viehland d1a1bca1f0
gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) 2024-07-30 14:03:52 +02:00
Clinton d27a53fc02
gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) 2024-07-30 11:53:07 +03:00
Bénédikt Tran 3a9b2aae61
gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
Petr Viktorin 3833d27f98
gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)
Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it.

Partially reverts 2211454fe2
2024-07-30 09:37:58 +02:00
Adam Turner 11ad731f4f
GH-121970: Extract ``audit_events`` into a new extension (#122325) 2024-07-30 03:49:00 +00:00
Sam Gross ac8da34621
gh-122420: Fix accounting for immortal interned strings in refleak.py (GH-122421)
The `_PyUnicode_Intern*` functions already adjust the total refcount, so
we don't want to readjust it in refleak.py.
2024-07-30 00:15:03 +02:00
Brandt Bucher 7797182b78
GH-118093: Improve handling of short and mid-loop traces (GH-122252) 2024-07-29 14:49:17 -07:00
Seth Michael Larson 78df1043db
gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134)
* Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-29 14:44:35 -07:00
Adam Turner 76bdfa4cd0
GH-122085: Use include files for C API deprecations (#109843) 2024-07-29 22:20:40 +01:00
Donghee Na 046670c3a0
gh-121996: Fix --disable-safety and --enable-slower-safety options (gh-122414) 2024-07-29 19:20:36 +00:00
Brandt Bucher 15d4cd0967
GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122413) 2024-07-29 12:17:47 -07:00
Serhiy Storchaka 68840e91ac
gh-122311: Fix a refleak in pickle (GH-122411) 2024-07-29 21:52:48 +03:00
Eric Snow 490e0ad83a
gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122248)
The tests were only checking cases where the slot wrapper was present in the initial case.  They were missing when the slot wrapper was added in the additional initializations.  This fixes that.
2024-07-29 10:23:23 -06:00
Petr Viktorin 89fa05fdce
gh-122234: Add DECREFs to error paths (#122406)
Co-Authored-By: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-29 16:10:25 +00:00
Kirill Podoprigora 9187484dd9
gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (#122293) 2024-07-29 12:59:42 +02:00
Serhiy Storchaka 0697188084
gh-122311: Add more tests for error messages in pickle (GH-122373) 2024-07-29 13:40:16 +03:00
Serhiy Storchaka 3b034d26eb
gh-122311: Fix some error messages in pickle (GH-122386) 2024-07-29 11:49:13 +03:00
Sergey B Kirpichev 169e7138ab
gh-122234: fix accuracy issues for sum() (#122236)
* Use compensated summation for complex sums with floating-point items.
  This amends #121176.

* sum() specializations for floats and complexes now use
  PyLong_AsDouble() instead of PyLong_AsLongAndOverflow() and
  compensated summation as well.
2024-07-29 05:56:40 +02:00
Serhiy Storchaka bc93923a2d
gh-122311: Add more tests for pickle (GH-122376) 2024-07-28 11:33:17 +03:00
Victor Stinner b359f66c4c
gh-120593: Make _PyLong_CompactValue() parameter const again (#122367)
Change _PyLong_IsCompact() and _PyLong_CompactValue() parameter type
from 'PyObject*' to 'const PyObject*'. Avoid the Py_TYPE() macro
which does not support const parameter.
2024-07-28 09:59:07 +02:00
Hugo van Kemenade aa449cf063
gh-122085: Create dedicated page for deprecations (#122352)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-28 10:53:21 +03:00
Jelle Zijlstra 3ff5ce4706
gh-119180: Add myself as CODEOWNER for annotationlib (#122366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-28 10:50:14 +03:00
sobolevn 04eb5c8db1
gh-122361: Use proper `PyUnicodeWriter_*` API in `constevaluator_call` (#122362) 2024-07-27 21:33:38 +03:00
Jelle Zijlstra ae192262ad
gh-119180: Add evaluate functions for type params and type aliases (#122212) 2024-07-27 17:24:10 +00:00
Barney Gale cbac8a3888
GH-121462: pathlib docs: improve table of corresponding os/os.path functions (#121465)
Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.
2024-07-27 18:03:18 +01:00
Jelle Zijlstra 45614ecb2b
gh-119180: Use type descriptors to access annotations (PEP 749) (#122074) 2024-07-27 16:36:06 +00:00
Hugo van Kemenade 4e75509349
gh-122085: Use include files for `whatsnew/3.14.rst` deprecations (#122242) 2024-07-27 14:17:54 +03:00
Seth Michael Larson 4e04d1a3d2
gh-122044: Don't error during gitignore filtering with no files (#122045) 2024-07-27 14:10:05 +03:00
Bénédikt Tran 7a6d4ccf0e
gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) 2024-07-27 10:10:42 +00:00
Nate Ohlson 8ac5565be2
gh-112301: Compiler warning management tooling (#121730)
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>
2024-07-27 09:57:44 +00:00
Petr Viktorin bb09ba6792
gh-122291: Intern latin-1 one-byte strings at startup (GH-122303) 2024-07-27 10:27:06 +02:00
Peter Bierma c08696286f
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (#122338) 2024-07-27 11:57:48 +05:30
Russell Keith-Magee 863a92f2bc
gh-121832: Revert test skip introduced by #122150. (#122340)
Revert test skip introduced by #122150.
2024-07-27 10:24:30 +08:00
Russell Keith-Magee 4a2607c180
gh-120831: Correct default minimum iOS version. (#122339)
Correct default minimum iOS version.
2024-07-27 01:53:44 +00:00
Adam Turner 762e771cc0
Fix underline for 'pty' in What's New in Python 3.14 (#122337) 2024-07-27 01:00:56 +00:00
Subrahmanya Gaonkar d52726ccd4
Document ``mimetypes.MimeTypes.add_type()`` (#122301)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-26 22:03:08 +00:00
Carol Willing 33586d64ca
Remove reference to docs mailing list for bug reports (#122323) 2024-07-26 13:56:39 -07:00
Irit Katriel d791b9815a
gh-122245: Add test case of generic type with __debug__ (#122322) 2024-07-26 18:40:36 +00:00
Mark Shannon 1ca99ed240
Manually override bytecode definition in optimizer, to avoid build error (GH-122316) 2024-07-26 18:38:52 +01:00
Sam Gross c557ae97d6
gh-122201: Lock mutex when setting handling_thread to NULL (#122204)
In the free-threaded build, we need to lock pending->mutex when clearing
the handling_thread in order not to race with a concurrent
make_pending_calls in the same interpreter.
2024-07-26 13:06:07 -04:00
Brandt Bucher 64857d849f
GH-122294: Burn in the addresses of side exits (GH-122295) 2024-07-26 09:40:15 -07:00
Pablo Galindo Salgado db2d8b6db1
gh-122300: Preserve AST nodes for format specifiers with single elements (#122308) 2024-07-26 16:29:41 +00:00
Serhiy Storchaka 7c2921844f
gh-122311: Fix typo in the pickle error formatting code (GH-122312) 2024-07-26 14:48:44 +00:00
WilliamRoyNelson dcafb362f7
gh-121999: Change default tarfile filter to 'data' (GH-122002)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Scott Odle <scott@sjodle.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-26 16:34:13 +02:00
Irit Katriel bc94cf7e25
gh-122245: move checks for writes and shadowing of __debug__ to symtable (#122246) 2024-07-26 14:39:56 +01:00
Mark Shannon 2c42e13e80
GH-116090: Fix test and clarify behavior for exception events when exhausting a generator. (GH-120697) 2024-07-26 14:37:35 +01:00
Mark Shannon 95a73917cd
GH-122029: Break INSTRUMENTED_CALL into micro-ops, so that its behavior is consistent with CALL (GH-122177) 2024-07-26 14:35:57 +01:00