summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* GH-126205: Fix conversion of UNC paths to file URIs (#126208)Barney Gale2024-10-302-13/+8
| | | 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-301-8/+17
| | | | | | | | | | | | | | | 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-60712: Include the "object" type in the lists of documented types (GH-103036)Furkan Onder2024-10-301-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add test for the predefined object's attributes * Include the "object" type in the lists of documented types * remove 'or' from augment tuple * 📜🤖 Added by blurb_it. * Add cross-reference to news Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Fix format for the function parameter Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Add space Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * add reference for the 'object' Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * add reference for NotImplemented Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Change ref:`string <textseq>` as class:`str` Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * remove hyphen from `newly-created` * Update Doc/reference/datamodel.rst 'dictionaries' to 'dict' Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Update predefined attribute types in testPredefinedAttrs * Change `universal type` as `top type` * Don't mention about the top type * Update the description of richcmpfuncs * Update Doc/library/stdtypes.rst Co-authored-by: Éric <merwok@netwok.org> * Revert: Hierarchy Section in Data Model Documentation * Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity. * Update Doc/reference/datamodel.rst Co-authored-by: Éric <merwok@netwok.org> * Remove blank line Co-authored-by: Éric <merwok@netwok.org> * Use ref:`str <textseq>` instead of :class:`str Co-authored-by: Éric <merwok@netwok.org> * Revert changes the description of Other Built-in Types in stdtypes.rst * Update Doc/reference/datamodel.rst Co-authored-by: Éric <merwok@netwok.org> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-126068: Fix exceptions in the argparse module (GH-126069)Serhiy Storchaka2024-10-303-58/+67
| | | | | | | | * Only error messages for ArgumentError and ArgumentTypeError are now translated. * ArgumentError is now only used for command line errors, not for logical errors in the program. * TypeError is now raised instead of ValueError for some logical errors.
* gh-126072: do not add `None` to `co_consts` if there is no docstring (GH-126101)Xuanteng Huang2024-10-307-51/+111
|
* gh-126139: Improve error message location for future statement with unknown ↵Brian Schubert2024-10-292-6/+6
| | | | feature (#126140)
* gh-125588: Teach the python PEG generator the new f-string tokens (#125589)Pablo Galindo Salgado2024-10-291-0/+8
| | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* gh-126146: Remove ``__cmp__`` method from tests (#126147)Kirill Podoprigora2024-10-292-8/+0
| | | Remove ``__cmp__`` method from the tests because it was removed in 3.0 version.
* GH-125866: Improve tests for `pathname2url()` and `url2pathname()` (#125993)Barney Gale2024-10-291-86/+77
| | | | | | | Merge `URL2PathNameTests` and `PathName2URLTests` test cases (which test only the Windows-specific implementations from `nturl2path`) into the main `Pathname_Tests` test case for these functions. Copy/port some test cases for `pathlib.Path.as_uri()` and `from_uri()`.
* gh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)Christian Ullrich2024-10-291-0/+21
|
* gh-118423: Add `INSTRUCTION_SIZE` macro to code generator (GH-125467)Tomas R.2024-10-291-0/+31
|
* gh-126105: Fix crash in `ast` module, when `._fields` is deleted (#126115)sobolevn2024-10-291-0/+17
| | | | Previously, if the `ast.AST._fields` attribute was deleted, attempts to create a new `as`t node would crash due to the assumption that `_fields` always had a non-NULL value. Now it has been fixed by adding an extra check to ensure that `_fields` does not have a NULL value (this can happen when you manually remove `_fields` attribute).
* GH-125837: Split `LOAD_CONST` into three. (GH-125972)Mark Shannon2024-10-2912-256/+315
| | | | | | | | * Add LOAD_CONST_IMMORTAL opcode * Add LOAD_SMALL_INT opcode * Remove RETURN_CONST opcode
* tomllib: Add a comment about implicit lru_cache bound (GH-126078)Taneli Hukkinen2024-10-291-0/+3
|
* Align functools.reduce() docstring with PEP-257 (#126045)Sergey B Kirpichev2024-10-291-6/+8
| | | Yak-shave in preparation for Argument Clinic adaption in gh-125999.
* gh-126014: Ignore `__pycache__`-only folders in makefile tests (#126066)sobolevn2024-10-291-1/+4
| | | Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* gh-124295: Skip translation tests when pygettext is missing (GH-126051)Tomas R.2024-10-271-0/+2
|
* gh-125966: fix use-after-free on `fut->fut_callback0` due to an evil ↵Bénédikt Tran2024-10-271-0/+18
| | | | callback's `__eq__` in asyncio (#125967)
* gh-124295: Add translation tests for argparse (GH-124803)Tomas R.2024-10-272-0/+99
|
* gh-125984: fix use-after-free on `fut->fut_{callback,context}0` due to an ↵Bénédikt Tran2024-10-271-2/+71
| | | | evil `loop.__getattribute__` (#126003)
* gh-126018: Avoid aborting due to unnecessary assert in `sys.audit` (#126020)devdanzin2024-10-272-0/+18
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-126012: Add `__class_getitem__` to `memoryview` (#126013)Brian Schubert2024-10-271-1/+1
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-125633: Add function `ispackage` to stdlib `inspect` (#125634)Zhikang Yan2024-10-272-6/+24
| | | | | --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* Android: Update tests for newly-available functions affected by SELinux ↵Malcolm Smith2024-10-273-2/+25
| | | | | (#126015) Skip tests on Android that involve use of SELinux-protected methods.
* gh-125666: Avoid PyREPL exiting when a null byte is in input (#125732)devdanzin2024-10-273-1/+16
|
* gh-125593: Use colors to highlight error locations in tracebacks from ↵Bogdan Romanyuk2024-10-272-1/+44
| | | | exception group (#125681)
* gh-125969: fix OOB in `future_schedule_callbacks` due to an evil `call_soon` ↵Bénédikt Tran2024-10-251-0/+33
| | | | | (#125970) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* gh-125783: Add tests to prevent regressions with the combination of `ctypes` ↵Jun Komoda2024-10-251-0/+87
| | | | and metaclasses. (GH-125881)
* GH-125789: fix `fut._callbacks` to always return a copy of callbacks (#125922)Kumar Aditya2024-10-251-0/+18
| | | Fix `asyncio.Future._callbacks` to always return a copy of the internal list of callbacks to avoid mutation from user code affecting the internal state.
* gh-121654: Add PyType_Freeze() function (#122457)Victor Stinner2024-10-252-0/+67
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-123930: Correct test of attribute failure to account for iOS (#125959)Russell Keith-Magee2024-10-251-2/+6
| | | Update a test of importing attributes from binary modules to account for iOS conditions.
* Fixed a few type mismatches in pdb (#125952)Tian Gao2024-10-251-4/+4
|
* Increase minimum Android API level to 24 (#125946)Malcolm Smith2024-10-251-4/+0
| | | | Minimum Android API level has been increased to 24 (Android 7.0).
* gh-125942: Android: set stdout to `errors="backslashreplace"` (#125943)Malcolm Smith2024-10-252-8/+8
| | | Android stdout/err streams now use `backslashreplace` encoding to ensure readability of the Android log.
* gh-125245: Fix race condition when importing `collections.abc` (#125415)Sam Gross2024-10-242-3/+3
| | | | | | If multiple threads concurrently imported `collections.abc`, some of the threads might incorrectly see the "shim" `Lib/collections/abc.py` module instead of the correct `Lib/_collections_abc.py` module. This affected both the free threading build and the default GIL-enabled build.
* gh-125900: Clean-up logic around immortalization in free-threading (#125901)Sam Gross2024-10-2418-82/+14
| | | | | | | | | * Remove `@suppress_immortalization` decorator * Make suppression flag per-thread instead of per-interpreter * Suppress immortalization in `eval()` to avoid refleaks in three tests (test_datetime.test_roundtrip, test_logging.test_config8_ok, and test_random.test_after_fork). * frozenset() is constant, but not a singleton. When run multiple times, the test could fail due to constant interning.
* gh-123930: Better error for "from imports" when script shadows module (#123929)Shantanu2024-10-241-110/+215
|
* gh-118950: Fix SSLProtocol.connection_lost not being called when OSError is ↵Javad Shafique2024-10-242-1/+52
| | | | | | | thrown (#118960) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-125864: Propagate `pickle.loads()` failures in `InterpreterPoolExecutor` ↵Peter Bierma2024-10-242-1/+20
| | | | | (gh-125898) Authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-125842: Fix `sys.exit(0xffff_ffff)` on Windows (#125896)Sam Gross2024-10-241-0/+14
| | | | | | | | | | On Windows, `long` is a signed 32-bit integer so it can't represent `0xffff_ffff` without overflow. Windows exit codes are unsigned 32-bit integers, so if a child process exits with `-1`, it will be represented as `0xffff_ffff`. Also fix a number of other possible cases where `_Py_HandleSystemExit` could return with an exception set, leading to a `SystemError` (or fatal error in debug builds) later on during shutdown.
* gh-125859: Fix crash when `gc.get_objects` is called during GC (#125882)Sam Gross2024-10-242-0/+84
| | | | | | | | | This fixes a crash when `gc.get_objects()` or `gc.get_referrers()` is called during a GC in the free threading build. Switch to `_PyObjectStack` to avoid corrupting the `struct worklist` linked list maintained by the GC. Also, don't return objects that are frozen (`gc.freeze()`) or in the process of being collected to more closely match the behavior of the default build.
* GH-125868: Fix STORE_ATTR_WITH_HINT specialization (GH-125876)Mark Shannon2024-10-242-1/+47
|
* gh-125614: annotationlib: Fix bug where not all Stringifiers are converted ↵Jelle Zijlstra2024-10-232-4/+70
| | | | (#125635)
* gh-125884: Support breakpoint on functions with annotations (#125892)Tian Gao2024-10-232-2/+41
|
* gh-121938: ctypes: Skip test of _pack_-ed struct with c_int64 on x86 (GH-125877)Petr Viktorin2024-10-231-0/+14
| | | | The current auto-generated tests don't cover this; it's instead tested manually.
* gh-125665: Update turtledemo docstrings with correct file names (#125691)Wulian2024-10-2319-83/+32
| | | | Co-authored-by: Wulian <xiguawulian@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-58032: Deprecate the argparse.FileType type converter (GH-124664)Serhiy Storchaka2024-10-232-26/+49
|
* gh-80958: unittest: discovery support for namespace packages as start ↵Jacob Walls2024-10-238-16/+117
| | | | directory (#123820)
* gh-125259: Fix error notes removal in enum initialization (GH-125647)Mario Šaško2024-10-222-11/+24
|
* gh-125710: [Enum] fix hashable<->nonhashable comparisons for member values ↵Ethan Furman2024-10-222-6/+27
| | | | (GH-125735)