summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-120360: Add self as IDLE doc owner (#120571)Terry Jan Reedy2024-06-161-0/+1
| | | Add self as IDLE doc owner
* gh-120572: add missing parentheses in TypeIs documentation (#120573)Nyuan Zhang2024-06-161-2/+2
|
* gh-112346: Always set OS byte to 255, simpler gzip.compress function. ↵Ruben Vorderman2024-06-154-34/+26
| | | | | (GH-120486) This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0. this keeps things consistent.
* gh-120541: Improve the "less" prompt in pydoc (GH-120543)Serhiy Storchaka2024-06-153-14/+59
| | | | | When help() is called with non-string argument, use __qualname__ or __name__ if available, otherwise use "{typename} object".
* annotations: expand documentation on "simple" assignment targets (#120535)Jelle Zijlstra2024-06-152-5/+12
| | | | | This behavior is rather surprising and it was not clearly specified. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-117657: Make PyType_HasFeature (exported version) atomic (#120484)Ken Jin2024-06-152-2/+6
| | | Make PyType_HasFeature (exported version) atomic
* Add some more edge-case tests for `inspect.get_annotations` with ↵Alex Waygood2024-06-152-11/+36
| | | | `eval_str=True` (#120550)
* gh-120495: Fix incorrect exception handling in Tab Nanny (#120498)Wulian2332024-06-154-5/+7
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-120544: Add `else: fail()` to tests where exception is expected (#120545)Nikita Sobolev2024-06-152-0/+12
|
* gh-120526: Correct signature of map() builtin (GH-120528)Adam Williamson2024-06-151-1/+1
| | | | | map() requires at least one iterable arg. Signed-off-by: Adam Williamson <awilliam@redhat.com>
* gh-117398: Use the correct module loader for iOS in datetime CAPI test. ↵Russell Keith-Magee2024-06-151-1/+8
| | | | | (#120477) Use the correct loader for iOS.
* gh-119819: Conditional skip of logging tests that require multiprocessing ↵Russell Keith-Magee2024-06-151-3/+2
| | | | | subprocess support (#120476) Skip tests that require multiprocessing subprocess support.
* gh-120524: Temporarily Skip test_create_many_threaded In ↵Eric Snow2024-06-141-0/+1
| | | | test_interpreters.test_stress (gh-120525)
* gh-120161: Fix a Crash in the _datetime Module (gh-120182)Eric Snow2024-06-146-71/+133
| | | | | | | In gh-120009 I used an atexit hook to finalize the _datetime module's static types at interpreter shutdown. However, atexit hooks are executed very early in finalization, which is a problem in the few cases where a subclass of one of those static types is still alive until the final GC collection. The static builtin types don't have this probably because they are finalized toward the end, after the final GC collection. To avoid the problem for _datetime, I have applied a similar approach here. Also, credit goes to @mgorny and @neonene for the new tests. FYI, I would have liked to take a slightly cleaner approach with managed static types, but wanted to get a smaller fix in first for the sake of backporting. I'll circle back to the cleaner approach with a future change on the main branch.
* gh-120417: Fix "imported but unused" linter warnings (#120461)Victor Stinner2024-06-147-8/+84
| | | | | | | | | | | Add __all__ to the following modules: importlib.machinery, importlib.util and xml.sax. Add also "# noqa: F401" in collections.abc, subprocess and xml.sax. * Sort __all__; remove collections.abc.__all__; remove private names * Add tests
* gh-119824: Print stack entry when user input is needed (#119882)Tian Gao2024-06-144-21/+90
| | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-120361: Add `nonmember` test with enum flags inside to `test_enum` ↵Nikita Sobolev2024-06-142-1/+22
| | | | | (GH-120364) * gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
* GH-73991: Add `pathlib.Path.copy()` (#119058)Barney Gale2024-06-147-2/+271
| | | | | | | | | | | | | | | Add a `Path.copy()` method that copies the content of one file to another. This method is similar to `shutil.copyfile()` but differs in the following ways: - Uses `fcntl.FICLONE` where available (see GH-81338) - Uses `os.copy_file_range` where available (see GH-81340) - Uses `_winapi.CopyFile2` where available, even though this copies more metadata than the other implementations. This makes `WindowsPath.copy()` more similar to `shutil.copy2()`. The method is presently _less_ specified than the `shutil` functions to allow OS-specific optimizations that might copy more or less metadata. Incorporates code from GH-81338 and GH-93152. Co-authored-by: Eryk Sun <eryksun@gmail.com>
* gh-117657: Add TSAN suppression for set_default_allocator_unlocked (#120500)AN Long2024-06-141-0/+2
| | | Add TSAN suppression for set_default_allocator_unlocked
* Update tests for the itertools docs rough equivalents (#120509)Raymond Hettinger2024-06-141-18/+315
|
* Stronger tests for the statistics kernel formulas (gh-120506)Raymond Hettinger2024-06-141-3/+7
|
* gh-114053: Fix bad interaction of PEP 695, PEP 563 and ↵Alex Waygood2024-06-134-1/+186
| | | | `inspect.get_annotations` (#120270)
* GH-119054: Add "Renaming and deleting" section to pathlib docs. (#120465)Barney Gale2024-06-131-60/+64
| | | | Add dedicated subsection for `pathlib.Path.rename()`, `replace()`, `unlink()` and `rmdir()`.
* gh-120012: clarify the behaviour of `multiprocessing.Queue.empty` on closed ↵Bénédikt Tran2024-06-133-0/+33
| | | | | | | | queues. (GH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Add codeowner for Makefile.pre.in and Modules/Setup* (#120468)Erlend E. Aasland2024-06-131-0/+2
|
* gh-117398: Add datetime C-API type check test for subinterpreters (gh-119604)neonene2024-06-133-4/+87
| | | Check if the DateTime C-API type matches the datetime.date type on main and shared/isolated subinterpreters.
* GH-119054: Add "Creating files and directories" section to pathlib docs. ↵Barney Gale2024-06-131-79/+86
| | | | | | | | | (#120186) Add dedicated subsection for `pathlib.Path.touch()`, `mkdir()`, `symlink_to()` and `hardlink_to()`. Also note that `open()`, `write_text()` and `write_bytes()` are often used to create files. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-120397: Fix typo in NEWS entry (#120455)Kirill Podoprigora2024-06-131-1/+1
|
* gh-120397: Optimize str.count() for single characters (#120398)Ruben Vorderman2024-06-132-0/+21
|
* gh-120417: Add #noqa to used imports in the stdlib (#120421)Victor Stinner2024-06-1325-36/+40
| | | | | Tools such as ruff can ignore "imported but unused" warnings if a line ends with "# noqa: F401". It avoids the temptation to remove an import which is used effectively.
* gh-119146: Update ``regexp`` in `build.yml` to not trigger the jobs on ↵Kirill Podoprigora2024-06-131-1/+1
| | | | | | `*.md` and `*.ini` files. (#120435) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Fix typos in documentation (GH-120440)Xie Yanbo2024-06-132-2/+2
|
* gh-117657: Fix some simple races in instrumentation.c (GH-120118)Ken Jin2024-06-131-2/+2
| | | * stop the world when setting local events
* gh-117657: Make PyType_HasFeature atomic (GH-120210)Ken Jin2024-06-133-2/+4
| | | Make PyType_HasFeature atomic
* gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (#120419)Stefano Rivera2024-06-121-3/+4
| | | | | | | | Remove wheeldata from both sides of the `assertEqual`, so that we're *actually* ignoring it from the test set. This test is only making assertions about the source tree, no code is being executed that would do anything different based on the value of `WHEEL_PKG_DIR`.
* gh-118908: Protect the REPL subprocess with a timeout in tests (#120408)Pablo Galindo Salgado2024-06-121-1/+6
|
* gh-120417: Remove unused imports in the stdlib (#120420)Victor Stinner2024-06-1211-14/+5
|
* gh-120343: Fix column offsets of multiline tokens in tokenize (#120391)Lysandros Nikolaou2024-06-122-4/+24
|
* gh-71587: Drop local reference cache to `_strptime` module in `_datetime` ↵neonene2024-06-128-8/+24
| | | | | (gh-120224) The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).
* gh-120388: Improve deprecation warning message, when test returns non-None ↵Nikita Sobolev2024-06-125-6/+44
| | | | | | (#120401) Co-authored-by: Alex Waygood <alex.waygood@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-120345: Fix incorrect use of the :class: role with the "()" suffix ↵Serhiy Storchaka2024-06-127-9/+9
| | | | | | | (GH-120347) * Remove "()" when refer to a class as a type. * Use :func: when refer to a callable. * Fix reference to the datetime.astimezone() method.
* gh-120155: Add assertion to sre.c match_getindex() (#120402)Victor Stinner2024-06-121-0/+2
| | | | Add an assertion to help static analyzers to detect that i*2 cannot overflow.
* gh-120400 :Support Linux perf profile to see Python calls on RISC-V ↵ixgbe002024-06-125-0/+13
| | | | | architecture (#120089) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* gh-120029: remove unused macros in ``symtable.c`` (#120222)Bénédikt Tran2024-06-123-6/+0
| | | | Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165)Ken Jin2024-06-125-4/+45
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
* Fix typos in documentation (#120338)Xie Yanbo2024-06-124-6/+6
|
* gh-93691: fix too broad source locations of for statement iterators (#120330)Irit Katriel2024-06-126-8/+63
|
* gh-120029: make `symtable.Symbol.__repr__` correctly reflect the compiler's ↵Bénédikt Tran2024-06-127-6/+100
| | | | | | | | | | flags, add methods (#120099) Expose :class:`symtable.Symbol` methods :meth:`~symtable.Symbol.is_free_class`, :meth:`~symtable.Symbol.is_comp_iter` and :meth:`~symtable.Symbol.is_comp_cell`. --------- Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-101575: document Decimal.__round__() (GH-101737)Owain Davies2024-06-121-0/+42
|
* gh-118908: Fix completions after namespace change in REPL (#120370)Lysandros Nikolaou2024-06-122-5/+12
|