summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-115827: Fix compile warning in `longobject.c` (#115828)Nikita Sobolev2024-02-221-1/+1
| | | Objects/longobject.c:1186:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
* GH-115651: Convert `LOAD_MODULE_ATTR` into `LOAD_INLINE_CONST` when the ↵Mark Shannon2024-02-226-95/+182
| | | | module is itself a constant. (GH-115711)
* gh-115663: Remove 'regen-sbom' from the 'regen-all' target (#115790)Seth Michael Larson2024-02-222-3/+3
|
* gh-115796: fix exception table construction in ↵Irit Katriel2024-02-223-8/+52
| | | | _testinternalcapi.assemble_code_object (#115797)
* gh-115714: Don't use CLOCK_PROCESS_CPUTIME_ID and times() on WASI (GH-115757)Petr Viktorin2024-02-222-5/+15
| | | | | * gh-115714: Don't use CLOCK_PROCESS_CPUTIME_ID and times() on WASI * Add blurb
* gh-115765: Don't use deprecated AC_CHECK_TYPE macro in configure.ac (#115792)Erlend E. Aasland2024-02-223-20/+25
| | | Instead use AC_CHECK_TYPES.
* gh-115795: Doc: fix obsolete URL (#115749)partev2024-02-221-1/+1
|
* gh-111140: Improve PyLong_AsNativeBytes API doc example & improve the test ↵Gregory P. Smith2024-02-222-22/+82
| | | | | | | | | (#115380) This expands the examples to cover both realistic use cases for the API. I noticed thing in the test that could be done better so I added those as well: We need to guarantee that all bytes of the result are overwritten and that too many are not written. Tests now pre-fills the result with data in order to ensure that. Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-111225: Link extension modules against libpython on Android (#115780)Malcolm Smith2024-02-215-25/+19
| | | | | | | | | | | | | | Part of the work on PEP 738: Adding Android as a supported platform. * Rename the LIBPYTHON variable to MODULE_LDFLAGS, to more accurately reflect its purpose. * Edit makesetup to use MODULE_LDFLAGS when linking extension modules. * Edit the Makefile so that extension modules depend on libpython on Android and Cygwin. * Restore `-fPIC` on Android. It was removed several years ago with a note that the toolchain used it automatically, but this is no longer the case. Omitting it causes all linker commands to fail with an error like `relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol '_Py_FalseStruct'; recompile with -fPIC`.
* gh-93205: When rotating logs with no namer specified, match whole extension ↵Gabriele Catania2024-02-213-19/+62
| | | | (GH-93224)
* gh-115491: Keep some fields valid across allocations in obmalloc ↵Sam Gross2024-02-212-10/+33
| | | | (free-threading) (#115745)
* gh-115304: Add doc for initializing PyMutex as a global variable (#115305)AN Long2024-02-211-0/+3
|
* gh-96310: Fix a traceback in argparse when all options in a mutually ↵Daniel Mach2024-02-213-0/+25
| | | | | | | | | | | exclusive group are suppressed (GH-96311) Reproducer depends on terminal size - the traceback occurs when there's an option long enough so the usage line doesn't fit the terminal width. Option order is also important for reproducibility. Excluding empty groups (with all options suppressed) from inserts fixes the problem.
* gh-104090: Add exit code to multiprocessing ResourceTracker (GH-115410)Petr Viktorin2024-02-214-7/+94
| | | | | | | | | | | | | This builds on https://github.com/python/cpython/pull/106807, which adds a return code to ResourceTracker, to make future debugging easier. Testing this “in situ” proved difficult, since the global ResourceTracker is involved in test infrastructure. So, the tests here create a new instance and feed it fake data. --------- Co-authored-by: Yonatan Bitton <yonatan.bitton@perception-point.io> Co-authored-by: Yonatan Bitton <bityob@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org>
* argparse: remove incoherent and redundant docstring for private method ↵Frank Dana2024-02-211-8/+0
| | | | | (GH-101591) Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
* gh-115399: Document CVE-2023-52425 under "XML vulnerabilities" (GH-115400)Sebastian Pipping2024-02-212-0/+14
| | | Doc/library/xml.rst: Document CVE-2023-52425 under "XML vulnerabilities"
* gh-110850: Cleanup PyTime API: PyTime_t are nanoseconds (#115753)Victor Stinner2024-02-218-100/+57
| | | | | | | | | | PyTime_t no longer uses an arbitrary unit, it's always a number of nanoseconds (64-bit signed integer). * Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong(). * Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong(). * Remove pytime_from_nanoseconds(). * Remove pytime_as_nanoseconds(). * Remove _PyTime_FromNanoseconds().
* gh-112364: Correct unparsing of backslashes and quotes in ast.unparse (#115696)Frank Hoffmann2024-02-213-7/+24
|
* gh-115737: Correct libpython install name for macOS shared library builds. ↵Russell Keith-Magee2024-02-212-1/+3
| | | | (gh-115750)
* gh-115653: Document PyCode_GetFirstFree() (#115654)Bogdan Romanyuk2024-02-211-2/+6
| | | Correct the return type of the PyCode_GetNumFree() documentation.
* gh-110850: Replace private _PyTime_MAX with public PyTime_MAX (#115751)Victor Stinner2024-02-213-8/+4
| | | | | | | Remove references to the old names _PyTime_MIN and _PyTime_MAX, now that PyTime_MIN and PyTime_MAX are public. Replace also _PyTime_MIN with PyTime_MIN.
* Delete unused sym_clear_flag function. (#115744)Benjamin Peterson2024-02-211-6/+0
|
* gh-112087: Make list_{concat, repeat, inplace_repeat, ass_item) to be ↵Donghee Na2024-02-212-40/+88
| | | | thread-safe (gh-115605)
* gh-112075: Accessing a single element should optimistically avoid locking ↵Dino Viehland2024-02-213-175/+496
| | | | | (#115109) Makes accessing a single element thread safe and typically lock free
* gh-112075: Make PyDictKeysObject thread-safe (#114741)Dino Viehland2024-02-216-93/+257
| | | Adds locking for shared PyDictKeysObject's for dictionaries
* gh-110850: Use public PyTime functions (#115746)Victor Stinner2024-02-2012-55/+39
| | | | | Replace private _PyTime functions with public PyTime functions. random_seed_time_pid() now reports errors to its caller.
* gh-110850: Rename internal PyTime C API functions (#115734)Victor Stinner2024-02-2016-83/+68
| | | | | | | | | | | | | | | | | Rename functions: * _PyTime_GetSystemClock() => _PyTime_TimeUnchecked() * _PyTime_GetPerfCounter() => _PyTime_PerfCounterUnchecked() * _PyTime_GetMonotonicClock() => _PyTime_MonotonicUnchecked() * _PyTime_GetSystemClockWithInfo() => _PyTime_TimeWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() Changes: * Remove "typedef PyTime_t PyTime_t;" which was "typedef PyTime_t _PyTime_t;" before a previous rename. * Update comments of "Unchecked" functions. * Remove invalid PyTime_Time() comment.
* gh-104061: Add socket.SO_BINDTOIFINDEX constant (GH-104062)Victor Westerhuis2024-02-203-0/+9
| | | | | Add socket.SO_BINDTOIFINDEX constant This socket option avoids a race condition between SO_BINDTODEVICE and network interface renaming.
* Tier 2 cleanups and tweaks (#115534)Guido van Rossum2024-02-208-121/+203
| | | | | | | | | * Rename `_testinternalcapi.get_{uop,counter}_optimizer` to `new_*_optimizer` * Use `_PyUOpName()` instead of` _PyOpcode_uop_name[]` * Add `target` to executor iterator items -- `list(ex)` now returns `(opcode, oparg, target, operand)` quadruples * Add executor methods `get_opcode()` and `get_oparg()` to get `vmdata.opcode`, `vmdata.oparg` * Define a helper for printing uops, and unify various places where they are printed * Add a hack to summarize_stats.py to fix legacy uop names (e.g. `POP_TOP` -> `_POP_TOP`) * Define helpers in `test_opt.py` for accessing the set or list of opnames of an executor
* gh-115733: Fix crash involving exhausted list iterator (#115740)Sam Gross2024-02-206-5/+13
| | | | | * gh-115733: Fix crash involving exhausted iterator * Add blurb
* GH-115727: Temporary fix of confidence score test. (GH-115728)Mark Shannon2024-02-201-4/+3
| | | Temporary fix of confidence score test.
* gh-115735: Fix current executor NULL before _START_EXECUTOR (#115736)Ken Jin2024-02-201-2/+2
| | | This fixes level 3 or higher lltrace debug output `--with-pydebug` runs.
* gh-115103: Implement delayed free mechanism for free-threaded builds (#115367)Sam Gross2024-02-208-0/+226
| | | | | | This adds `_PyMem_FreeDelayed()` and supporting functions. The `_PyMem_FreeDelayed()` function frees memory with the same allocator as `PyMem_Free()`, but after some delay to ensure that concurrent lock-free readers have finished.
* gh-110850: Cleanup pycore_time.h includes (#115724)Victor Stinner2024-02-2023-17/+28
| | | | | <pycore_time.h> include is no longer needed to get the PyTime_t type in internal header files. This type is now provided by <Python.h> include. Add <pycore_time.h> includes to C files instead.
* gh-86291: linecache: get module name from __spec__ if available (GH-22908)Eugene Toder2024-02-203-7/+45
| | | | | This allows getting source code for the __main__ module when a custom loader is used.
* gh-115712: Support CSV dialects with delimiter=' ' and skipinitialspace=True ↵Serhiy Storchaka2024-02-203-17/+90
| | | | | | | | (GH-115721) Restore support of such combination, disabled in gh-113796. csv.writer() now quotes empty fields if delimiter is a space and skipinitialspace is true and raises exception if quoting is not possible.
* gh-115491: Keep some fields valid across allocations (free-threading) (#115573)Sam Gross2024-02-205-25/+33
| | | | | This avoids filling the memory occupied by ob_tid, ob_ref_local, and ob_ref_shared with debug bytes (e.g., 0xDD) in mimalloc in the free-threaded build.
* gh-101860: Expose __name__ on property (GH-101876)Eugene Toder2024-02-208-25/+158
| | | | | Useful for introspection and consistent with functions and other descriptors.
* gh-110850: Replace _PyTime_t with PyTime_t (#115719)Victor Stinner2024-02-2031-341/+341
| | | | | Run command: sed -i -e 's!\<_PyTime_t\>!PyTime_t!g' $(find -name "*.c" -o -name "*.h")
* gh-112175: Add `eval_breaker` to `PyThreadState` (#115194)Brett Simmers2024-02-2019-169/+262
| | | | | | | | | | | This change adds an `eval_breaker` field to `PyThreadState`. The primary motivation is for performance in free-threaded builds: with thread-local eval breakers, we can stop a specific thread (e.g., for an async exception) without interrupting other threads. The source of truth for the global instrumentation version is stored in the `instrumentation_version` field in PyInterpreterState. Threads usually read the version from their local `eval_breaker`, where it continues to be colocated with the eval breaker bits.
* gh-112020: Document the meaning of empty bytes returned by socket.recv() ↵talcs2024-02-201-2/+3
| | | | (GH-112055)
* gh-110850: Enhance PyTime C API tests (#115715)Victor Stinner2024-02-201-4/+9
|
* Add missed `stream` argument (#111775)Alexander Shadchin2024-02-202-1/+3
| | | | | * Add missed `stream` argument * Add news
* gh-110850: PyTime_Time() return 0 on success (GH-115713)Victor Stinner2024-02-201-1/+1
| | | Thanks!
* gh-115687: Split up guards from COMPARE_OP (GH-115688)Ken Jin2024-02-209-163/+249
|
* gh-115700: Add target `_RegenCases` in Windows build for cases regeneration. ↵Kirill Podoprigora2024-02-202-3/+30
| | | | (GH-115708)
* GH-115457: Support splitting and replication of micro ops. (GH-115558)Mark Shannon2024-02-2020-309/+908
|
* GH-112354: Initial implementation of warm up on exits and trace-stitching ↵Mark Shannon2024-02-2029-198/+744
| | | | (GH-114142)
* gh-113157: Document and test __get__ for MethodType (gh-115492)Raymond Hettinger2024-02-201-2/+18
|
* Make the title match the content (GH-115702)Raymond Hettinger2024-02-202-5/+5
|