]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Seth Michael Larson [Mon, 29 Jul 2024 21:44:35 +0000 (16:44 -0500)]
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>
Adam Turner [Mon, 29 Jul 2024 21:20:40 +0000 (22:20 +0100)]
GH-122085: Use include files for C API deprecations (#109843)
Donghee Na [Mon, 29 Jul 2024 19:20:36 +0000 (04:20 +0900)]
gh-121996: Fix --disable-safety and --enable-slower-safety options (gh-122414)
Brandt Bucher [Mon, 29 Jul 2024 19:17:47 +0000 (12:17 -0700)]
GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122413)
Serhiy Storchaka [Mon, 29 Jul 2024 18:52:48 +0000 (21:52 +0300)]
gh-122311: Fix a refleak in pickle (GH-122411)
Eric Snow [Mon, 29 Jul 2024 16:23:23 +0000 (10:23 -0600)]
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.
Petr Viktorin [Mon, 29 Jul 2024 16:10:25 +0000 (18:10 +0200)]
gh-122234: Add DECREFs to error paths (#122406)
Co-Authored-By: Kirill Podoprigora <kirill.bast9@mail.ru>
Kirill Podoprigora [Mon, 29 Jul 2024 10:59:42 +0000 (13:59 +0300)]
gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (#122293)
Serhiy Storchaka [Mon, 29 Jul 2024 10:40:16 +0000 (13:40 +0300)]
gh-122311: Add more tests for error messages in pickle (GH-122373)
Serhiy Storchaka [Mon, 29 Jul 2024 08:49:13 +0000 (11:49 +0300)]
gh-122311: Fix some error messages in pickle (GH-122386)
Sergey B Kirpichev [Mon, 29 Jul 2024 03:56:40 +0000 (06:56 +0300)]
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.
Serhiy Storchaka [Sun, 28 Jul 2024 08:33:17 +0000 (11:33 +0300)]
gh-122311: Add more tests for pickle (GH-122376)
Victor Stinner [Sun, 28 Jul 2024 07:59:07 +0000 (09:59 +0200)]
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.
Hugo van Kemenade [Sun, 28 Jul 2024 07:53:21 +0000 (10:53 +0300)]
gh-122085: Create dedicated page for deprecations (#122352)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Jelle Zijlstra [Sun, 28 Jul 2024 07:50:14 +0000 (00:50 -0700)]
gh-119180: Add myself as CODEOWNER for annotationlib (#122366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
sobolevn [Sat, 27 Jul 2024 18:33:38 +0000 (21:33 +0300)]
gh-122361: Use proper `PyUnicodeWriter_*` API in `constevaluator_call` (#122362)
Jelle Zijlstra [Sat, 27 Jul 2024 17:24:10 +0000 (10:24 -0700)]
gh-119180: Add evaluate functions for type params and type aliases (#122212)
Barney Gale [Sat, 27 Jul 2024 17:03:18 +0000 (18:03 +0100)]
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.
Jelle Zijlstra [Sat, 27 Jul 2024 16:36:06 +0000 (09:36 -0700)]
gh-119180: Use type descriptors to access annotations (PEP 749) (#122074)
Hugo van Kemenade [Sat, 27 Jul 2024 11:17:54 +0000 (14:17 +0300)]
gh-122085: Use include files for `whatsnew/3.14.rst` deprecations (#122242)
Seth Michael Larson [Sat, 27 Jul 2024 11:10:05 +0000 (06:10 -0500)]
gh-122044: Don't error during gitignore filtering with no files (#122045)
Bénédikt Tran [Sat, 27 Jul 2024 10:10:42 +0000 (12:10 +0200)]
gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176)
Nate Ohlson [Sat, 27 Jul 2024 09:57:44 +0000 (04:57 -0500)]
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>
Petr Viktorin [Sat, 27 Jul 2024 08:27:06 +0000 (10:27 +0200)]
gh-122291: Intern latin-1 one-byte strings at startup (GH-122303)
Peter Bierma [Sat, 27 Jul 2024 06:27:48 +0000 (02:27 -0400)]
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (#122338)
Russell Keith-Magee [Sat, 27 Jul 2024 02:24:30 +0000 (12:24 +1000)]
gh-121832: Revert test skip introduced by #122150. (#122340)
Revert test skip introduced by #122150.
Russell Keith-Magee [Sat, 27 Jul 2024 01:53:44 +0000 (11:53 +1000)]
gh-120831: Correct default minimum iOS version. (#122339)
Correct default minimum iOS version.
Adam Turner [Sat, 27 Jul 2024 01:00:56 +0000 (02:00 +0100)]
Fix underline for 'pty' in What's New in Python 3.14 (#122337)
Subrahmanya Gaonkar [Fri, 26 Jul 2024 22:03:08 +0000 (03:33 +0530)]
Document ``mimetypes.MimeTypes.add_type()`` (#122301)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Carol Willing [Fri, 26 Jul 2024 20:56:39 +0000 (13:56 -0700)]
Remove reference to docs mailing list for bug reports (#122323)
Irit Katriel [Fri, 26 Jul 2024 18:40:36 +0000 (19:40 +0100)]
gh-122245: Add test case of generic type with __debug__ (#122322)
Mark Shannon [Fri, 26 Jul 2024 17:38:52 +0000 (18:38 +0100)]
Manually override bytecode definition in optimizer, to avoid build error (GH-122316)
Sam Gross [Fri, 26 Jul 2024 17:06:07 +0000 (13:06 -0400)]
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.
Brandt Bucher [Fri, 26 Jul 2024 16:40:15 +0000 (09:40 -0700)]
GH-122294: Burn in the addresses of side exits (GH-122295)
Pablo Galindo Salgado [Fri, 26 Jul 2024 16:29:41 +0000 (17:29 +0100)]
gh-122300: Preserve AST nodes for format specifiers with single elements (#122308)
Serhiy Storchaka [Fri, 26 Jul 2024 14:48:44 +0000 (17:48 +0300)]
gh-122311: Fix typo in the pickle error formatting code (GH-122312)
WilliamRoyNelson [Fri, 26 Jul 2024 14:34:13 +0000 (07:34 -0700)]
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>
Irit Katriel [Fri, 26 Jul 2024 13:39:56 +0000 (14:39 +0100)]
gh-122245: move checks for writes and shadowing of __debug__ to symtable (#122246)
Mark Shannon [Fri, 26 Jul 2024 13:37:35 +0000 (14:37 +0100)]
GH-116090: Fix test and clarify behavior for exception events when exhausting a generator. (GH-120697)
Mark Shannon [Fri, 26 Jul 2024 13:35:57 +0000 (14:35 +0100)]
GH-122029: Break INSTRUMENTED_CALL into micro-ops, so that its behavior is consistent with CALL (GH-122177)
Mark Shannon [Fri, 26 Jul 2024 11:24:12 +0000 (12:24 +0100)]
GH-121131: Clean up and fix some instrumented instructions. (GH-121132)
* Add support for 'prev_instr' to code generator and refactor some INSTRUMENTED instructions
Brandt Bucher [Thu, 25 Jul 2024 21:45:07 +0000 (14:45 -0700)]
GH-118093: Add tier two support for BINARY_OP_INPLACE_ADD_UNICODE (GH-122253)
Sviatoslav Sydorenko (Святослав Сидоренко) [Thu, 25 Jul 2024 20:27:26 +0000 (22:27 +0200)]
Move macOS matrix to the calling workflow (#121809)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Brandt Bucher [Thu, 25 Jul 2024 17:45:28 +0000 (10:45 -0700)]
GH-118093: Add tier two support for LOAD_ATTR_PROPERTY (GH-122283)
Mark Shannon [Thu, 25 Jul 2024 17:32:43 +0000 (18:32 +0100)]
GH-122034: Add StackRef variants of type checks to reduce the number of PyStackRef_AsPyObjectBorrow calls (GH-122037)
Marc Mueller [Thu, 25 Jul 2024 15:31:30 +0000 (17:31 +0200)]
gh-121489: Export private _PyBytes_Join() again (#122267)
Mark Shannon [Thu, 25 Jul 2024 15:24:29 +0000 (16:24 +0100)]
GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164)
Serhiy Storchaka [Thu, 25 Jul 2024 14:31:57 +0000 (17:31 +0300)]
gh-116322: Fix typo in the #ifdef check (#122268)
AN Long [Thu, 25 Jul 2024 12:03:39 +0000 (20:03 +0800)]
gh-121275: Fix test_logging and test_smtplib with Python build withoud IPv6 support (#121276)
Fix test_logging and test_smtplib with Python build withoud IPv6 support
AN Long [Thu, 25 Jul 2024 11:56:04 +0000 (19:56 +0800)]
gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (#122269)
Serhiy Storchaka [Thu, 25 Jul 2024 11:04:22 +0000 (14:04 +0300)]
gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271)
Serhiy Storchaka [Thu, 25 Jul 2024 08:45:19 +0000 (11:45 +0300)]
gh-82951: Fix serializing by name in pickle protocols < 4 (GH-122149)
Serializing objects with complex __qualname__ (such as unbound methods and
nested classes) by name no longer involves serializing parent objects by value
in pickle protocols < 4.
Nate Ohlson [Thu, 25 Jul 2024 08:35:23 +0000 (04:35 -0400)]
gh-112301: Make fortify source option check -Werror (gh-122141)
Sam Gross [Thu, 25 Jul 2024 08:16:53 +0000 (04:16 -0400)]
gh-122187: Avoid TSan reported race in `run_udp_echo_server` (#122189)
TSan doesn't fully recognize the synchronization via I/O, so ensure that
socket name is retrieved earlier and use a different socket for sending
the "STOP" message.
Serhiy Storchaka [Thu, 25 Jul 2024 07:12:26 +0000 (10:12 +0300)]
gh-122087: Add tests for ismethoddescriptor() and isroutine() with partial objects (GH-122219)
Mikołaj Kuranowski [Thu, 25 Jul 2024 07:04:47 +0000 (09:04 +0200)]
gh-113785: csv: fields starting with escapechar are not quoted (GH-122110)
Serhiy Storchaka [Thu, 25 Jul 2024 06:57:22 +0000 (09:57 +0300)]
gh-122191: Fix test_warnings failure if run with -Werror (GH-122222)
__spec__.loader is now required in the module globals (see gh-86298).
Dino Viehland [Wed, 24 Jul 2024 17:58:28 +0000 (10:58 -0700)]
gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail (#122207)
Don't delivery PyDict_EVENT_ADDED until it can't fail
Irit Katriel [Wed, 24 Jul 2024 16:22:18 +0000 (17:22 +0100)]
gh-121404: extract compiler_lookup_arg out of compiler_make_closure (#122181)
Brandt Bucher [Wed, 24 Jul 2024 16:16:30 +0000 (09:16 -0700)]
GH-118093: Remove invalidated executors from side exits (GH-121885)
sobolevn [Wed, 24 Jul 2024 12:47:52 +0000 (15:47 +0300)]
gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230)
Sviatoslav Sydorenko (Святослав Сидоренко) [Wed, 24 Jul 2024 09:46:39 +0000 (11:46 +0200)]
Integrate `build_msi` into main CI workflow (#121778)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Mark Shannon [Wed, 24 Jul 2024 09:22:51 +0000 (10:22 +0100)]
GH-121832: Assert that the version number of static builtin types is not changed by PyType_Modified. (GH-122182)
Update datetime module and test_type_cache.py to not call PyType_Modified.
Hugo van Kemenade [Wed, 24 Jul 2024 08:29:35 +0000 (11:29 +0300)]
gh-122085: Use include files for `whatsnew/3.12.rst` deprecations (#122093)
Xie Yanbo [Wed, 24 Jul 2024 06:49:58 +0000 (14:49 +0800)]
Fix typo in news document (GH-122209)
Cody Maloney [Wed, 24 Jul 2024 06:14:35 +0000 (23:14 -0700)]
GH-120754: Add more tests around seek + readall (#122103)
In the process of speeding up readall, A number of related tests
(ex. large file tests in test_zipfile) found problems with the
change I was making. This adds I/O tests to specifically test these
cases to help ensure they don't regress and hopefully make debugging
easier.
This is part of the improvements from
https://github.com/python/cpython/pull/121593#issuecomment-
2222261986
Tian Gao [Tue, 23 Jul 2024 22:25:26 +0000 (15:25 -0700)]
gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)
Log call events in sys.setprofile when it is a method with a C function.
Eric Snow [Tue, 23 Jul 2024 21:19:17 +0000 (15:19 -0600)]
gh-122199: Skip test_slot_wrappers When Checking For Refleaks (gh-122200)
Jelle Zijlstra [Tue, 23 Jul 2024 21:16:50 +0000 (14:16 -0700)]
gh-119180: Add `annotationlib` module to support PEP 649 (#119891)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sam Gross [Tue, 23 Jul 2024 20:30:49 +0000 (16:30 -0400)]
gh-117657: Skip tests that use threads after fork (#122194)
These tests fail when run under thread sanitizer due to the use of fork
and threads.
Eric Snow [Tue, 23 Jul 2024 19:57:26 +0000 (13:57 -0600)]
gh-117482: Expand Tests for Slot Wrappers of Inherited Slots of Static Builtin Types (gh-122192)
Serhiy Storchaka [Tue, 23 Jul 2024 17:45:21 +0000 (20:45 +0300)]
gh-122129: Improve support of method descriptors and wrappers in the help title (GH-122157)
Sam Gross [Tue, 23 Jul 2024 17:06:03 +0000 (13:06 -0400)]
gh-120974: Make _asyncio._leave_task atomic in the free-threaded build (#122139)
* gh-120974: Make _asyncio._leave_task atomic in the free-threaded build
Update `_PyDict_DelItemIf` to allow for an argument to be passed to the
predicate.
Serhiy Storchaka [Tue, 23 Jul 2024 17:02:54 +0000 (20:02 +0300)]
gh-122163: Add notes for JSON serialization errors (GH-122165)
This allows to identify the source of the error.
Sam Gross [Tue, 23 Jul 2024 16:24:24 +0000 (12:24 -0400)]
gh-120974: Use common freelist code in asyncio (#122132)
This refactors asyncio to use the common freelist helper functions and
macros. As a side effect, the freelist for _asyncio.Future is now
re-enabled in the free-threaded build.
Sam Gross [Tue, 23 Jul 2024 13:17:13 +0000 (09:17 -0400)]
gh-121973: Fix flaky test_pyrepl tests (GH-122140)
This fixes the flakiness in:
* test_inspect_keeps_globals_from_inspected_file
* test_inspect_keeps_globals_from_inspected_module
The output already includes newlines. Adding newlines for every entry in
the output list introduces non-determinism because it added '\n' in
places where stdout is flushed or some buffer becomes full.
The regex also needed to be updated because pyrepl includes control
characters -- the visible output on each line doesn't immediately follow
a newline character.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Mark Shannon [Tue, 23 Jul 2024 13:12:06 +0000 (14:12 +0100)]
GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling (GH-122158)
Ville Skyttä [Tue, 23 Jul 2024 13:08:39 +0000 (16:08 +0300)]
Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (#122083)
Adam Turner [Tue, 23 Jul 2024 12:30:06 +0000 (13:30 +0100)]
GH-121970: Remove ``escape4chm`` (#122065)
Russell Keith-Magee [Tue, 23 Jul 2024 10:17:50 +0000 (20:17 +1000)]
gh-121832: Skip subinterpreter static type check on iOS to restore test suite. (GH-122150)
Sebastian Rittau [Tue, 23 Jul 2024 09:59:28 +0000 (11:59 +0200)]
gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` (#122086)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Xie Yanbo [Tue, 23 Jul 2024 09:04:14 +0000 (17:04 +0800)]
Fix typos in comments and exception message (#122147)
Sam Gross [Tue, 23 Jul 2024 08:47:14 +0000 (04:47 -0400)]
gh-120974: Make _asyncio._enter_task atomic in the free-threaded build (#122138)
Use `PyDict_SetDefaultRef` to set the current task in a single operation
under the dictionary's lock.
Donghee Na [Tue, 23 Jul 2024 00:22:04 +0000 (09:22 +0900)]
gh-121996: Introduce --disable-safety and --enable-slower-safety options (#122054)
* gh-121996: Introduce --disable-safty and --enable-slower-safty
* Update GA
* fix
* Address code review
* Update CI
Jelle Zijlstra [Mon, 22 Jul 2024 21:12:43 +0000 (14:12 -0700)]
gh-121637: Syntax error for optimized-away incorrect await (#121656)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Serhiy Storchaka [Mon, 22 Jul 2024 18:43:00 +0000 (21:43 +0300)]
Refactor test_capi.test_long (GH-122113)
Share common code for tests for PyLong_As*() functions.
Co-authored-by: Victor Stinner <vstinner@python.org>
Sam Gross [Mon, 22 Jul 2024 17:33:40 +0000 (13:33 -0400)]
Revert "gh-121946: Temporarily switch to llvm-17 in TSan CI (#121975)" (#122032)
This reverts commit
12c1afa9d153fbdf78c970054c08c755f504c5e9 .
The LLVM 18 Ubuntu package is working now.
Irit Katriel [Mon, 22 Jul 2024 16:48:30 +0000 (17:48 +0100)]
gh-121404: move calculation of module start location from compiler_body up to compiler_codegen (#122127)
Sam Gross [Mon, 22 Jul 2024 16:08:27 +0000 (12:08 -0400)]
gh-100240: Use a consistent implementation for freelists (#121934)
This combines and updates our freelist handling to use a consistent
implementation. Objects in the freelist are linked together using the
first word of memory block.
If configured with freelists disabled, these operations are essentially
no-ops.
HarryLHW [Mon, 22 Jul 2024 15:05:23 +0000 (23:05 +0800)]
gh-121795: Improve performance of set membership testing from set arguments (#121796)
Bradley Reynolds [Mon, 22 Jul 2024 15:03:20 +0000 (10:03 -0500)]
Remove now unused function from itertools tests (#122100)
Bénédikt Tran [Mon, 22 Jul 2024 14:04:17 +0000 (16:04 +0200)]
gh-119698: deprecate ``symtable.Class.get_methods`` (#121902)
Łukasz Langa [Mon, 22 Jul 2024 11:04:08 +0000 (13:04 +0200)]
gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958)
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
Łukasz Langa [Mon, 22 Jul 2024 11:03:07 +0000 (13:03 +0200)]
gh-111051: [tests] Wait a second to support filesystems with low-resolution mtime (GH-121959)
Ville Skyttä [Mon, 22 Jul 2024 01:14:25 +0000 (04:14 +0300)]
Docs: spelling and grammar fixes (#122084)
Corrected some grammar and spelling issues in documentation.
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Russell Keith-Magee [Sun, 21 Jul 2024 23:36:08 +0000 (09:36 +1000)]
gh-120522: Apply App Store compliance patch during installation (#121947)
Adds a --with-app-store-compliance configuration option that patches out code known to be an issue with App Store review processes. This option is applied automatically on iOS, and optionally on macOS.
Kirill Podoprigora [Sun, 21 Jul 2024 19:48:39 +0000 (22:48 +0300)]
gh-122096: Remove accidentally left debugging prints (#122097)
Sviatoslav Sydorenko (Святослав Сидоренко) [Sun, 21 Jul 2024 19:09:23 +0000 (21:09 +0200)]
Merge Ubuntu test matrices in CI (#121813)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Jakub Kulík [Sun, 21 Jul 2024 16:50:14 +0000 (18:50 +0200)]
gh-118124: fix assert related C++ checks on Solaris/Illumos (#121974)
Fix check for static_assert() for C++ on some platforms.
Andrey Mishchenko [Sun, 21 Jul 2024 06:17:57 +0000 (23:17 -0700)]
Delete stale note about mp.Lock.acquire/SIGINT (#120929)