summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-111964: Implement stop-the-world pauses (gh-112471)Sam Gross2024-01-2310-29/+336
| | | | | | | | | | | | | | | | | The `--disable-gil` builds occasionally need to pause all but one thread. Some examples include: * Cyclic garbage collection, where this is often called a "stop the world event" * Before calling `fork()`, to ensure a consistent state for internal data structures * During interpreter shutdown, to ensure that daemon threads aren't accessing Python objects This adds the following functions to implement global and per-interpreter pauses: * `_PyEval_StopTheWorldAll()` and `_PyEval_StartTheWorldAll()` (for the global runtime) * `_PyEval_StopTheWorld()` and `_PyEval_StartTheWorld()` (per-interpreter) (The function names may change.) These functions are no-ops outside of the `--disable-gil` build.
* gh-112984: Fix link error on free-threaded Windows build (GH-114455)Sam Gross2024-01-231-0/+3
| | | | | | The test_peg_generator test tried to link the python313_d.lib library, which failed because the library is now named python313t_d.lib. The underlying problem is that the "compiler" attribute was not set when we call get_libraries() from distutils.
* gh-108303: Move `.whl` test files to `Lib/test/wheeldata/` (#114343)Nikita Sobolev2024-01-234-1/+4
|
* Docs: mark up FTP.connect() and FTP.login() with param lists (#114395)Erlend E. Aasland2024-01-231-33/+70
| | | | | | Use rst substitutions to reduce raw text duplication. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Docs: mark up FTP.retrbinary and FTP.storbinary with param lists (#114399)Erlend E. Aasland2024-01-232-17/+46
| | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-114423: Remove DummyThread from threading._active when thread dies ↵Fabio Zadrozny2024-01-233-28/+76
| | | | (GH-114424)
* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` (#114425)Nikita Sobolev2024-01-232-14/+48
| | | | | * gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` * Remove `/` from signatures
* gh-113317: Don't use global clinic instance in bad_argument() (#114330)Erlend E. Aasland2024-01-231-12/+11
| | | | | | | Make it possible for a converter to have multiple includes, by collecting them in a list on the converter instance. This implies converter includes are added during template generation, so we have to add them to the clinic instance at the end of the template generation instead of in the beginning.
* gh-89427: Provide the original prompt value for VIRTUAL_ENV_PROMPT (GH-106726)Jim Porter2024-01-236-10/+9
| | | | | | | | | | This improves the implementation in gh-106643. Previously, venv passed "(<prompt>) " to the activation scripts, but we want to provide the original value so that users can inspect it in the $VIRTUAL_ENV_PROMPT env var. Note: Lib/venv/scripts/common/Activate.ps1 surrounded the prompt value with parens a second time, so no change was necessary in that file.
* GH-105900: Fix `pathlib.Path.symlink_to(target_is_directory=...)` docs (#114035)Barney Gale2024-01-231-3/+7
| | | | Clarify that *target_is_directory* only matters if the target doesn't exist.
* GH-82695: Clarify `pathlib.Path.mkdir()` documentation (#114032)Barney Gale2024-01-231-3/+3
| | | | | | Remove a double negative in the documentation of `mkdir()`'s *exist_ok* parameter. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* GH-99334: Explain that `PurePath.is_relative_to()` is purely lexical. (#114031)Barney Gale2024-01-231-0/+7
|
* gh-66944: Note that the `contextlib.closing` example is for illustrative ↵Ville Skyttä2024-01-231-0/+8
| | | | | purposes (#112198) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Docs: minor amendments to runpy.rst (#18416)Géry Ogam2024-01-231-20/+20
| | | | | - Add missing single quote in inline code - Align parameter formatting with style guide recommendations - Fix punctuation around parenthesised sentence
* Add me to codeowners for hashlib & multiprocessing (#114454)Gregory P. Smith2024-01-221-7/+10
| | | | | I already effectively own these. (multiprocessing reluctantly, but I've spent enough time in the code of late, it is important, and and championing some changes, so I may as well be looped in there).
* Docs: align usage of versionadded/versionchanged with recommended practice ↵Erlend E. Aasland2024-01-2228-173/+172
| | | | | | (#114409) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-113655: Revert extra stack reserve in PGO builds unless ↵Steve Dower2024-01-222-2/+2
| | | | UseExtraStackReserve=true (GH-114263)
* gh-112532: Improve mimalloc page visiting (#114133)Sam Gross2024-01-223-34/+134
| | | | | | | | | | | | | | | This adds support for visiting abandoned pages in mimalloc and improves the performance of the page visiting code. Abandoned pages contain memory blocks from threads that have exited. At some point, they may be later reclaimed by other threads. We still need to visit those pages in the free-threaded GC because they contain live objects. This also reduces the overhead of visiting mimalloc pages: * Special cases for full, empty, and pages containing only a single block. * Fix free_map to use one bit instead of one byte per block. * Use fast integer division by a constant algorithm when computing block offset from block size and index.
* GH-114448: Don't sort summarize_stats.py histograms by amount of change ↵Michael Droettboom2024-01-221-4/+7
| | | | (GH-114449)
* Fix `wasi.py build` after adding the `clean` subcommand. ({GH-114447)Brett Cannon2024-01-221-1/+2
|
* gh-114257: Ignore the FileNotFound error in ctypes.util._is_elf() (GH-114394)AN Long2024-01-223-2/+10
|
* gh-114083: apply optimization of LOAD_CONST instructions to the whole CFG ↵Irit Katriel2024-01-223-143/+191
| | | | before optimize_basic_block. (#114408)
* gh-75128: Ignore EADDRNOTAVAIL error in ↵Serhiy Storchaka2024-01-222-3/+19
| | | | | asyncio.BaseEventLoop.create_server() (GH-114420) Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* gh-101100: Fix Sphinx warnings in `reference/expressions.rst` (#114194)Hugo van Kemenade2024-01-222-27/+26
|
* gh-114321: Expose more constants in the fcntl module (GH-114322)Serhiy Storchaka2024-01-223-10/+86
|
* Docs: Fix typo in code snippet (GH-114421)Kirill Podoprigora2024-01-221-1/+1
|
* gh-108303: Remove `Lib/test/shadowed_super.py` (#114372)Nikita Sobolev2024-01-222-8/+15
| | | Move code into Lib/test/test_super.py.
* gh-102512: Turn _DummyThread into _MainThread after os.fork() called from a ↵Serhiy Storchaka2024-01-223-9/+101
| | | | | | | | | | | | | | | | | foreign thread (GH-113261) Always set a _MainThread as a main thread after os.fork() is called from a thread started not by the threading module. A new _MainThread was already set as a new main thread after fork if threading.current_thread() was not called for a foreign thread before fork. Now, if it was called before fork, the implicitly created _DummyThread will be turned into _MainThread after fork. It fixes, in particularly, an incompatibility of _DummyThread with the threading shutdown logic which relies on the main thread having tstate_lock. Co-authored-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
* gh-103092: Ensure `_ctypes.c` static types are accessed via global state ↵neonene2024-01-226-106/+172
| | | | (#113857)
* gh-108303: Move `smtpd` to `test.support` (#114368)Nikita Sobolev2024-01-223-5/+2
| | | Update test_logging.py and test_smtplib.py.
* gh-113796: Add more validation checks in the csv.Dialect constructor (GH-113797)Serhiy Storchaka2024-01-223-13/+96
| | | ValueError is now raised if the same character is used in different roles.
* gh-113102: Fix typo in INSTRUMENTED_RESUME (GH-114349)Guido van Rossum2024-01-222-2/+2
|
* gh-114414: Assert PyType_GetModuleByDef result in _threadmodule (#114415)Nikita Sobolev2024-01-221-0/+3
|
* gh-114115: Update documentation of array.array (GH-114117)Serhiy Storchaka2024-01-221-19/+25
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-114328: tty cbreak mode should not alter ICRNL (#114335)Gregory P. Smith2024-01-214-4/+30
| | | The terminal CR -> NL mapping setting should be inherited in cbreak mode as OSes do not specify altering it as part of their stty cbreak mode definition.
* gh-111803: Make test_deep_nesting from test_plistlib more strict (GH-114026)Serhiy Storchaka2024-01-211-2/+2
| | | | | It is no longer silently passed if RecursionError was raised for low recursion depth.
* gh-114241: Fix and improve the ftplib CLI (GH-114242)Serhiy Storchaka2024-01-211-10/+17
| | | | | | | * Fix writing the retrieved binary file to stdout. * Add a newline after writing warnings to stderr. * Fix a TypeError if the netrc file doesn't contain a host/default entry. * Improve the usage message.
* Docs: align sqlite3 docs with versionadded/versionchanged recommendations ↵Erlend E. Aasland2024-01-211-12/+12
| | | | | | (#114400) When a parameter is added to a function or method, use the 'versionchanged' directive, not 'versionadded'.
* Docs: link to sys.stdout in ftplib docs (#114396)Erlend E. Aasland2024-01-211-2/+2
|
* gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect ↵Nikita Sobolev2024-01-212-2/+2
| | | | implementation (#114385)
* Docs: mark up FTP() constructor with param list (#114359)Erlend E. Aasland2024-01-211-11/+37
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-80931: Skip some socket tests while hunting for refleaks on macOS (#114057)Ronald Oussoren2024-01-213-1/+64
| | | | | Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems.
* gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` (#114373)Nikita Sobolev2024-01-212-3/+2
|
* Docs: mark up the FTP debug levels as a list (#114360)Erlend E. Aasland2024-01-211-6/+9
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Fix the confusing "User-defined methods" reference in the datamodel (#114276)cdzhan2024-01-211-1/+1
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* Remove deleted `time_hashlib.py` from `Lib/test/.ruff.toml` (#114355)Hugo van Kemenade2024-01-201-1/+0
|
* Remove the non-test Lib/test/time_hashlib.py. (#114354)Gregory P. Smith2024-01-201-88/+0
| | | | | I believe I added this while chasing some performance of hash functions when I first created hashlib. It hasn't been used since, is frankly trivial, and not a test.
* Docs: Add missing line continuation to FTP_TLS class docs (#114352)Erlend E. Aasland2024-01-201-1/+1
| | | Regression introduced by b1ad5a5d4.
* gh-114281: Remove incorrect type hints from `asyncio.staggered` (#114282)Nikita Sobolev2024-01-202-11/+4
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157)Sam Gross2024-01-206-7/+85
| | | | | | | | | | * gh-112529: Use GC heaps for GC allocations in free-threaded builds The free-threaded build's garbage collector implementation will need to find GC objects by traversing mimalloc heaps. This hooks up the allocation calls with the correct heaps by using a thread-local "current_obj_heap" variable. * Refactor out setting heap based on type