summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* gh-123378: Ensure results of `PyUnicode*Error_Get{Start,End}` are clamped ↵Bénédikt Tran2024-12-042-0/+12
| | | | | | (GH-123380) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-112192: Increase the trace module coverage precision to one decimal (#126972)RUANG (James Roy)2024-12-031-0/+1
|
* gh-127347: Document `traceback.print_list` (#127348)Tomas R.2024-12-031-0/+1
| | | Previously, `traceback.print_list` didn't have a documentation entry and was not exposed in `traceback.__all__`. Now it has a documentation entry and is exposed in `__all__`.
* gh-127255: Make `CopyComPointer` public and add to `ctypes` doc. (GH-127275)Jun Komoda2024-12-031-0/+2
|
* gh-126585: Add EHWPOISON error code (#126586)RUANG (James Roy)2024-12-031-0/+1
|
* gh-127111: Emscripten Make web example work again (#127113)Hood Chatham2024-12-021-0/+2
| | | | | Moves the Emscripten web example into a standalone folder, and updates Makefile targets to build the web example. Instructions for usage have also been added.
* gh-109523: Raise a BlockingIOError if reading text from a non-blocking ↵Giovanni Siragusa2024-12-022-0/+2
| | | | stream cannot immediately return bytes. (GH-122933)
* gh-126618: fix repr(itertools.count(sys.maxsize)) (#127048)Sergey B Kirpichev2024-12-021-0/+2
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-12-021-0/+4
| | | | | | | | | | | | | collection (GH-127110) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Update docs * Clearer calculation of work to do.
* GH-127429: fix sysconfig data generation on cross-builds (#127430)Filipe Laíns 🇵🇸2024-12-021-0/+3
|
* gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` ↵Zhikang Yan2024-12-012-0/+3
| | | | | | | (#126900) --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-127321: Avoid stopping at an opcode without an associated line number for ↵Tian Gao2024-12-011-0/+1
| | | | breakpoint() (#127457)
* gh-126024: optimize UTF-8 decoder for short non-ASCII string (#126025)Inada Naoki2024-11-291-0/+2
|
* gh-126881: fix finalization of dtoa state (#126904)Kumar Aditya2024-11-291-0/+1
|
* gh-127303: Add docs for token.EXACT_TOKEN_TYPES (#127304)Илья Любавский2024-11-292-0/+2
| | | | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tomas R. <tomas.roun8@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-127330: Update for OpenSSL 3.4 & document+improve the update process ↵Petr Viktorin2024-11-281-0/+1
| | | | | | | | | | | | | | | | | (GH-127331) - Add `git describe` output to headers generated by `make_ssl_data.py` This info is more important than the date when the file was generated. It does mean that the tool now requires a Git checkout of OpenSSL, not for example a release tarball. - Regenerate the older file to add the info. To the other older file, add a note about manual edits. - Add notes on how to add a new OpenSSL version - Add 3.4 error messages and multissl tests
* GH-127178: install a _sysconfig_vars_(...).json file in the stdlib directory ↵Filipe Laíns 🇵🇸2024-11-271-0/+4
| | | | (#127302)
* gh-122288: Improve performances of `fnmatch.translate` (#122289)Bénédikt Tran2024-11-271-0/+2
| | | | | Improve performance of this function by a factor of 1.7x. Co-authored-by: Barney Gale <barney.gale@gmail.com>
* gh-123967: Fix faulthandler for trampoline frames (#127329)Victor Stinner2024-11-271-0/+2
| | | If the top-most frame is a trampoline frame, skip it.
* gh-124008: Fix calculation of the number of written bytes for the Windows ↵Serhiy Storchaka2024-11-271-0/+2
| | | | | | | | | | | | console (GH-124059) Since MultiByteToWideChar()/WideCharToMultiByte() is not reversible if the data contains invalid UTF-8 sequences, use binary search to calculate the number of written bytes from the number of written characters. Also fix writing incomplete UTF-8 sequences. Also fix handling of memory allocation failures.
* gh-127072: Remove outdated `socket.NETLINK_*` constants. (GH-127256)RUANG (James Roy)2024-11-271-0/+1
| | | | | Remove seriously outdated netlink constants. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829)Sergey B Kirpichev2024-11-261-0/+2
| | | | | | | | | | | | | | | "Generally, mixed-mode arithmetic combining real and complex variables should be performed directly, not by first coercing the real to complex, lest the sign of zero be rendered uninformative; the same goes for combinations of pure imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for complex elementary functions. This patch implements mixed-mode arithmetic rules, combining real and complex variables as specified by C standards since C99 (in particular, there is no special version for the true division with real lhs operand). Most C compilers implementing C99+ Annex G have only these special rules (without support for imaginary type, which is going to be deprecated in C2y).
* GH-126985: move pyvenv.cfg detection from site to getpath (#126987)Filipe Laíns 🇵🇸2024-11-261-0/+3
|
* gh-122273: Support PyREPL history on Windows (#127141)Victor Stinner2024-11-261-0/+1
| | | Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
* gh-126946: Improve error message in getopt.do_longs based on existing ↵Beomsoo Kim2024-11-261-0/+3
| | | | | comment (GH-126871) Include a list of possibilities for not unique prefix.
* GH-127236: `pathname2url()`: generate RFC 1738 URL for absolute POSIX path ↵Barney Gale2024-11-251-0/+5
| | | | | | | | | | | | | | | (#127194) When handed an absolute Windows path such as `C:\foo` or `//server/share`, the `urllib.request.pathname2url()` function returns a URL with an authority section, such as `///C:/foo` or `//server/share` (or before GH-126205, `////server/share`). Only the `file:` prefix is omitted. But when handed an absolute POSIX path such as `/etc/hosts`, or a Windows path of the same form (rooted but lacking a drive), the function returns a URL without an authority section, such as `/etc/hosts`. This patch corrects the discrepancy by adding a `//` prefix before drive-less, rooted paths when generating URLs.
* gh-127182: Fix `io.StringIO.__setstate__` crash when `None` is the first ↵sobolevn2024-11-251-0/+2
| | | | | value (#127219) Co-authored-by: Victor Stinner <vstinner@python.org>
* 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.