summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-128404: remove asyncio from test_type_params (#128436)Thomas Grainger2025-01-031-5/+2
|
* gh-128400: Stop-the-world when manually calling `faulthandler` (GH-128422)Peter Bierma2025-01-021-1/+29
|
* gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() ↵Zhikang Yan2025-01-022-2/+28
| | | | | (GH-128015) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-128404: Remove ``asyncio`` from ``test_builtin`` (#128403)Thomas Grainger2025-01-021-59/+64
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-124130: Fix a bug in matching regular expression \B in empty string ↵Serhiy Storchaka2025-01-021-8/+5
| | | | (GH-127007)
* gh-95371: Add support for other image formats(e.g. PNG) to the turtle… ↵Shin-myoung-serp2025-01-021-16/+14
| | | | | | | | (#95378) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* Fix while statements with non-bool conditions in `_pyrepl` (#127509)RUANG (James Roy)2025-01-012-2/+2
| | | Fix non-bool value conditions
* gh-128277: remove unnecessary critical section from `socket.close` (#128305)Kumar Aditya2025-01-011-0/+20
| | | Remove unnecessary critical section from `socket.close` as it now uses relaxed atomics for `sock_fd`.
* gh-121676: Raise a ``DeprecationWarning`` if the Python implementation of ↵Kirill Podoprigora2025-01-012-5/+34
| | | | | | | | | | | | | | | | | | ``functools.reduce`` is called with `function` or `sequence` as a keyword args (#121677) Python implementation of `functools` allows calling `reduce` with `function` or `sequence` as keyword args. This doesn't match behavior of our C accelerator and our documentation for `functools.reduce` states that `function`and `sequence` are positional-only arguments. Now calling a Python implementation of `functools.reduce` with `function` or `sequence` as keyword args would raise a `DeprecationWarning` and is planned to be prohibited in Python 3.16. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-88834: Unify the instance check for typing.Union and types.UnionType ↵Serhiy Storchaka2024-12-312-3/+78
| | | | | | (GH-128363) Union now uses the instance checks against its parameters instead of the subclass checks.
* gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)n-l-i2024-12-301-3/+3
| | | | | Specify timeout unit (seconds) in subprocess docstrings Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-128118: Speed up copy.copy with fast lookup for atomic and container ↵Pieter Eendebak2024-12-301-18/+9
| | | | types (#128119)
* gh-119180: Set the name of the param to __annotate__ to "format" (#124730)Jelle Zijlstra2024-12-302-2/+51
|
* GH-127381: pathlib ABCs: remove uncommon `PurePathBase` methods (#127853)Barney Gale2024-12-295-433/+365
| | | | | | | | Remove `PurePathBase.relative_to()` and `is_relative_to()` because they don't account for *other* being an entirely different kind of path, and they can't use `__eq__()` because it's not on the `PurePathBase` interface. Remove `PurePathBase.drive`, `root`, `is_absolute()` and `as_posix()`. These are all too specific to local filesystems.
* GH-127381: pathlib ABCs: remove `PathBase.stat()` (#128334)Barney Gale2024-12-294-83/+62
| | | | | | | Remove the `PathBase.stat()` method. Its use of the `os.stat_result` API, with its 10 mandatory fields and low-level types, makes it an awkward fit for virtual filesystems. We'll look to add a `PathBase.info` attribute later - see GH-125413.
* gh-123424: add `ZipInfo._for_archive` to set suitable default properties ↵Bénédikt Tran2024-12-293-29/+52
| | | | | | | (#123429) --------- Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-128192: mark new tests with skips based on hashlib algorithm availability ↵Gregory P. Smith2024-12-292-1/+19
| | | | | (gh-128324) Puts the _hashlib get_fips_mode logic check into test.support rather than spreading it out among other tests.
* gh-128192: support HTTP sha-256 digest authentication as per RFC-7617 ↵Calvin Bui2024-12-282-5/+27
| | | | | | | | | (GH-128193) support sha-256 digest authentication Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-128265: Support WASI/Emscripten on PDB tests, by removing asyncio from ↵Thomas Grainger2024-12-284-60/+70
| | | | | | | | | | | pdb tests (#128264) A part of `Lib/test/test_pdb.py` was previously unable to run on WASI/Emscripten platforms because it lacked support for `asyncio`. In fact, these tests could be rewritten without the `asyncio` framework because `test_pdb` tests the behavior of coroutines, which are not part of `asyncio`. Now reliance on the availability of `asyncio` has been removed and part of `test_pdb` that deals with coroutines working on WASI/Emscripten platforms.
* gh-127586: multiprocessing.Pool does not properly restore blocked signals ↵Stephen Hansen2024-12-272-3/+25
| | | | | | | | | | | | | | (try 2) (GH-128011) Correct pthread_sigmask in resource_tracker to restore old signals Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally cause side effects if the calling parent already had said signals blocked to begin with and did not intend to unblock them when creating a pool. Use SIG_SETMASK instead with the previous mask of blocked signals to restore the original blocked set. Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* 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-127537: Add __class_getitem__ to the python implementation of ↵CF Bolz-Tereick2024-12-272-0/+9
| | | | 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-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-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-243-4/+5
| | | | | | * 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-127847: Fix position in the special-cased zipfile seek (#127856)Dima Ryazanov2024-12-242-1/+16
| | | | | | | --------- 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-2415-55/+73
| | | Deprecate `asyncio.set_event_loop` to be removed in Python 3.16.
* gh-127949: deprecate asyncio policy classes (#128216)Kumar Aditya2024-12-247-34/+66
|
* gh-127949: fix `DeprecationWarning` in test_inspect.py (#128215)Thomas Grainger2024-12-241-15/+13
|
* 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-127949: fix resource warnings in `test_tasks.py` (#128172)Thomas Grainger2024-12-221-8/+8
|
* 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-202-6/+37
| | | | | 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-201-0/+43
| | | | ExceptionGroup split function (#128079)
* gh-127946: Use a critical section for `CFuncPtr` attributes (GH-128109)Peter Bierma2024-12-201-1/+19
|
* 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-128030: Avoid error from PyModule_GetFilenameObject for non-module (#128047)Shantanu2024-12-201-0/+23
| | | | | 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-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-194-13/+9
| | | | | | | 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.
* gh-128062: Fix the font size and shortcut display of the turtledemo menu ↵Zhikang Yan2024-12-191-10/+7
| | | | | | | | | (#128063) Leave the font of the menu bar the default to keep it consistent with the rest of the world. Display the shortcut keys in the right way, using the 'accelerator' option. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-115999: Specialize `STORE_ATTR` in free-threaded builds. (gh-127838)Neil Schemenauer2024-12-192-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `_PyDictKeys_StringLookupSplit` which does locking on dict keys and use in place of `_PyDictKeys_StringLookup`. * Change `_PyObject_TryGetInstanceAttribute` to use that function in the case of split keys. * Add `unicodekeys_lookup_split` helper which allows code sharing between `_Py_dict_lookup` and `_PyDictKeys_StringLookupSplit`. * Fix locking for `STORE_ATTR_INSTANCE_VALUE`. Create `_GUARD_TYPE_VERSION_AND_LOCK` uop so that object stays locked and `tp_version_tag` cannot change. * Pass `tp_version_tag` to `specialize_dict_access()`, ensuring the version we store on the cache is the correct one (in case of it changing during the specalize analysis). * Split `analyze_descriptor` into `analyze_descriptor_load` and `analyze_descriptor_store` since those don't share much logic. Add `descriptor_is_class` helper function. * In `specialize_dict_access`, double check `_PyObject_GetManagedDict()` in case we race and dict was materialized before the lock. * Avoid borrowed references in `_Py_Specialize_StoreAttr()`. * Use `specialize()` and `unspecialize()` helpers. * Add unit tests to ensure specializing happens as expected in FT builds. * Add unit tests to attempt to trigger data races (useful for running under TSAN). * Add `has_split_table` function to `_testinternalcapi`.
* GH-122548: Implement branch taken and not taken events for sys.monitoring ↵Mark Shannon2024-12-194-296/+362
| | | | (GH-122564)
* gh-128083: Fix macro redefinition warning in clinic. (GH-127950)Peter Bierma2024-12-191-0/+69
|