summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-119258: Eliminate Type Guards in Tier 2 Optimizer with Watcher (GH-119365)Saul Shanabrook2024-06-0813-59/+366
| | | | | | | Co-authored-by: parmeggiani <parmeggiani@spaziodati.eu> Co-authored-by: dpdani <git@danieleparmeggiani.me> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com> Co-authored-by: Ken Jin <kenjin@python.org>
* bpo-37755: Use configured output in pydoc instead of pager (GH-15105)Enrico Tröger2024-06-083-20/+116
| | | | | | | If the Helper() class was initialized with an output, the topics, keywords and symbols help still use the pager instead of the output. Change the behavior so the output is used if available while keeping the previous behavior if no output was configured.
* gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (#120243)Nikita Sobolev2024-06-081-15/+21
|
* gh-120225: fix crash in compiler on empty block at end of exception handler ↵Irit Katriel2024-06-073-6/+13
| | | | (#120235)
* gh-119659: Get the datetime CAPI Tests Running Again (gh-120180)Eric Snow2024-06-072-2/+2
| | | | | The tests were accidentally disabled by 2da0dc0, which didn't handle classes correctly. I considered updating no_rerun() to support classes, but the way test_datetime.py works would have made things fairly messy. Plus, it looks like the refleaks we had encountered before have been resolved.
* GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. (#120011)Barney Gale2024-06-072-14/+52
| | | | | In `glob._Globber`, move pathlib-specific methods to `pathlib._abc.PathGlobber` and replace them with abstract methods. Rename `glob._Globber` to `glob._GlobberBase`. As a result, the `glob` module is no longer befouled by code that can only ever apply to pathlib. No change of behaviour.
* gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (#120228)Victor Stinner2024-06-071-1/+1
| | | | | | | | | | | | | | | | Don't hardcode 'dest' in HAVE_SUBOFFSETS_IN_LAST_DIM() macro of memoryobject.c, but use its 'view' parameter instead. Fix the Coverity issue: Error: COPY_PASTE_ERROR (CWE-398): Python-3.12.2/Objects/memoryobject.c:273:14: original: ""dest->suboffsets + (dest->ndim - 1)"" looks like the original copy. Python-3.12.2/Objects/memoryobject.c:274:14: copy_paste_error: ""dest"" in ""src->suboffsets + (dest->ndim - 1)"" looks like a copy-paste error. Python-3.12.2/Objects/memoryobject.c:274:14: remediation: Should it say ""src"" instead? # 272| assert(dest->ndim > 0 && src->ndim > 0); # 273| return (!HAVE_SUBOFFSETS_IN_LAST_DIM(dest) && # 274|-> !HAVE_SUBOFFSETS_IN_LAST_DIM(src) && # 275| dest->strides[dest->ndim-1] == dest->itemsize && # 276| src->strides[src->ndim-1] == src->itemsize);
* gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux ↵Xi Ruoyao2024-06-071-7/+4
| | | | | >= 6.10 (#120227) The worst case is that the kernel buffers 17 pages with a page size of 64k.
* gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case ↵Nikita Sobolev2024-06-072-3/+4
| | | | (#120214)
* gh-114264: Optimize performance of copy.deepcopy by adding a fast path for ↵Pieter Eendebak2024-06-072-21/+11
| | | | atomic types (GH-114266)
* gh-110383: Improve 'old string formatting' text in tutorial (#120219)Erlend E. Aasland2024-06-071-3/+5
|
* gh-93691: fix too broad source locations of with-statement instructions ↵Irit Katriel2024-06-073-3/+47
| | | | (#120125)
* gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213)Serhiy Storchaka2024-06-072-3/+7
| | | | * Use new methods for tracing Tcl variable. * Fix Combobox.current() for empty combobox.
* gh-110383: Clarify "non-integral" wording in pow() docs (#119688)Aditya Borikar2024-06-071-1/+3
|
* gh-120164: Fix test_os.test_win32_mkdir_700() (#120177)Kirill Podoprigora2024-06-071-2/+3
| | | | | Don't compare the path to avoid encoding issues. Co-authored-by: Eryk Sun <eryksun@gmail.com>
* gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (#120173)Michael Allwright2024-06-072-2/+2
| | | Fix Emscripten/WASI pattern in case statement for LDSHARED
* Fix typos in comments (#120188)Xie Yanbo2024-06-0711-11/+11
|
* gh-120080: Accept ``None`` as a valid argument for direct call of the ↵Kirill Podoprigora2024-06-076-7/+20
| | | | | ``int.__round__`` (#120088) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-120157: Remove unused code in concurrent.future (gh-120187)Clinton2024-06-072-8/+1
|
* Add Plausible for docs metrics (#119977)Hugo van Kemenade2024-06-072-1/+5
| | | | Co-authored-by: Julien Palard <julien@palard.fr>
* gh-119577: Adjust DeprecationWarning when testing element truth values in ↵Jacob Walls2024-06-077-13/+21
| | | | | ElementTree (GH-119762) Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases.
* GH-119054: Add "Reading directories" section to pathlib docs (#119956)Barney Gale2024-06-061-95/+102
| | | | | | Add a dedicated subsection for `Path.iterdir()`-related methods, specifically `iterdir()`, `glob()`, `rglob()` and `walk()`. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-120178: Documentation typo corrections (#120179)David Lowry-Duda2024-06-063-3/+3
|
* gh-117657: Fix TSAN race involving import lock (#118523)Sam Gross2024-06-067-105/+90
| | | | | This adds a `_PyRecursiveMutex` type based on `PyMutex` and uses that for the import lock. This fixes some data races in the free-threaded build and generally simplifies the import lock code.
* Add Tian Gao to CODEOWNERS and ACKS (GH-120166)Tian Gao2024-06-062-0/+5
|
* Restore decimal context after decimal doctests (GH-120149)Serhiy Storchaka2024-06-061-3/+7
| | | The modified context caused tests failures in several other tests.
* CODEOWNERS: Add myself to symtable and AST (#120139)Jelle Zijlstra2024-06-061-4/+5
| | | Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-120155: Initialize variables in _tkinter.c (#120156)Victor Stinner2024-06-061-2/+7
| | | Initialize variables in _tkinter.c to make static analyzers happy.
* gh-119679: Fix layout of PYD and DLL files on Windows when using PC/layout ↵Steve Dower2024-06-061-2/+2
| | | | script (GH-120133)
* gh-120111: Don't use cirrus M1 macOS runners on fork (#120116)Nice Zombies2024-06-062-5/+14
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-119786: move adaptive interpreter doc from Python to InternalsDoc (#120137)Irit Katriel2024-06-062-4/+7
|
* gh-120128: fix description of argument to ipaddress.collapse_addresses() ↵Jan Kaliszewski2024-06-052-2/+2
| | | | | | (#120131) The argument to collapse_addresses() is now described as an *iterable* (rather than *iterator*).
* pathlib ABCs: remove duplicate `realpath()` implementation. (#119178)Barney Gale2024-06-052-70/+57
| | | | | | | | | Add private `posixpath._realpath()` function, which is a generic version of `realpath()` that can be parameterised with string tokens (`sep`, `curdir`, `pardir`) and query functions (`getcwd`, `lstat`, `readlink`). Also add support for limiting the number of symlink traversals. In the private `pathlib._abc.PathBase` class, call `posixpath._realpath()` and remove our re-implementation of the same algorithm. No change to any public APIs, either in `posixpath` or `pathlib`. Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* gh-115225: Raise error on unsupported ISO 8601 time strings (#119339)benchatt2024-06-054-0/+7
| | | | | | | | Some time strings that contain fractional hours or minutes are permitted by ISO 8601, but such strings are very unlikely to be intentional. The current parser does not parse such strings correctly or raise an error. This change raises a ValueError when hours or minutes contain a decimal mark. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-119786: add links to code in exception handling doc (#120077)Irit Katriel2024-06-051-33/+16
|
* gh-120065: Increase `collect_in_thread` period to 5 ms. (#120068)Sam Gross2024-06-051-1/+1
| | | | | This matches the default GIL switch interval. It greatly speeds up the free-threaded build: previously, it spent nearly all its time in `gc.collect()`.
* gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from ↵Irit Katriel2024-06-052-2/+5
| | | | contextlib.suppress (#119657)
* gh-119819: Update logging configuration to support joinable multiproc… ↵Vinay Sajip2024-06-052-3/+9
| | | | | (GH-120090) gh-119819: Update logging configuration to support joinable multiprocessing manager queues.
* gh-120078: Fix struct_time attr typo tm_day -> tm_mday in ↵shurj02024-06-051-1/+1
| | | | Doc/library/time.rst (GH-120081)
* gh-114616: Improve docs regarding changes to caches representation in dis ↵Irit Katriel2024-06-042-3/+11
| | | | (#120033)
* gh-119553: Fix console when pressing Ctrl-C within a multiline block (#120075)Lysandros Nikolaou2024-06-042-1/+3
|
* gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount` (#120000)Sam Gross2024-06-041-8/+11
| | | | | | We need to write to `ob_ref_local` and `ob_tid` before `ob_ref_shared`. Once we mark `ob_ref_shared` as merged, some other thread may free the object because the caller also passes in `-1` as `extra` to give up its only reference.
* gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067)Vinay Sajip2024-06-041-1/+1
|
* gh-120048: Make `test_imaplib` faster (#120050)Sam Gross2024-06-041-14/+8
| | | | | | | | | | | The `test_imaplib` was taking 40+ minutes in the refleak build bots because the tests waiting on a client `self._setup()` was creating a client that prevented progress until its connection timed out, which scaled with the global timeout. We should set `connect=False` for the tests that don't want `_setup()` to create a client. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843)Pablo Galindo Salgado2024-06-048-11/+144
| | | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* doc: Mention the missing reflected special methods for all binary operations ↵Paulo Freitas2024-06-041-7/+17
| | | | (GH-119931)
* gh-119553: Clear reader on Ctrl-C command (GH-119801)Lysandros Nikolaou2024-06-043-0/+19
|
* gh-120039: Reduce expected timeout in test_siginterrupt_off (#120047)Sam Gross2024-06-041-3/+3
| | | | | The process is expected to time out. In the refleak builds, `support.SHORT_TIMEOUT` is often five minutes and we run the tests six times, so test_signal was taking >30 minutes.
* gh-120041: Refactor check for visible completion menu in completing_reader ↵Lysandros Nikolaou2024-06-042-6/+4
| | | | (#120055)
* gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681)Christopher Chavez2024-06-042-14/+25
| | | | | | * Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>