summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-127238: adjust error message for sys.set_int_max_str_digits() (#127241)Sergey B Kirpichev2024-11-251-0/+1
| | | Now it's correct and closer to Python/initconfig.c
* GH-115869: Make jit_stencils.h reproducible (GH-127166)Brandt Bucher2024-11-241-0/+1
|
* gh-127217: Fix pathname2url() for paths starting with multiple slashes on ↵Serhiy Storchaka2024-11-241-0/+2
| | | | Posix (GH-127218)
* gh-122356: restore the position of a file-like object after ↵Bénédikt Tran2024-11-241-0/+3
| | | | `zipfile.is_zipfile` (#122397)
* GH-127133: Remove ability to nest argument groups & mutually exclusive ↵Savannah Ostrowski2024-11-241-0/+6
| | | | groups (#127186)
* gh-113841: fix possible undefined division by 0 in _Py_c_pow() (GH-127211)Sergey B Kirpichev2024-11-241-0/+2
| | | `x**y == 1/x**-y ` thus changing `/=` to `*=` by negating the exponent.
* GH-125866: Preserve Windows drive letter case in file URIs (#127138)Barney Gale2024-11-231-0/+2
| | | | | Stop converting Windows drive letters to uppercase in `urllib.request.pathname2url()` and `url2pathname()`. This behaviour is unnecessary and inconsistent with pathlib's file URI implementation.
* Fix a few typos found in the docs (GH-127126)Rafael Fontenelle2024-11-231-1/+1
|
* gh-109746: Make _thread.start_new_thread delete state of new thread on its ↵Radislav Chugunov2024-11-221-0/+1
| | | | | | | | | | startup failure (GH-109761) If Python fails to start newly created thread due to failure of underlying PyThread_start_new_thread() call, its state should be removed from interpreter' thread states list to avoid its double cleanup. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-88110: Clear concurrent.futures.thread._threads_queues after fork to ↵Andrei Bodrov2024-11-221-0/+2
| | | | | | | | | avoid joining parent process' threads (GH-126098) Threads are gone after fork, so clear the queues too. Otherwise the child process (here created via multiprocessing.Process) crashes on interpreter exit. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035)Serhiy Storchaka2024-11-221-0/+4
| | | | | | | | | * Name without a PATHEXT extension is only searched if the mode does not include X_OK. * Support multi-component PATHEXT extensions (e.g. ".foo.bar"). * Support files without extensions in PATHEXT contains dot-only extension (".", "..", etc). * Support PATHEXT extensions that end with a dot (e.g. ".foo.").
* gh-86463: Fix default prog in subparsers if usage is used in the main parser ↵Serhiy Storchaka2024-11-221-0/+2
| | | | | | | | | | (GH-125891) The usage parameter of argparse.ArgumentParser no longer affects the default value of the prog parameter in subparsers. Previously the full custom usage of the main parser was used as the prog prefix in subparsers.
* gh-127076: Ignore memory mmap in FileIO testing (#127088)Cody Maloney2024-11-221-0/+2
| | | | | | | | | | | | | `mmap`, `munmap`, and `mprotect` are used by CPython for memory management, which may occur in the middle of the FileIO tests. The system calls can also be used with files, so `strace` includes them in its `%file` and `%desc` filters. Filter out the `mmap` system calls related to memory allocation for the file tests. Currently FileIO doesn't do `mmap` at all, so didn't add code to track from `mmap` through `munmap` since it wouldn't be used. For now if an `mmap` on a fd happens, the call will be included (which may cause test to fail), and at that time support for tracking the address throug `munmap` could be added.
* gh-126700: pygettext: Support more gettext functions (GH-126912)Tomas R.2024-11-221-0/+1
| | | | Support multi-argument gettext functions: ngettext(), pgettext(), dgettext(), etc.
* gh-127065: Make `methodcaller` thread-safe in free threading build (#127109)Sam Gross2024-11-221-0/+2
| | | | | | | The `methodcaller` C vectorcall implementation uses an arguments array that is shared across calls. The first argument is modified on every invocation. This isn't thread-safe in the free threading build. I think it's also not safe in general, but for now just disable it in the free threading build.
* GH-127078: `url2pathname()`: handle extra slash before UNC drive in URL path ↵Barney Gale2024-11-221-0/+2
| | | | | | | (#127132) Decode a file URI like `file://///server/share` as a UNC path like `\\server\share`. This form of file URI is created by software the simply prepends `file:///` to any absolute Windows path.
* GH-126766: `url2pathname()`: handle 'localhost' authority (#127129)Barney Gale2024-11-221-0/+2
| | | | | Discard any 'localhost' authority from the beginning of a `file:` URI. As a result, file URIs like `//localhost/etc/hosts` are correctly decoded as `/etc/hosts`.
* GH-126601: `pathname2url()`: handle NTFS alternate data streams (#126760)Barney Gale2024-11-221-0/+3
| | | | | | Adjust `pathname2url()` to encode embedded colon characters in Windows paths, rather than bailing out with an `OSError`. Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-126091: Always link generator frames when propagating a thrown-in ↵Jacob Bower2024-11-211-0/+2
| | | | | exception through a yield-from chain (#126092) Always link generator frames when propagating a thrown-in exception through a yield-from chain.
* gh-124470: Fix crash when reading from object instance dictionary while ↵Dino Viehland2024-11-211-0/+1
| | | | | replacing it (#122489) Delay free a dictionary when replacing it
* gh-127020: Make `PyCode_GetCode` thread-safe for free threading (#127043)Sam Gross2024-11-211-0/+4
| | | | Some fields in PyCodeObject are lazily initialized. Use atomics and critical sections to make their initializations and accesses thread-safe.
* gh-118761: Improve import time of `mimetypes` (#126979)Hugo van Kemenade2024-11-211-0/+2
|
* gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055)Victor Stinner2024-11-211-0/+2
| | | | grpmodule.c is no longer built with the limited C API, since PyMutex is excluded from the limited C API.
* gh-126780: Fix `ntpath.normpath()` for drive-relative paths (GH-126801)Nice Zombies2024-11-211-0/+1
|
* gh-126727: Fix locale.nl_langinfo(locale.ERA) (GH-126730)Serhiy Storchaka2024-11-211-0/+3
| | | | | It now returns multiple era description segments separated by semicolons. Previously it only returned the first segment on platforms with Glibc.
* gh-126997: Fix support of non-ASCII strings in pickletools (GH-127062)Serhiy Storchaka2024-11-211-0/+3
| | | | | * Fix support of STRING and GLOBAL opcodes with non-ASCII arguments. * dis() now outputs non-ASCII bytes in STRING, BINSTRING and SHORT_BINSTRING arguments as escaped (\xXX).
* gh-127076: Disable strace tests under LD_PRELOAD (#127086)Cody Maloney2024-11-211-0/+1
| | | | | | | | Distribution tooling (ex. sandbox on Gentoo and fakeroot on Debian) uses LD_PRELOAD to intercept system calls and potentially modify them when building. These tools can change the set of system calls, so disable system call testing under these cases. Co-authored-by: Michał Górny <mgorny@gentoo.org>
* gh-126898: Emscripten support: Use es6 modules (#126903)Hood Chatham2024-11-211-0/+1
| | | | Modify Emscripten support to use ES6 modules.
* Move NEWS entries out of directories with spaces (GH-127067)Zachary Ware2024-11-203-0/+0
| | | Cleanup after GH-126063, including moving the `README.rst` files to the new directories.
* gh-121058: Warn if `PyThreadState_Clear` is called with an exception set ↵Peter Bierma2024-11-201-0/+2
| | | | (gh-121343)
* GH-127010: Don't lazily track and untrack dicts (GH-127027)Mark Shannon2024-11-201-0/+4
|
* gh-97514: Authenticate the forkserver control socket. (GH-99309)Gregory P. Smith2024-11-201-0/+10
| | | | | | | | | | | | | | | | | | | This adds authentication to the forkserver control socket. In the past only filesystem permissions protected this socket from code injection into the forkserver process by limiting access to the same UID, which didn't exist when Linux abstract namespace sockets were used (see issue) meaning that any process in the same system network namespace could inject code. We've since stopped using abstract namespace sockets by default, but protecting our control sockets regardless of type is a good idea. This reuses the HMAC based shared key auth already used by `multiprocessing.connection` sockets for other purposes. Doing this is useful so that filesystem permissions are not relied upon and trust isn't implied by default between all processes running as the same UID with access to the unix socket. ### pyperformance benchmarks No significant changes. Including `concurrent_imap` which exercises `multiprocessing.Pool.imap` in that suite. ### Microbenchmarks This does _slightly_ slow down forkserver use. How much so appears to depend on the platform. Modern platforms and simple platforms are less impacted. This PR adds additional IPC round trips to the control socket to tell forkserver to spawn a new process. Systems with potentially high latency IPC are naturally impacted more. Typically a 1-4% slowdown on a very targeted process creation microbenchmark, with a worst case overloaded system slowdown of 20%. No evidence that these slowdowns appear in practical sense. See the PR for details.
* GH-126892: Reset warmup counters when JIT compiling code (GH-126893)Brandt Bucher2024-11-201-0/+2
|
* gh-126615: `ctypes`: Make `COMError` public (GH-126686)Jun Komoda2024-11-201-0/+2
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* GH-85168: Use filesystem encoding when converting to/from `file` URIs (#126852)Barney Gale2024-11-191-0/+4
| | | | | | | | Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529.
* Merge remote-tracking branch 'upstream/main'Hugo van Kemenade2024-11-194-0/+8
|\
| * gh-126947: Typechecking for _pydatetime.timedelta.__new__ arguments (#126949)Beomsoo Kim2024-11-191-0/+2
| | | | | | | | Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
| * gh-125729: Makes the installation of the turtle module dependent on the ↵CoderTCY2024-11-191-0/+1
| | | | | | | | Tcl/Tk install option (GH-126176)
| * gh-118201: Simplify conv_confname (#126089)Malcolm Smith2024-11-191-0/+2
| |
| * gh-126980: Fix `bytearray.__buffer__` crash on `PyBUF_{READ,WRITE}` (#126981)sobolevn2024-11-191-0/+3
| | | | | | Co-authored-by: Victor Stinner <vstinner@python.org>
* | Python 3.14.0a2v3.14.0a2Hugo van Kemenade2024-11-19171-368/+1762
|/
* GH-84850: Remove `urllib.request.URLopener` and `FancyURLopener` (#125739)Barney Gale2024-11-191-0/+3
|
* gh-126076: Account for relocated objects in tracemalloc (#126077)Pablo Galindo Salgado2024-11-191-0/+3
|
* Revert "GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Hugo van Kemenade2024-11-191-4/+0
| | | | collection (GH-126502)" (#126983)
* GH-126795: Increase the JIT threshold from 16 to 4096 (GH-126816)Brandt Bucher2024-11-181-0/+2
|
* gh-85957: Add missing MIME types for images with RFCs (#126966)Hugo van Kemenade2024-11-181-0/+2
|
* gh-123803: Support arbitrary code page encodings on Windows (GH-123804)Serhiy Storchaka2024-11-181-0/+1
| | | | | | If the cpXXX encoding is not directly implemented in Python, fall back to use the Windows-specific API codecs.code_page_encode() and codecs.code_page_decode().
* gh-126911: Update credits output (#126913)Stan U.2024-11-181-0/+1
| | | | | | | Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-11-181-0/+4
| | | | | | | | | | | | | | | | collection (GH-126502) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Remove lazy dict tracking * Update docs * Clearer calculation of work to do.
* gh-126909: Fix running xattr tests on systems with lower limits (#126930)Michał Górny2024-11-181-0/+2
| | | | | | Modify the extended attribute tests to write fewer and smaller extended attributes, in order to fit within filesystems with total xattr limit of 1 KiB (e.g. ext4 with 1 KiB blocks). Previously, the test would write over 2 KiB, making it fail with ENOSPC on such systems.