summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792)Seth Michael Larson2024-11-132-11/+12
| | | Update libexpat to 2.6.4, make future updates easier.
* gh-123619: Add an unstable C API function for enabling deferred reference ↵Peter Bierma2024-11-131-0/+2
| | | | | | counting (GH-123635) Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-126175: Add attributes to TOMLDecodeError. Deprecate free-form `__init__` ↵Taneli Hukkinen2024-11-131-0/+2
| | | | args (GH-126428)
* gh-126341: add release check to `__iter__` method of `memoryview` (#126759)Ritvik Pasham2024-11-131-0/+1
| | | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
* gh-71936: Fix race condition in multiprocessing.Pool (GH-124973)Petr Viktorin2024-11-132-0/+2
| | | | | | | | | | | | | | | | | | * gh-71936: Fix race condition in multiprocessing.Pool Proxes of shared objects register a Finalizer in BaseProxy._incref(), and it will call BaseProxy._decref() when it is GCed. This may cause a race condition with Pool(maxtasksperchild=None) on Windows. A connection would be closed and raised TypeError when a GC occurs between _ConnectionBase._check_writable() and _ConnectionBase._send_bytes() in _ConnectionBase.send() in the second or later task, and a new object is allocated that shares the id() of a previously deleted one. Instead of using the id() of the token (or the proxy), use a unique, non-reusable number. Co-Authored-By: Akinori Hattori <hattya@gmail.com>
* gh-104745: Limit starting a patcher more than once without stopping it (#126649)Red4Ru2024-11-131-0/+3
| | | | | | | | Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* bpo-46128: Strip IsolatedAsyncioTestCase frames from reported stacktraces ↵Andrew Svetlov2024-11-131-0/+2
| | | | | | | | | | | | | | | (#30196) * Strip IsolatedAsyncioTestCase frames from reported stacktraces * Update Misc/NEWS.d/next/Library/2021-12-19-10-47-24.bpo-46128.Qv3EK1.rst Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> --------- Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)Nice Zombies2024-11-121-0/+1
|
* gh-126688: Reinit import lock after fork (#126692)Sam Gross2024-11-121-0/+2
| | | | | | The PyMutex implementation supports unlocking after fork because we clear the list of waiters in parking_lot.c. This doesn't work as well for _PyRecursiveMutex because on some systems, such as SerenityOS, the thread id is not preserved across fork().
* GH-120423: `pathname2url()`: handle forward slashes in Windows paths (#126593)Barney Gale2024-11-121-0/+2
| | | | Adjust `urllib.request.pathname2url()` so that forward slashes in Windows paths are handled identically to backward slashes.
* gh-116897: Deprecate generic false values in urllib.parse.parse_qsl() ↵Serhiy Storchaka2024-11-121-0/+4
| | | | | | | | (GH-116903) Accepting objects with false values (like 0 and []) except empty strings and byte-like objects and None in urllib.parse functions parse_qsl() and parse_qs() is now deprecated.
* gh-89083: add support for UUID version 8 (RFC 9562) (#123224)Bénédikt Tran2024-11-121-0/+2
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-126705: Make os.PathLike more like a protocol (#126706)Stephen Morton2024-11-121-0/+1
| | | it can now be used as a base class in other protocols
* gh-126061: Add PyLong_IsPositive/Zero/Negative() functions (#126065)RUANG (James Roy)2024-11-121-0/+3
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917)Sayandip Dutta2024-11-122-0/+3
|
* gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (#126617)Bénédikt Tran2024-11-121-0/+2
|
* gh-126209: Fix inconsistency of `skip_file_prefixes` in `warnings.warn`'s C ↵Daehee Kim2024-11-121-0/+3
| | | | | | | and Python implementations (GH-126329) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-126699: allow AsyncIterator to be used as a base for Protocols (#126702)Stephen Morton2024-11-121-0/+1
|
* gh-84852: Add MIME types for .eot, ,otf, .ttf, .woff and .woff2 fonts (#20199)Sahil Prajapati2024-11-121-0/+2
| | | | | 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>
* GH-126195: Use M1 JIT memory protection APIs (GH-126196)Diego Russo2024-11-121-0/+1
|
* gh-58749: Remove incorrect language spec claims about the global statement ↵Beomsoo Kim2024-11-121-0/+1
| | | | | | | | (GH-126523) * Removes erroneous explanation of the `global` statement restrictions; a name declared as global can be subsequently bound using any kind of name binding operation. * Updates `test_global.py` to also test various name-binding scenarios for global variables to ensure correct behavior
* Docs: re-create pages for removed modules to document their removal. (#126622)Ned Batchelder2024-11-111-0/+3
| | | | | Will also need to change the redirects that were created here: https://github.com/python/psf-salt/pull/521/files
* gh-89416: Add RFC 9559 MIME types for Matroska formats (#126412)Hugo van Kemenade2024-11-111-0/+2
| | | | | Co-authored-by: Zachary Ware <zachary.ware@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-126374: Add support of options with optional arguments in the getopt ↵Serhiy Storchaka2024-11-111-0/+1
| | | | module (GH-126375)
* gh-117941: Reject option names starting with "--no-" in ↵Serhiy Storchaka2024-11-111-0/+2
| | | | | | argparse.BooleanOptionalAction (GH-125894) They never worked correctly.
* gh-126505: Fix bugs in compiling case-insensitive character classes (GH-126557)Serhiy Storchaka2024-11-111-0/+4
| | | | | * upper-case non-BMP character was ignored * the ASCII flag was ignored when matching a character range whose upper bound is beyond the BMP region
* gh-126654: Fix crash in several functions in `_interpreters` module (#126678)sobolevn2024-11-111-0/+2
|
* gh-117378: Clear up the NEWS entry wording (GH-126634)Gregory P. Smith2024-11-111-3/+3
| | | | | gh-117378: Clear up the NEWS entry wording. Docs are hard. Lets go shopping!
* gh-126565: Skip `zipfile.Path.exists` check in write mode (#126576)Jan Hicken2024-11-101-0/+1
| | | | | | | | | | | When `zipfile.Path.open` is called, the implementation will check whether the path already exists in the ZIP file. However, this check is only required when the ZIP file is in read mode. By swapping arguments of the `and` operator, the short-circuiting will prevent the check from being run in write mode. This change will improve the performance of `open()`, because checking whether a file exists is slow in write mode, especially when the archive has many members.
* gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. ↵Gregory P. Smith2024-11-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-126538) gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. `sys.path` was not properly being sent from the parent process when launching the multiprocessing forkserver process to preload imports. This bug has been there since the forkserver start method was introduced in Python 3.4. It was always _supposed_ to inherit `sys.path` the same way the spawn method does. Observable behavior change: A `''` value in `sys.path` will now be replaced in the forkserver's `sys.path` with an absolute pathname `os.path.abspath(os.getcwd())` saved at the time that `multiprocessing` was imported in the parent process as it already was when using the spawn start method. **This will only be observable during forkserver preload imports**. The code invoked before calling things in another process already correctly sets `sys.path`. Which is likely why this went unnoticed for so long as a mere performance issue in some configurations. A workaround for the bug on impacted Pythons is to set PYTHONPATH in the environment before multiprocessing's forkserver process was started. Not perfect as that is then inherited by other children, etc, but likely good enough for many people's purposes. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-126187 Add emscripten.py script to automate emscripten build (#126190)Hood Chatham2024-11-091-0/+1
| | | | | Add emscripten.py script to automate emscripten build. This is modeled heavily on `Tools/wasm/wasi.py`. This will form the basis of an Emscripten build bot.
* GH-126212: Fix removal of slashes in file URIs on Windows (#126214)Barney Gale2024-11-081-0/+3
| | | | | | Adjust `urllib.request.pathname2url()` and `url2pathname()` so that they don't remove slashes from Windows DOS drive paths and URLs. There was no basis for this behaviour, and it conflicts with how UNC and POSIX paths are handled.
* gh-126497: Add missing venv redirectors to freethreaded installer (GH-126556)Steve Dower2024-11-081-0/+2
|
* gh-126072: Set docstring attribute for module and class (#126231)Xuanteng Huang2024-11-082-0/+3
|
* GH-123877: default to `wasm32-wasip1` instead of `wasm32-wasi` to be more ↵Brett Cannon2024-11-071-0/+3
| | | | | | | | | 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-126222: Fix `_PyUop_num_popped` (GH-126507)Mark Shannon2024-11-071-0/+3
|
* gh-125679: multiprocessing Lock and RLock - fix invalid representation ↵Duprat2024-11-071-0/+2
| | | | string on MacOSX. (#125680)
* gh-125926: Fix urllib.parse.urljoin() for base URI with undefined authority ↵Serhiy Storchaka2024-11-071-0/+4
| | | | | | | (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-071-0/+4
| | | | | | | 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-061-0/+1
| | | 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-061-0/+2
| | | | | 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-126489: Do not call persistent_id() for a persistent id in Python pickle ↵Serhiy Storchaka2024-11-061-0/+3
| | | | (GH-126490)
* gh-70764: inspect.getclosurevars now identifies global variables with ↵blhsing2024-11-051-0/+1
| | | | LOAD_GLOBAL (#120143)
* gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)Steve Dower2024-11-051-0/+1
|
* gh-126417: Register multiprocessing proxy types to an appropriate ↵Stephen Morton2024-11-052-0/+4
| | | | collections.abc class (#126419)
* gh-126366: Fix crash if `__iter__` raises an exception during `yield from` ↵Peter Bierma2024-11-051-0/+2
| | | | (#126369)
* gh-120057: Add os.reload_environ() function (#126268)Victor Stinner2024-11-051-0/+2
| | | | | | | 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-051-0/+1
|
* gh-89640: Hardcode WASM float word ordering as little endian (#126387)Erlend E. Aasland2024-11-041-0/+1
|
* GH-126363: Speed up pattern parsing in `pathlib.Path.glob()` (#126364)Barney Gale2024-11-041-0/+2
| | | | | | | | | | | | | | The implementation of `Path.glob()` does rather a hacky thing: it calls `self.with_segments()` to convert the given pattern to a `Path` object, and then peeks at the private `_raw_path` attribute to see if pathlib removed a trailing slash from the pattern. In this patch, we make `glob()` use a new `_parse_pattern()` classmethod that splits the pattern into parts while preserving information about any trailing slash. This skips the cost of creating a `Path` object, and avoids some path anchor normalization, which makes `Path.glob()` slightly faster. But mostly it's about making the code less naughty. Co-authored-by: Tomas R. <tomas.roun8@gmail.com>