summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-123877: default to `wasm32-wasip1` instead of `wasm32-wasi` to be more ↵Brett Cannon2024-11-075-9/+12
| | | | | | | | | specific (GH-126552) Eventually wasm32-wasi will represent WASI 1.0, and so it's currently deprecated so it can be used for that eventual purpose. wasm32-wasip1 is also more specific to what version of WASI is currently supported. --------- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-122943: Rework support of var-positional parameter in Argument Clinic ↵Serhiy Storchaka2024-11-0722-662/+1597
| | | | | | | | | | | | | | | | | | (GH-122945) Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. Add special converters for var-positional parameter. "tuple" represents it as a Python tuple and "array" represents it as a continuous array of PyObject*. "object" is a temporary alias of "tuple".
* GH-126464 Fix JIT CI on aarch64-apple-darwin (GH-126494)alm2024-11-071-8/+7
|
* gh-126298: Don't deduplicate slice constants based on equality (#126398)Michael Droettboom2024-11-072-20/+93
| | | | | | | | | | | | | | | * gh-126298: Don't deduplicated slice constants based on equality * NULL check for PySlice_New * Fix refcounting * Fix refcounting some more * Fix refcounting * Make tests more complete * Fix tests
* gh-76785: Minor Cleanup of "Cross-interpreter" Code (gh-126457)Eric Snow2024-11-0715-337/+343
| | | | | | | | The primary objective here is to allow some later changes to be cleaner. Mostly this involves renaming things and moving a few things around. * CrossInterpreterData -> XIData * crossinterpdatafunc -> xidatafunc * split out pycore_crossinterp_data_registry.h * add _PyXIData_lookup_t
* Chore: Fix typo in `pyarena.c` (#126527)Aditya Borikar2024-11-071-1/+1
|
* gh-126529: Update devguide links to relative filenames in InternalDocs (#126530)Valerii2024-11-072-3/+3
| | | | Update devguide links to relative filenames in InternalDocs/parser.md and InternalDocs/compiler.md.
* Doc: C API: Demote sections to subsections for consistency (#126535)Richard Hansen2024-11-071-7/+7
| | | | The entire file should be a single section; the headings below the first heading should be subsections.
* GH-126222: Fix `_PyUop_num_popped` (GH-126507)Mark Shannon2024-11-074-56/+69
|
* gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ↵Petr Viktorin2024-11-071-5/+12
| | | | | | | | | | | | | | | | ConnectionHandler; rely on __exit__ (GH-126503) If `read()` in the ConnectionHandler thread raises `OSError` (except `ConnectionError`), the ConnectionHandler shuts down the entire ThreadedEchoServer, preventing further connections. It also does that for `EPROTOTYPE` in `wrap_conn`. As far as I can see, this is done to avoid the server thread getting stuck, forgotten, in its accept loop. However, since 2011 (5b95eb90a7167285b6544b50865227c584943c9a) the server is used as a context manager, and its `__exit__` does `stop()` and `join()`. (I'm not sure if we *always* used `with` since that commit, but currently we do.) Make sure that the context manager *is* used, and remove the `server.stop()` calls from ConnectionHandler.
* gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501)Petr Viktorin2024-11-071-1/+1
| | | | | | | The skipping machinery called `getattr(err, "reason", "")` on an arbitrary exception. As intermittent Buildbot failures show, sometimes it's set to None. Convert it to string for this specific check.
* gh-48020: [docs] Remove the logging howto suggested future FileHandler ↵Gregory P. Smith2024-11-071-5/+2
| | | | | | | | | multiprocessing support (GH-126531) Docs: Remove the logging howto potential promise of multiprocessing support in the future. Stick to the facts and suggestions, don't provide hope where we're not going to implement complexity that we'd rather the user implement themselves when needed.
* gh-96398: Improve accuracy of compiler checks in configure.ac (#117815)Erlend E. Aasland2024-11-072-203/+127
| | | | | | | | | The following variables are now used in compiler checks: - $ac_cv_gcc_compat is set to 'yes' for GCC compatible compilers (the C preprocessor defines the __GNUC__ macro) - for compiler basename checks, use $CC_BASENAME (may contain platform triplets) - for the rest, use $ac_cv_cc_name (does not contain platform triplets)
* gh-125679: multiprocessing Lock and RLock - fix invalid representation ↵Duprat2024-11-073-2/+126
| | | | string on MacOSX. (#125680)
* Cleanup multiprocessing comment and unusual import error message (#126532)Gregory P. Smith2024-11-072-8/+8
| | | | Define constants as constants rather than calling `list(range(2))`. Explain which values must remain in sync via comments.
* gh-125926: Fix urllib.parse.urljoin() for base URI with undefined authority ↵Serhiy Storchaka2024-11-073-2/+78
| | | | | | | (GH-125989) Although this goes beyond the application of RFC 3986, urljoin() should support relative base URIs for backward compatibility.
* gh-125631: Enable setting persistent_id and persistent_load of pickler and ↵Serhiy Storchaka2024-11-073-2/+146
| | | | | | | unpickler (GH-125752) pickle.Pickler.persistent_id and pickle.Unpickler.persistent_load can again be overridden as instance attributes.
* GH-126458: disable SIMD for HACL under WASI (#126512)Brett Cannon2024-11-063-4/+9
| | | Requires an extra `-msimd128` flag and the `*mmintrin.h` header files are exclusive to x86-family CPUs.
* gh-126451: Register contextvars.Context to collections.abc.Mapping (#126452)Stephen Morton2024-11-063-0/+20
| | | | | Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-126509: Update link to CPython's grammar docs in InternalDocs/parser.md ↵Valerii2024-11-061-1/+1
| | | | (#126510)
* gh-126513: Use helpers for `_Py_Specialize_ConstainsOp` (#126517)Kirill Podoprigora2024-11-061-17/+7
| | | | | * Use helpers for _Py_Specialize_ConstainsOp * Remove unnecessary variable
* gh-126489: Do not call persistent_id() for a persistent id in Python pickle ↵Serhiy Storchaka2024-11-063-4/+14
| | | | (GH-126490)
* gh-115999: Move specializer test from test_dis to test_opcache (gh-126498)Donghee Na2024-11-062-45/+59
|
* gh-115999: Introduce helpers for (un)specializing instructions (#126414)mpage2024-11-061-48/+84
| | | | | | | | Introduce helpers for (un)specializing instructions Consolidate the code to specialize/unspecialize instructions into two helper functions and use them in `_Py_Specialize_BinaryOp`. The resulting code is more concise and keeps all of the logic at the point where we decide to specialize/unspecialize an instruction.
* gh-126461: Fix _Unpickler_ReadFromFile() error handling (#126485)Victor Stinner2024-11-061-0/+4
| | | Handle _Unpickler_SetStringInput() failure.
* gh-122838: Document missing opcodes (#123073)Kamil Turek2024-11-061-0/+21
|
* gh-126455: Disallow _ssl.SSLSocket instantiation (#126481)Victor Stinner2024-11-061-1/+1
| | | | Prevent creation of incomplete/invalid _ssl.SSLSocket objects when created directly.
* gh-126433: Change channel_info.count to int64_t (#126447)Victor Stinner2024-11-061-1/+1
| | | | Fix compiler warnings on 32-bit Windows: change channel_info.count type from Py_ssize_t to int64_t in _interpchannelsmodule.c.
* gh-120754: Add to `io` optimization to what's new (#126466)Cody Maloney2024-11-061-0/+9
|
* gh-115999: Add free-threaded specialization for CONTAINS_OP (gh-126450)Donghee Na2024-11-064-6/+29
| | | | - The specialization logic determines the appropriate specialization using only the operand's type, which is safe to read non-atomically (changing it requires stopping the world). We are guaranteed that the type will not change in between when it is checked and when we specialize the bytecode because the types involved are immutable (you cannot assign to `__class__` for exact instances of `dict`, `set`, or `frozenset`). The bytecode is mutated atomically using helpers. - The specialized instructions rely on the operand type not changing in between the `DEOPT_IF` checks and the calls to the appropriate type-specific helpers (e.g. `_PySet_Contains`). This is a correctness requirement in the default builds and there are no changes to the opcodes in the free-threaded builds that would invalidate this.
* GH-126464: Temporarily disable `aarch64-apple-darwin` JIT CI jobs (gh-126465)Brandt Bucher2024-11-061-5/+6
| | | | | * Temporarily disable aarch64-apple-darwin JIT CI jobs * Also up here
* gh-70764: inspect.getclosurevars now identifies global variables with ↵blhsing2024-11-053-5/+23
| | | | LOAD_GLOBAL (#120143)
* gh-122544: Change OS image in GitHub Actions to Ubuntu 24.04 (#122566)Damien2024-11-055-8/+7
|
* GH-125911: Rename big trampoline to "shim" (GH-126339)Savannah Ostrowski2024-11-054-11/+9
|
* gh-122544: Change OS image in Azure pipeline to Ubuntu 24.04 (#125344)Damien2024-11-051-1/+1
|
* pathlib ABCs: defer path joining (#126409)Barney Gale2024-11-053-46/+43
| | | | | | | | Defer joining of path segments in the private `PurePathBase` ABC. The new behaviour matches how the public `PurePath` class handles path segments. This removes a hard-to-grok difference between the ABCs and the main classes. It also slightly reduces the size of `PurePath` objects by eliminating a `_raw_path` slot.
* gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)Steve Dower2024-11-052-1/+8
|
* GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861)Barney Gale2024-11-051-0/+5
|
* gh-126238: Fix possible null pointer dereference of freevars in ↵Valery Fedorenko2024-11-051-1/+1
| | | | | | | | _PyCompile_LookupArg (#126239) * Replace Py_DECREF by Py_XDECREF Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-126433: Fix compiler warnings on 32-bit Windows (#126444)Victor Stinner2024-11-055-10/+12
|
* gh-115999: Fix gdb support for libpython.so after thread-local bytecode ↵T. Wouters2024-11-051-6/+9
| | | | | change (#126440) Fix the gdb pretty printer in the face of --enable-shared by delaying the attempt to load the _PyInterpreterFrame definition until after .so files are loaded.
* gh-126425: Refactor `_lsprof_Profiler_enable` (#126426)sobolevn2024-11-051-12/+25
| | | | - Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects) - Respect possible errors of `sys.monitoring.register_callback` call
* gh-126417: Register multiprocessing proxy types to an appropriate ↵Stephen Morton2024-11-054-1/+18
| | | | collections.abc class (#126419)
* gh-126366: Fix crash if `__iter__` raises an exception during `yield from` ↵Peter Bierma2024-11-056-6/+25
| | | | (#126369)
* Doc: C API: Delete claim that `PyObject_Init` is GC-aware (#126418)Richard Hansen2024-11-051-4/+2
|
* gh-119793: Prefer `map(..., strict=True)` over starmap/zip in examples (#126407)Lukas Geiger2024-11-053-5/+5
|
* gh-120057: Add os.reload_environ() function (#126268)Victor Stinner2024-11-055-31/+52
| | | | | | | Replace the os.environ.refresh() method with a new os.reload_environ() function. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-126303: Fix pickling and copying of os.sched_param objects (GH-126336)Serhiy Storchaka2024-11-055-0/+46
|
* gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ↵lit2024-11-051-3/+28
| | | | | | | ``ConfigParser`` documentation (#125437) Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``. Split too long line on ``ConfigParser`` signature. Add some sections about when some of ``RawConfigParser`` parameters were added.
* gh-126415: Fix conversion warning in `Python/bytecodes.c` (#126416)Kirill Podoprigora2024-11-052-3/+3
| | | | | Fix conversion warning in bytecodes Co-authored-by: mpage <mpage@cs.stanford.edu>