summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-126353: remove implicit creation of loop from `asyncio.get_event_loop` ↵Kumar Aditya2024-11-048-62/+24
| | | | | (#126354) Remove implicit creation of loop from `asyncio.get_event_loop`. This is a step forward of deprecating the policy system of asyncio.
* Docs: turn getopt examples into doctests (#126377)Erlend E. Aasland2024-11-041-2/+10
|
* gh-126165: Improve docs of function `math.isclose` (#126215)Zhikang Yan2024-11-042-16/+20
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Docs: Delist sqlite3 deprecation from "Pending removal in 3.14" (#126370)Hugo van Kemenade2024-11-031-3/+0
|
* gh-126357: Remove gettext import guards (GH-126358)Tomas R.2024-11-032-18/+4
|
* gh-126313: Fix a crash in curses.napms() due to incorrect error handling ↵Bénédikt Tran2024-11-032-2/+7
| | | | (GH-126351)
* gh-104400: Add more tests to pygettext (GH-108173)Tomas R.2024-11-038-21/+363
|
* gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101)Cody Maloney2024-11-032-3/+4
| | | | | | | | | | GH-113977, GH-120754: Remove unbounded reads from zipfile Read without a size may read an unbounded amount of data + allocate unbounded size buffers. Move to capped size reads to prevent potential issues. Co-authored-by: Daniel Hillier <daniel.hillier@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-125832: Reformat comments for inlined comprehensions (gh-126346)Donghee Na2024-11-031-5/+5
|
* gh-120754: Add a strace helper and test set of syscalls for open().read(), ↵Cody Maloney2024-11-034-33/+329
| | | | Take 2 (#123413)
* gh-99880: document rounding mode for new-style formatting (GH-121481)Sergey B Kirpichev2024-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | * gh-99880: document rounding mode for new-style formatting The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half to even tie-breaking rule. If that functions is unavailable, PyOS_double_to_string() fallbacks to system snprintf(). Since CPython 3.12, build requirements include C11 compiler *and* support for IEEE 754 floating point numbers (Annex F). This means that FE_TONEAREST macro is available and, per default, printf-like functions should use same rounding mode as _Py_dg_dtoa(). * Update Doc/library/string.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (#126322)rimchoi2024-11-021-3/+6
| | | | | | | | | | | | | | * Fix comprehensions comment to inlined by pep 709 * Update spacing Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com> * Add reference to PEP 709 --------- Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
* gh-126317: Simplify pickle code by using itertools.batched() (GH-126323)Lee Dong Wook2024-11-021-39/+22
|
* gh-125761: Clarify repeated warning suppression criteria in warnings module ↵고병찬2024-11-021-0/+13
| | | | (gh-126326)
* gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321)simple-is-great2024-11-021-9/+5
|
* gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__` ↵Nico-Posada2024-11-022-2/+23
| | | | | (#126305) Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319)rimchoi2024-11-021-1/+1
| | | Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC
* gh-126255: Ignore warning about JIT being deactivated when perf support is ↵mpage2024-11-014-5/+14
| | | | | | | | | | | active in `test_embed.InitConfigTests.test_initconfig_api` (#126302) Temporarily ignore warnings about JIT deactivation when perf support is active. This will be reverted as soon as a way is found to determine at run time whether the interpreter was built with JIT. Currently, this is not possible on Windows. Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-120026: soft deprecate Py_HUGE_VAL macro (#120027)Sergey B Kirpichev2024-11-0110-18/+23
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args ↵sobolevn2024-11-013-0/+42
| | | | | (backportable) (#126271) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-120754: _io Ensure stat cache is cleared on fd change (#125166)Cody Maloney2024-11-012-5/+9
| | | | | | | | Performed an audit of `fileio.c` and `_pyio` and made sure anytime the fd changes the stat result, if set, is also cleared/changed. There's one case where it's not cleared, if code would clear it in __init__, keep the memory allocated and just do another fstat with the existing memory.
* gh-125560: Pin JIT CI to ubuntu-22.04 (#125564)Savannah Ostrowski2024-11-011-6/+6
|
* gh-125916: Adapt functools.reduce() to Argument Clinic (#125999)Sergey B Kirpichev2024-11-013-22/+70
|
* Doc: Add a single table as summary to math documentation (GH-125810)Joseph Martinot-Lagarde2024-11-011-3/+89
| | | | | | | | | | | | | | | | | | | | | | | | | * Summary for math module with separate tables * Forgot remainder description * Single table * data instead of func * Add arguments in the table * Fix inconsistencies in pow documentation * Remove full stops from the table Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Fix math.pow link * Fix spacing --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* docs: add a more precise example in enum doc (GH-121015)Filip "Ret2Me" Poplewski2024-11-011-1/+1
| | | | | | | | | | | | | * docs: add a more precise example Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment. * docs: remove whitespace characters * refactor: change example --------- Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* GH-125413: pathlib ABCs: use `scandir()` to speed up `walk()` (#126262)Barney Gale2024-11-012-12/+14
| | | | | | | Use the new `PathBase.scandir()` method in `PathBase.walk()`, which greatly reduces the number of `PathBase.stat()` calls needed when walking. There are no user-facing changes, because the pathlib ABCs are still private and `Path.walk()` doesn't use the implementation in its superclass.
* GH-125413: pathlib ABCs: use `scandir()` to speed up `glob()` (#126261)Barney Gale2024-11-013-25/+10
| | | | | | | Use the new `PathBase.scandir()` method in `PathBase.glob()`, which greatly reduces the number of `PathBase.stat()` calls needed when globbing. There are no user-facing changes, because the pathlib ABCs are still private and `Path.glob()` doesn't use the implementation in its superclass.
* gh-97850: remove ``find_loader`` and ``get_loader`` from ``pkgutil`` (#119656)Bénédikt Tran2024-11-019-183/+12
| | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Brett Cannon <brett@python.org>
* gh-99108: Cleanup references to inexisting `Modules/_blake2`. (GH-126270)Bénédikt Tran2024-11-016-16/+0
| | | | | | | | | * Remove references to `Modules/_blake2`. * Remove `Modules/_blake2` entry from CODEOWNERS The folder does not exist anymore. * Remove `Modules/_blake2` entry from `Tools/c-analyzer/TODO`
* gh-126211: Exclude preprocessor directives from statements containing ↵mpage2024-11-012-1/+34
| | | | | | | | | escaping calls (#126213) The cases generator inserts code to save and restore the stack pointer around statements that contain escaping calls. To find the beginning of such statements, we would walk backwards from the escaping call until we encountered a token that was treated as a statement terminator. This set of terminators should include preprocessor directives.
* gh-111495: improve test coverage of codecs C API (GH-126030)Bénédikt Tran2024-11-011-23/+115
| | | For now, skip some crashers (tracked in gh-123378).
* gh-125783: Add more tests to prevent regressions with the combination of ↵Jun Komoda2024-11-011-0/+65
| | | | ctypes and metaclasses. (GH-126126)
* gh-126206: make clinic now forcefully regenerates clinic code (#126244)Erlend E. Aasland2024-11-012-1/+3
|
* gh-126259: Fix "unclosed database" warning in sqlite3 doctest (#126260)sobolevn2024-11-011-0/+1
|
* GH-125413: Add `pathlib.Path.scandir()` method (#126060)Barney Gale2024-11-016-11/+114
| | | | | Add `pathlib.Path.scandir()` as a trivial wrapper of `os.scandir()`. This will be used to implement several `PathBase` methods more efficiently, including methods that provide `Path.copy()`.
* gh-126256: Update time.rst to use the same clock as instead of the same ↵Alperen Keleş2024-10-311-2/+2
| | | | | | | clock than (#126257) Update time.rst to use `the same clock as` instead of `the same clock than` The time documentation uses the same clock than time.monotonic instead of the same clock as time.monotonic, which is grammatically false. This PR fixes changes two instances of `the same clock than` to `the same clock as`.
* gh-126156: Improve performance of creating `Morsel` objects (#126157)J. Nick Koston2024-10-312-2/+4
| | | Replaces the manually constructed loop with a call to `dict.update`
* gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to ↵Bénédikt Tran2024-10-312-1/+8
| | | | an evil `loop.__getattribute__` (#126120)
* gh-101123: Adapt vararg functions in the math module to Argument Clinic ↵Sergey B Kirpichev2024-10-312-37/+143
| | | | | | (#126235) This implicitly fixes the math.hypot signature, which was previously incomprehensible to inspect.signature().
* gh-126240: handle `NULL` returned by `_Py_asdl_expr_seq_new` (#126241)Bénédikt Tran2024-10-311-0/+9
| | | check return value of `_Py_asdl_expr_seq_new`
* gh-126223: Propagate unicode errors in `_interpreters.create()` (#126224)Peter Bierma2024-10-313-1/+10
| | | | Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-90370: Argument Clinic: avoid temporary tuple creation for varargs (#126064)Sergey B Kirpichev2024-10-3111-222/+209
| | | | | | | Avoid temporary tuple creation when all arguments either positional-only or vararg. Objects/setobject.c and Modules/gcmodule.c adapted. This fixes slight performance regression for set methods, introduced by gh-115112.
* gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with ↵Nico-Posada2024-10-313-1/+24
| | | | new non-`None` context (#126103)
* gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in ↵RUANG (James Roy)2024-10-311-1/+1
| | | | | warnings docs (GH-125823) Change documentation
* gh-126178: NFC Separate Emscripten and WASI standard lib disables in ↵Hood Chatham2024-10-312-43/+69
| | | | | configure (#126179) Separate the Emscripten and WASI stdlib configuration in configure.
* Add myself to CODEOWNERS for WASM/emscripten and Android (#126210)Russell Keith-Magee2024-10-311-3/+3
| | | Add RKM to CODEOWNERS for WASM/emscripten and Android.
* GH-126205: Fix conversion of UNC paths to file URIs (#126208)Barney Gale2024-10-303-13/+10
| | | File URIs for Windows UNC paths should begin with two slashes, not four.
* gh-121267: Improve performance of tarfile (#121267) (#121269)Johan Förberg2024-10-302-8/+19
| | | | | | | | | | | | | | | Tarfile in the default write mode spends much of its time resolving UIDs into usernames and GIDs into group names. By caching these mappings, a significant speedup can be achieved. In my simple benchmark[1], this extra caching speeds up tarfile by 8x. [1] https://gist.github.com/jforberg/86af759c796199740c31547ae828aef2 --------- Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-125674: Doc: Fix type of `newfunc` first parameter (GH-125675)Richard Hansen2024-10-301-2/+2
| | | | | | | | | * gh-125674: Doc: Fix type of `newfunc` first parameter * fixup! gh-125674: Doc: Fix type of `newfunc` first parameter --------- Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-114990: Add missing mixin methods in collections.abc's document (GH-114991)AN Long2024-10-301-2/+3
| | | Co-authored-by: Carol Willing <carolcode@willingconsulting.com>