summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-127089: Add missing description for codes in `http.HTTPStatus` (#127100)donBarbos2024-12-272-30/+52
| | | | Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Mention loop_factory argument in docstring for asyncio.run() (#128288)Andrew Svetlov2024-12-271-0/+1
|
* gh-125887: Update PyObject_HasAttr exception behavior (#125907)Damien2024-12-271-1/+2
| | | | | Update PyObject_HasAttr exception behavior Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-127537: Add __class_getitem__ to the python implementation of ↵CF Bolz-Tereick2024-12-273-0/+14
| | | | functools.partial (#127537)
* Remove incorrect imports rationale comment in `http.server` (#128278)Moshe Kaplan2024-12-261-1/+1
| | | Remove reference to gethostbyaddr(), because it's not actually used within this code.
* gh-126868: Add freelist for compact ints to `_PyLong_New` (#128181)Pieter Eendebak2024-12-262-12/+19
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-87138: convert blake2b/2s types to heap types (#127669)Bénédikt Tran2024-12-261-20/+69
|
* gh-124761: add `socket.SO_REUSEPORT_LB` (#124961)Thomas Grainger2024-12-263-0/+12
|
* Clean up redundant ifdef in list getitem (#128257)da-woods2024-12-261-4/+0
| | | It's already inside a `Py_GIL_DISABLED` block so the `#else` clause is always unused.
* Docs: Fix comment out in `c-api/typeobj.rst` (#128266)Yuki Kobayashi2024-12-261-0/+1
|
* gh-119786: Fix typos in `InternalDocs/frames.md` (#128275)Yan Yanchii2024-12-261-4/+4
| | | Fix typos in `InternalDocs/frames.md`
* gh-127949: add docs for asyncio policy deprecation (#128269)Kumar Aditya2024-12-262-4/+38
|
* gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199)Yan Yanchii2024-12-253-0/+21
|
* gh-128234: support emscripten and wasi in async contextlib tests by removing ↵Thomas Grainger2024-12-251-33/+61
| | | | | asyncio from contextlib async tests (#95888) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-128002: use internal llist implementation for asyncio tasks (#128256)Kumar Aditya2024-12-251-50/+20
|
* gh-128201: Fix ``DeprecationWarning`` in ``test_pdb`` (#128202)Kirill Podoprigora2024-12-251-16/+4
|
* gh-128035: Add ssl.HAS_PHA to detect libssl PHA support (GH-128036)Will Childs-Klein2024-12-247-4/+26
| | | | | | * Add ssl.HAS_PHA to detect libssl Post-Handshake-Auth support Co-authored-by: Tomas R. <tomas.roun8@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-128227: Regenerate `Doc/requirements-oldest-sphinx.txt` (#128228)Bogdan Romanyuk2024-12-241-6/+6
|
* gh-127847: Fix position in the special-cased zipfile seek (#127856)Dima Ryazanov2024-12-243-1/+17
| | | | | | | --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-127949: deprecate `asyncio.set_event_loop` (#128218)Kumar Aditya2024-12-2416-55/+77
| | | Deprecate `asyncio.set_event_loop` to be removed in Python 3.16.
* gh-128217: Validate the normalized_environment variable instead of the ↵Sergey Muraviov2024-12-241-1/+1
| | | | similarly named function (GH-128220)
* Add Windows version comments to the python manifest. (GH-127439)AraHaan2024-12-241-0/+5
|
* gh-127949: deprecate asyncio policy classes (#128216)Kumar Aditya2024-12-248-34/+82
|
* gh-127949: fix `DeprecationWarning` in test_inspect.py (#128215)Thomas Grainger2024-12-241-15/+13
|
* gh-128195: Add `_REPLACE_WITH_TRUE` to the tier2 optimizer (GH-128203)Yan Yanchii2024-12-232-1/+5
| | | Add `_REPLACE_WITH_TRUE` to the tier2 optimizer
* pathlib tests: create test hierarchy without using class under test (#128200)Barney Gale2024-12-232-29/+55
| | | | | In the pathlib tests, avoid using the path class under test (`self.cls`) in test setup. Instead we use `os` functions in `test_pathlib`, and direct manipulation of `DummyPath` internal data in `test_pathlib_abc`.
* gh-115999: Update test_opcache to test with nested method (gh-128166)Donghee Na2024-12-231-10/+8
| | | gh-115999: Update test_opcace to test with nested method
* gh-114203: Optimise simple recursive critical sections (#128126)T. Wouters2024-12-233-7/+32
| | | | | | | Add a fast path to (single-mutex) critical section locking _iff_ the mutex is already held by the currently active, top-most critical section of this thread. This can matter a lot for indirectly recursive critical sections without intervening critical sections.
* gh-126180: Remove getopt and optparse deprecation notices (GH-126227)Alyssa Coghlan2024-12-2312-65/+266
| | | | | | | | | | | | | * Remove getopt and optparse deprecation notices * Add new docs sections for command line app helper libraries * Add guidance on choosing a CLI parsing library to the optparse docs * Link to the new guidance from the argparse and getopt docs * Reword intro in docs section for superseded stdlib modules * Reframe the optparse->argparse guide as a migration guide rather than as an upgrade guide --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-100384: Error on `unguarded-availability` in macOS builds (#128155)Zanie Blue2024-12-224-0/+51
| | | Generate a build error on ``unguarded-availability`` in portable macOS builds (i.e. using MACOSX_DEPLOYMENT_TARGET), preventing invalid use of symbols that are not available in older versions of the OS.
* gh-119786: Fix typos in `InternalDocs/interpreter.md` (#128174)Yan Yanchii2024-12-221-4/+4
|
* gh-127949: fix resource warnings in `test_tasks.py` (#128172)Thomas Grainger2024-12-221-8/+8
|
* gh-126664: revert: Use `else` instead of `finally` in docs explaining "with" ↵Gregory P. Smith2024-12-221-2/+5
| | | | | | | (#128169) Revert "gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665)" This reverts commit 25257d61cfccc3b4189f96390a5c4db73fd5302c.
* GH-127807: pathlib ABCs: move private copying methods to dedicated class ↵Barney Gale2024-12-223-248/+261
| | | | | | | | | | | (#127810) Move 9 private `PathBase` attributes and methods into a new `CopyWorker` class. Change `PathBase.copy` from a method to a `CopyWorker` instance. The methods remain private in the `CopyWorker` class. In future we might make some/all of them public so that user subclasses of `PathBase` can customize the copying process (in particular reading/writing of metadata,) but we'd need to make `PathBase` public first.
* GH-127807: pathlib ABCs: remove a few private attributes (#127851)Barney Gale2024-12-222-56/+64
| | | | | From `PurePathBase` delete `_globber`, `_stack` and `_pattern_str`, and from `PathBase` delete `_glob_selector`. This helps avoid an unpleasant surprise for a users who try to use these names.
* GH-127807: pathlib ABCs: remove `PurePathBase._raw_paths` (#127883)Barney Gale2024-12-225-96/+92
| | | | | Remove the `PurePathBase` initializer, and make `with_segments()` and `__str__()` abstract. This allows us to drop the `_raw_paths` attribute, and also the `Parser.join()` protocol method.
* gh-112328: Make EnumDict usable on its own and document it (GH-123669)Petr Viktorin2024-12-205-16/+60
| | | | | Co-authored-by: Rafi <rafi.promit@gmail.com> Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-128049: Fix type confusion bug with the return value of a custom ↵Nico-Posada2024-12-203-2/+67
| | | | ExceptionGroup split function (#128079)
* Python Tutorial typo fix (#128077)shallow-beach2024-12-201-1/+1
|
* GH-127705: Add debug mode for `_PyStackRef`s inspired by HPy debug mode ↵Mark Shannon2024-12-2012-33/+395
| | | | (GH-128121)
* gh-127295: ctypes: Switch field accessors to fixed-width integers (GH-127297)Petr Viktorin2024-12-204-652/+501
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be a pure refactoring, without user-visible behaviour changes. Before this change, ctypes uses traditional native C types, usually identified by [`struct` format characters][struct-chars] when a short (and identifier-friendly) name is needed: - `signed char` (`b`) / `unsigned char` (`B`) - `short` (`h`) / `unsigned short` (`h`) - `int` (`i`) / `unsigned int` (`i`) - `long` (`l`) / `unsigned long` (`l`) - `long long` (`q`) / `unsigned long long` (`q`) These map to C99 fixed-width types, which this PR switches to: - - `int8_t`/`uint8_t` - `int16_t`/`uint16_t` - `int32_t`/`uint32_t` - `int64_t`/`uint64_t` The C standard doesn't guarantee that the “traditional” types must map to the fixints. But, [`ctypes` currently requires it][swapdefs], so the assumption won't break anything. By “map” I mean that the *size* of the types matches. The *alignment* requirements might not. This needs to be kept in mind but is not an issue in `ctypes` accessors, which [explicitly handle unaligned memory][memcpy] for the integer types. Note that there are 5 “traditional” C type sizes, but 4 fixed-width ones. Two of the former are functionally identical to one another; which ones they are is platform-specific (e.g. `int`==`long`==`int32_t`.) This means that one of the [current][current-impls-1] [implementations][current-impls-2] is redundant on any given platform. The fixint types are parametrized by the number of bytes/bits, and one bit for signedness. This makes it easier to autogenerate code for them or to write generic macros (though generic API like [`PyLong_AsNativeBytes`][PyLong_AsNativeBytes] is problematic for performance reasons -- especially compared to a `memcpy` with compile-time-constant size). When one has a *different* integer type, determining the corresponding fixint means a `sizeof` and signedness check. This is easier and more robust than the current implementations (see [`wchar_t`][sizeof-wchar_t] or [`_Bool`][sizeof-bool]). [swapdefs]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L420-L444 [struct-chars]: https://docs.python.org/3/library/struct.html#format-characters [current-impls-1]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L470-L653 [current-impls-2]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L703-L944 [memcpy]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L613 [PyLong_AsNativeBytes]: https://docs.python.org/3/c-api/long.html#c.PyLong_AsNativeBytes [sizeof-wchar_t]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L1547-L1555 [sizeof-bool]: https://github.com/python/cpython/blob/v3.13.0/Modules/_ctypes/cfield.c#L1562-L1572 Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-127946: Use a critical section for `CFuncPtr` attributes (GH-128109)Peter Bierma2024-12-204-30/+266
|
* gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120)Victor Stinner2024-12-201-1/+4
|
* gh-109959: Log the current directory in test_glob.test_selflink() (#128122)Victor Stinner2024-12-201-0/+7
|
* GH-122548: Correct magic number comment (GH-128115)Mark Shannon2024-12-201-1/+2
| | | Correct magic number comment
* gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (#128047)Shantanu2024-12-203-1/+25
| | | | | I missed the extra `PyModule_Check` in #127660 because I was looking at 3.12 as the base implementation for import from. This meant that I missed the `PyModuleCheck` introduced in #112661.
* gh-128058: Fix test_builtin ImmortalTests (#128068)Victor Stinner2024-12-201-1/+4
| | | | | | On 32-bit Free Threading systems, immortal reference count is 5 << 28, instead of 7 << 28. Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-112328: Document EnumDict in docs and release notes (GH-121720)Md Rokibul Islam2024-12-192-1/+21
| | | | Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-128080: remove unnecessary `__init__` method from Enum (GH-128081)Stephen Morton2024-12-191-3/+0
| | | | | remove unnecessary __init__ method from Enum Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-127274: Defer nested methods (#128012)mpage2024-12-1911-14/+37
| | | | | | | Methods (functions defined in class scope) are likely to be cleaned up by the GC anyway. Add a new code flag, `CO_METHOD`, that is set for functions defined in a class scope. Use that when deciding to defer functions.