Commit Graph

123224 Commits

Author SHA1 Message Date
Mark Shannon afb0aa6ed2
GH-121131: Clean up and fix some instrumented instructions. (GH-121132)
* Add support for 'prev_instr' to code generator and refactor some INSTRUMENTED instructions
2024-07-26 12:24:12 +01:00
Brandt Bucher d9efa45d74
GH-118093: Add tier two support for BINARY_OP_INPLACE_ADD_UNICODE (GH-122253) 2024-07-25 14:45:07 -07:00
Sviatoslav Sydorenko (Святослав Сидоренко) 1d607fe759
Move macOS matrix to the calling workflow (#121809)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-25 14:27:26 -06:00
Brandt Bucher 5f6001130f
GH-118093: Add tier two support for LOAD_ATTR_PROPERTY (GH-122283) 2024-07-25 10:45:28 -07:00
Mark Shannon 5e686ff57d
GH-122034: Add StackRef variants of type checks to reduce the number of PyStackRef_AsPyObjectBorrow calls (GH-122037) 2024-07-25 18:32:43 +01:00
Marc Mueller aef95eb107
gh-121489: Export private _PyBytes_Join() again (#122267) 2024-07-25 17:31:30 +02:00
Mark Shannon 2e14a52cce
GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164) 2024-07-25 16:24:29 +01:00
Serhiy Storchaka 9bb2e4623f
gh-116322: Fix typo in the #ifdef check (#122268) 2024-07-25 20:01:57 +05:30
AN Long 3998554bb0
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
2024-07-25 17:33:39 +05:30
AN Long 070f1e2e5b
gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (#122269) 2024-07-25 17:26:04 +05:30
Serhiy Storchaka 6c09b8de5c
gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) 2024-07-25 14:04:22 +03:00
Serhiy Storchaka dc07f65a53
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.
2024-07-25 08:45:19 +00:00
Nate Ohlson ca0f7c447c
gh-112301: Make fortify source option check -Werror (gh-122141) 2024-07-25 17:35:23 +09:00
Sam Gross 2f74b709b6
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.
2024-07-25 13:46:53 +05:30
Serhiy Storchaka bb108580de
gh-122087: Add tests for ismethoddescriptor() and isroutine() with partial objects (GH-122219) 2024-07-25 10:12:26 +03:00
Mikołaj Kuranowski a3327dbfd4
gh-113785: csv: fields starting with escapechar are not quoted (GH-122110) 2024-07-25 10:04:47 +03:00
Serhiy Storchaka 9b4fe9b718
gh-122191: Fix test_warnings failure if run with -Werror (GH-122222)
__spec__.loader is now required in the module globals (see gh-86298).
2024-07-25 09:57:22 +03:00
Dino Viehland 5592399313
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
2024-07-24 10:58:28 -07:00
Irit Katriel 9ac606080a
gh-121404: extract compiler_lookup_arg out of compiler_make_closure (#122181) 2024-07-24 17:22:18 +01:00
Brandt Bucher 794546fd53
GH-118093: Remove invalidated executors from side exits (GH-121885) 2024-07-24 09:16:30 -07:00
sobolevn e9681211b9
gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230) 2024-07-24 05:47:52 -07:00
Sviatoslav Sydorenko (Святослав Сидоренко) af4329e7b1
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>
2024-07-24 03:46:39 -06:00
Mark Shannon e55b05f29e
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.
2024-07-24 10:22:51 +01:00
Hugo van Kemenade b3b7b7d46a
gh-122085: Use include files for `whatsnew/3.12.rst` deprecations (#122093) 2024-07-24 02:29:35 -06:00
Xie Yanbo f067efa643
Fix typo in news document (GH-122209) 2024-07-24 06:49:58 +00:00
Cody Maloney 9eb734111b
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
2024-07-23 23:14:35 -07:00
Tian Gao e91ef13861
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.
2024-07-23 15:25:26 -07:00
Eric Snow 41a91bd67f
gh-122199: Skip test_slot_wrappers When Checking For Refleaks (gh-122200) 2024-07-23 21:19:17 +00:00
Jelle Zijlstra 7b7b90d1ce
gh-119180: Add `annotationlib` module to support PEP 649 (#119891)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-23 21:16:50 +00:00
Sam Gross 64e221d7ad
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.
2024-07-23 16:30:49 -04:00
Eric Snow 33d32faa58
gh-117482: Expand Tests for Slot Wrappers of Inherited Slots of Static Builtin Types (gh-122192) 2024-07-23 19:57:26 +00:00
Serhiy Storchaka 4606eff0aa
gh-122129: Improve support of method descriptors and wrappers in the help title (GH-122157) 2024-07-23 20:45:21 +03:00
Sam Gross a15feded71
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.
2024-07-23 17:06:03 +00:00
Serhiy Storchaka e6b25e9a09
gh-122163: Add notes for JSON serialization errors (GH-122165)
This allows to identify the source of the error.
2024-07-23 20:02:54 +03:00
Sam Gross c908d1f87d
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.
2024-07-23 21:54:24 +05:30
Sam Gross 2c1b1e7a07
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>
2024-07-23 15:17:13 +02:00
Mark Shannon 624bda7638
GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling (GH-122158) 2024-07-23 14:12:06 +01:00
Ville Skyttä 498cb6dff1
Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (#122083) 2024-07-23 14:08:39 +01:00
Adam Turner 53e9e7de63
GH-121970: Remove ``escape4chm`` (#122065) 2024-07-23 13:30:06 +01:00
Russell Keith-Magee 1bcc9eb862
gh-121832: Skip subinterpreter static type check on iOS to restore test suite. (GH-122150) 2024-07-23 11:17:50 +01:00
Sebastian Rittau 375c9f6dfb
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>
2024-07-23 10:59:28 +01:00
Xie Yanbo 2a5d1eb707
Fix typos in comments and exception message (#122147) 2024-07-23 14:34:14 +05:30
Sam Gross 47847aa8ef
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.
2024-07-23 14:17:14 +05:30
Donghee Na a9bb3c7b3b
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
2024-07-23 09:22:04 +09:00
Jelle Zijlstra 2762c6cc5e
gh-121637: Syntax error for optimized-away incorrect await (#121656)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-22 14:12:43 -07:00
Serhiy Storchaka 69f2dc5c06
Refactor test_capi.test_long (GH-122113)
Share common code for tests for PyLong_As*() functions.

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-22 21:43:00 +03:00
Sam Gross ad935a9016
Revert "gh-121946: Temporarily switch to llvm-17 in TSan CI (#121975)" (#122032)
This reverts commit 12c1afa9d1.

The LLVM 18 Ubuntu package is working now.
2024-07-22 13:33:40 -04:00
Irit Katriel d5a12b4440
gh-121404: move calculation of module start location from compiler_body up to compiler_codegen (#122127) 2024-07-22 17:48:30 +01:00
Sam Gross 5716cc3529
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.
2024-07-22 12:08:27 -04:00
HarryLHW 2408a8a22b
gh-121795: Improve performance of set membership testing from set arguments (#121796) 2024-07-22 10:05:23 -05:00