summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (GH-122865)Eric Snow2024-09-093-12/+1
| | | | | | | | | | | | | | | | | In gh-121602, I applied a fix to a builtin types initialization bug. That fix made sense in the context of some broader future changes, but introduced a little bit of extra complexity. That fix has turned out to be incomplete for some of the builtin types we haven't been testing. I found that out while improving the tests. A while back, @markshannon suggested a simpler fix that doesn't have that problem, which I've already applied to 3.12 and 3.13. I'm switching to that here. Given the potential long-term benefits of the more complex (but still incomplete) approach, I'll circle back to it in the future, particularly after I've improved the tests so no corner cases slip through the cracks. (This is effectively a "forward-port" of 716c677 from 3.13.)
* Fix typos (#123775)algonell2024-09-0933-45/+45
|
* gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (#123824)Furkan Onder2024-09-091-1/+3
| | | Fix test_posix for unsupported posix_fallocate on NetBSD.
* gh-122311: Improve and unify pickle errors (GH-122771)Serhiy Storchaka2024-09-092-149/+154
| | | | | | | | | | | | | * Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. * Chain the original exception to the pickle-specific one as __context__. * Include the error message of ImportError and some AttributeError in the PicklingError error message. * Unify error messages between Python and C implementations. * Refer to documented __reduce__ and __newobj__ callables instead of internal methods (e.g. save_reduce()) or pickle opcodes (e.g. NEWOBJ). * Include more details in error messages (what expected, what got). * Avoid including a potentially long repr of an arbitrary object in error messages.
* gh-123843: Remove broken links to the Zope DateTimeWiki (#123846)Adam Turner2024-09-093-11/+8
| | | Co-authored-by: Conrad Bhuiyan-Volkoff <hi@cbv.im>
* gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase ↵Sergey B Kirpichev2024-09-086-120/+65
| | | | (GH-121071)
* gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 ↵Seth Michael Larson2024-09-072-0/+39
| | | | | | (GH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4.
* gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795)Łukasz Langa2024-09-067-21/+131
| | | | | | | | | This switches the main pyrepl event loop to always be non-blocking so that it can listen to incoming interruptions from other threads. This also resolves invalid display of exceptions from other threads (gh-123178). This also fixes freezes with pasting and an active input hook.
* gh-123321: Make Parser/myreadline.c locking safe in free-threaded build ↵Sam Gross2024-09-061-2/+1
| | | | | | | (#123690) Use a `PyMutex` to avoid the race in mutex initialization. Use relaxed atomics to avoid the data race on reading `_PyOS_ReadlineTState` when checking for re-entrant calls.
* gh-117657: Fix file descriptor race in test_socket.py (#123697)Nadeshiko Manju2024-09-061-8/+9
|
* gh-119310: Fix encoding when reading old history file (#121779)aorcajo2024-09-063-6/+56
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-123780: Make test_pkgutil clean up `spam` module (GH-123036)Malcolm Smith2024-09-061-4/+10
|
* gh-119034, REPL: Change page up/down keys to search in history (#123607)Victor Stinner2024-09-064-4/+111
| | | | | | Change <page up> and <page down> keys of the Python REPL to history search forward/backward. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-111201: fix auto-indent in pyrepl for muliple pound comments (#123196)Arnon Yaari2024-09-062-1/+19
|
* gh-123275: Add tests for `PYTHON_GIL=1` and `-Xgil=1` (gh-123754)Peter Bierma2024-09-061-6/+16
|
* gh-123476: Add support for TCP_QUICKACK socket setting to Windows (#123478)nkinnan2024-09-051-1/+25
| | | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-123240: Raise input audit events in the new REPL (#123274)sobolevn2024-09-051-2/+6
|
* gh-123465: Allow Py_RELATIVE_OFFSET for __*offset__ members (GH-123474)Petr Viktorin2024-09-052-43/+116
|
* gh-97588: Move ctypes struct/union layout logic to Python (GH-123352)Petr Viktorin2024-09-053-5/+366
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-123321: Fix Parser/myreadline.c to prevent a segfault during a ↵Bar Harel2024-09-041-1/+27
| | | | multi-threaded race (#123323)
* gh-118710: Make IPv*Address.version & max_prefixlen available on the class ↵Nice Zombies2024-09-042-64/+47
| | | | (GH-120698)
* gh-107954, PEP 741: Add PyInitConfig_AddModule() function (#123668)Victor Stinner2024-09-041-0/+3
|
* gh-107954, PEP 741: Adjust Python initialization config (#123663)Victor Stinner2024-09-041-1/+0
| | | | | | | Setting dev_mode to 1 in an isolated configuration now enables also faulthandler. Moreover, setting "module_search_paths" option with PyInitConfig_SetStrList() now sets "module_search_paths_set" to 1.
* gh-121423: Improve import time of `socket` (#121424)Wulian2024-09-041-101/+107
| | | | | | | | | | Improve import time of `socket` by writing `socket.errorTab` as a constant and lazy import modules. Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-122989: Replace duplicate “self.policy.linesep” with “linesep” ↵Damien2024-09-041-1/+1
| | | | | (#123002) `linesep` is already defined as `self.policy.linesep`. It appears that previous refactor was not completed.
* gh-123572: Fix key codes in VK_MAP in windows_console.py (#122692)devdanzin2024-09-031-4/+5
|
* gh-121804: always show error location for SyntaxError's in basic repl (#123202)Sergey B Kirpichev2024-09-031-0/+13
|
* gh-107954, PEP 741: Add PyInitConfig C API (#123502)Victor Stinner2024-09-031-10/+36
| | | Add Doc/c-api/config.rst documentation.
* gh-123430: Add dark mode support to pages generated by http.server (#123475)Yorik Hansen2024-09-031-0/+6
| | | | | | Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-121313: multiprocessing: simplify by increasing the connection buffer ↵Inada Naoki2024-09-031-16/+4
| | | | | | | | size to 64KiB (GH-123559) Increases the multiprocessing connection buffer size from 8k to 64k for efficiency, without overallocating. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* Fix typos in warnings, docstrings, comments and text files (#123597)abstractee2024-09-038-8/+8
|
* gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472)Victor Stinner2024-09-023-61/+445
| | | | | | | | | | | Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and PyConfig_Names() functions to get and set the current runtime Python configuration. Add visibility and "sys spec" to config and preconfig specifications. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* GH-119518: Stop interning strings in pathlib GH-123356)Barney Gale2024-09-022-11/+1
| | | | Remove `sys.intern(str(x))` calls when normalizing a path in pathlib. This speeds up `str(Path('foo/bar'))` by about 10%.
* gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses ↵Bénédikt Tran2024-09-022-12/+51
| | | | | (GH-123419) Fix functionality that was broken with better textual representation for IPv4-mapped addresses (gh-87799)
* gh-101525: Skip test_gdb if the binary is relocated by BOLT. (gh-118572)Donghee Na2024-09-023-0/+17
|
* gh-123562: Improve `SyntaxError` message for `case ... as a.b` (#123563)sobolevn2024-09-022-1/+48
|
* gh-118761: Speedup pathlib import by deferring shutil (#123520)Daniel Hollas2024-09-011-2/+4
| | | | 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-123341: Support `tkinter.Event` type subcript (#123353)Yoda2024-09-012-0/+8
| | | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` ↵sobolevn2024-09-011-0/+32
| | | | (#123342)
* gh-123494: Improve documentation for ``webbrowser`` return types (#123495)Aarni Koskela2024-09-011-0/+3
| | | Document the return value for ``webbrowser.open*()``.
* gh-115238: Remove a redundant f-string in graphlib (#115239)Luka2024-09-011-1/+1
|
* gh-121285: Remove backtracking when parsing tarfile headers (GH-121286)Seth Michael Larson2024-08-312-35/+110
| | | | | | | | * Remove backtracking when parsing tarfile headers * Rewrite PAX header parsing to be stricter * Optimize parsing of GNU extended sparse headers v0.0 Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-123309: Remove check for redefined memo entry in pickletools.dis() ↵Serhiy Storchaka2024-08-312-24/+10
| | | | | | (GH-123374) Such pickles are supported by the Unpickler even if the Pickler does not produce them.
* gh-76960: Fix urljoin() and urldefrag() for URIs with empty components ↵Serhiy Storchaka2024-08-312-52/+135
| | | | | | | | | | | | (GH-123273) * urljoin() with relative reference "?" sets empty query and removes fragment. * Preserve empty components (authority, params, query, fragment) in urljoin(). * Preserve empty components (authority, params, query) in urldefrag(). Also refactor the code and get rid of double _coerce_args() and _coerce_result() calls in urljoin(), urldefrag(), urlparse() and urlunparse().
* gh-123309: Add more tests for the pickletools module (GH-123355)Serhiy Storchaka2024-08-311-0/+310
| | | Add tests for genops() and dis().
* gh-108172: do not override OS preferred browser if it is a super-string of a ↵Oded Arbel2024-08-311-1/+1
| | | | | | | | | | | known browser (GH-113011) When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox". https://github.com/python/cpython/issues/108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-121313: Limit the reading size from pipes to their default buffer size on ↵Alexander P.2024-08-311-3/+18
| | | | | POSIX systems (GH-121315) See https://github.com/python/cpython/issues/121313 for analysis, but this greatly reduces memory overallocation and overhead when multiprocessing is sending non-small data over its pipes between processes.
* gh-123440: Improve error message for `except as` used with not a name (#123442)sobolevn2024-08-301-0/+47
|
* gh-122854: Add Py_HashBuffer() function (#122855)Victor Stinner2024-08-301-0/+10
|
* gh-121645: Add PyBytes_Join() function (#121646)Victor Stinner2024-08-301-0/+40
| | | | * Replace _PyBytes_Join() with PyBytes_Join(). * Keep _PyBytes_Join() as an alias to PyBytes_Join().