summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold ↵Irit Katriel2024-06-173-12/+47
| | | | blocks (#120425)
* gh-83754: Use the Py_TYPE() macro (#120599)Victor Stinner2024-06-176-12/+12
| | | | Don't access directly PyObject.ob_type, but use the Py_TYPE() macro instead.
* gh-120586: Fix several "unused function" warnings in `posixmodule.c` (#120588)Nikita Sobolev2024-06-171-1/+3
|
* gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 ↵Gregory P. Smith2024-06-172-1/+18
| | | | | (#120480) gh-112346: Describe the "os" byte in gzip output change.
* gh-120567: Clarify weekday return in calendar.monthrange docstring (#120570)Terry Jan Reedy2024-06-161-2/+2
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-118596: Add thread-safety clarifications to the SSLContext documentation ↵mm-matthias2024-06-161-0/+13
| | | | | | | | (#118597) Add thread-safety clarifications to the SSLContext documentation. Per the issue: This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667): > `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
* gh-120568: fix file leak in PyUnstable_CopyPerfMapFile (#120569)Carson Radtke2024-06-161-4/+4
|
* gh-120584: Fix "unused thread_critical_sections" warning in ↵Nikita Sobolev2024-06-161-1/+1
| | | | `test_critical_sections` (#120585)
* Docs: remove temporary hardcoded links (#120348)Hugo van Kemenade2024-06-161-34/+1
|
* gh-120485: Add an override of `allow_reuse_port` on classes subclassing ↵Idan Kapustian2024-06-165-2/+7
| | | | | `socketserver.TCPServer` (GH-120488) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
* gh-120579: Guard `_testcapi` import in `test_free_threading` (#120580)Nikita Sobolev2024-06-161-1/+6
|
* 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()).