summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typos in documentation and comments (#119763)Xie Yanbo2024-06-047-9/+9
|
* gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021)Victor Stinner2024-06-041-6/+6
| | | | Call _PyObject_DebugMallocStats() earlier in Py_FinalizeEx(), before the interpreter is deleted.
* gh-119613: Soft deprecate the Py_MEMCPY() macro (#120020)Victor Stinner2024-06-042-0/+3
| | | Use directly memcpy() instead.
* gh-119070: Update test_shebang_executable_extension to always use ↵Steve Dower2024-06-041-3/+3
| | | | non-installed version (GH-119846)
* gh-119879: str.find(): Utilize last character gap for two-way periodic ↵d.grigonis2024-06-042-28/+36
| | | | needles (#119880)
* gh-106531: Apply changes from importlib_resources 6.3.2 (#117054)Jason R. Coombs2024-06-0416-146/+231
| | | Apply changes from importlib_resources 6.3.2.
* gh-119724: Revert "bpo-45759: Better error messages for non-matching ↵Petr Viktorin2024-06-044-612/+455
| | | | | | 'elif'/'else' statements (#29513)" (#119974) This reverts commit 1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0.
* gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-119929)Eric Snow2024-06-0313-166/+381
| | | | | | | We make use of the same mechanism that we use for the static builtin types. This required a few tweaks. The relevant code could use some cleanup but I opted to avoid the significant churn in this change. I'll tackle that separately. This change is the final piece needed to make _datetime support multiple interpreters. I've updated the module slot accordingly.
* gh-117142: Support Importing ctypes in Isolated Interpreters (gh-119991)Eric Snow2024-06-032-1/+3
| | | | | This makes the support official. Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-117398: Add datetime Module State (gh-119810)Eric Snow2024-06-035-162/+376
| | | | | | | | | | | | I was able to make use of the existing datetime_state struct, but there was one tricky thing I had to sort out. We mostly aren't converting to heap types, so we can't use things like PyType_GetModuleByDef() to look up the module state. The solution I came up with is somewhat novel, but I consider it straightforward. Also, it shouldn't have much impact on performance. In summary, this main changes here are: * I've added some macros to help hide how various objects relate to module state * as a solution to the module state lookup problem, I've stored the last loaded module on the current interpreter's internal dict (actually a weakref) * if the static type method is used after the module has been deleted, it is reloaded * to avoid extra work when loading the module, we directly copy the objects (new refs only) from the old module state into the new state if the old module hasn't been deleted yet * during module init we set various objects on the static types' __dict__s; to simplify things, we only do that the first time; once those static types have a separate __dict__ per interpreter, we'll do it every time * we now clear the module state when the module is destroyed (before, we were leaking everything in _datetime_global_state)
* gh-117657: Fix race involving immortalizing objects (#119927)Sam Gross2024-06-039-44/+30
| | | | | | | | | The free-threaded build currently immortalizes objects that use deferred reference counting (see gh-117783). This typically happens once the first non-main thread is created, but the behavior can be suppressed for tests, in subinterpreters, or during a compile() call. This fixes a race condition involving the tracking of whether the behavior is suppressed.
* update CODEOWNERS (#120003)Irit Katriel2024-06-031-3/+1
|
* gh-117657: Avoid `sem_clockwait` in TSAN (#119915)Sam Gross2024-06-032-10/+1
| | | | The `sem_clockwait` function is not currently instrumented, which leads to false positives.
* gh-118835: pyrepl: Fix prompt length computation for custom prompts ↵Daniel Hollas2024-06-033-2/+41
| | | | containing ANSI escape codes (#119942)
* gh-119727: Add --single-process option to regrtest (#119728)Victor Stinner2024-06-035-12/+46
|
* gh-119057: Use better error messages for zero division (#119066)Nikita Sobolev2024-06-0311-20/+32
|
* gh-119981: Use do while(0) in some symtable.c multi-line macros (#119982)Bénédikt Tran2024-06-031-45/+52
|
* Use Cirrus M1 macOS runners for CI (GH-119979)Łukasz Langa2024-06-033-6/+7
| | | Co-authored-by: Ee Durbin <ee@python.org>
* gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (#119591)Jason R. Coombs2024-06-034-12/+32
|
* gh-119679: Ensures correct import libraries are included in Windows install ↵Steve Dower2024-06-033-14/+23
| | | | packages (GH-119790)
* gh-102511: Amend 3.13.0b1.rst (GH-119895)Nice Zombies2024-06-031-0/+1
|
* gh-116560: Add PyLong_GetSign() public function (#116561)Sergey B Kirpichev2024-06-037-3/+66
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-119786: move exception handling doc to InternalDocs (#119815)Irit Katriel2024-06-033-182/+205
|
* gh-119968: Improved monitoring c-api docs (#119969)Awbert2024-06-031-1/+1
|
* gh-119838: Treat Fraction as a real value in mixed arithmetic operations ↵Serhiy Storchaka2024-06-033-6/+6
| | | | with complex (GH-119839)
* gh-112026: Deprecate _PyDict_GetItemStringWithError() function (#119855)Victor Stinner2024-06-031-1/+2
|
* gh-119856: Support exiting help() with just "exit" (#119858)Victor Stinner2024-06-031-2/+2
|
* gh-116991: Improve `pygen --help` for `python` subparser (#116992)Nikita Sobolev2024-06-031-1/+4
|
* gh-118827: Remove `Quoter` from `urllib.parse` (#118828)Nikita Sobolev2024-06-034-15/+10
| | | | Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-119506: fix `_io.TextIOWrapper.write()` write during flush (#119507)Radislav Chugunov2024-06-033-9/+45
| | | Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* gh-119396: Optimize unicode_decode_utf8_writer() (#119957)Victor Stinner2024-06-031-5/+4
| | | | | | Optimize unicode_decode_utf8_writer() Take the ascii_decode() fast-path even if dest is not aligned on size_t bytes.
* gh-119961: Fix test workflow status badge in README (#119962)wookie1842024-06-031-1/+1
| | | | Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-117657: Fix data races report by TSAN unicode-hash (gh-119907)Donghee Na2024-06-032-9/+11
|
* gh-109975: What's New in Python 3.13: fix broken link for `telnetlib` ↵Solomon Himelbloom2024-06-031-1/+1
| | | | alternative (#119958)
* GH-119054: Add "Reading and writing files" section to pathlib docs (#119524)Barney Gale2024-06-021-79/+84
| | | | Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`, `write_text()` and `write_bytes()`.
* Improve documentation for typing.get_type_hints (#119928)Jelle Zijlstra2024-06-021-26/+28
| | | | | | | | | | | | - Explicit list of what it does that is different from "just return __annotations__" - Remove reference to PEP 563; adding the future import doesn't do anything to type aliases, and in general it will never make get_type_hints() less likely to fail. - Remove example, as the Annotated docs already have a similar example, and it's unbalanced to have one example about this one edge case but not about other behaviors of the function. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. (#119921)Sam Gross2024-06-022-2/+2
| | | | The GIL may be disabled concurrently with this call so we need to use a relaxed atomic load.
* gh-119740: Remove deprecated trunc delegation (#119743)Mark Dickinson2024-06-0211-152/+16
| | | | | | | | Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`. --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-119775: Remove ability to create immutable types with mutable bases (#119776)Nikita Sobolev2024-06-024-35/+13
|
* gh-118934: Fix PyEval_GetLocals docs (PEP 667) (#119932)Alyssa Coghlan2024-06-023-21/+46
| | | | | | | | | | | | | PEP 667's description of the planned changes to PyEval_GetLocals was internally inconsistent when accepted, so the docs added for gh-74929 didn't match either the current behaviour or the intended behaviour once gh-118934 is fixed. This PR updates the documentation and 3.13 What's New to match the intended behaviour (once gh-118934 is fixed). It also tidies up lingering references to `f_locals` always being a dictionary (this hasn't been true since at least when custom namespace support for class statement execution was added)
* Refactor (mostly rearrange) the statistics module (gh-119930)Raymond Hettinger2024-06-022-735/+783
|
* gh-119016: Remove outdated sentences from the "classes" tutorial (#119130)Nice Zombies2024-06-011-5/+1
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (#119808)Barney Gale2024-06-013-97/+68
| | | | | Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. `shutil._rmtree_unsafe()` was fixed in a150679f90.
* Add unique() recipe to itertools docs (gh-119911)Raymond Hettinger2024-06-011-2/+14
|
* gh-117657: Add TSAN suppression for `set_discard_entry` (#119908)Sam Gross2024-06-011-0/+2
| | | Seen in CI occasionally when running `test_weakref`.
* gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ensure ↵Kirill Podoprigora2024-06-013-2/+12
| | | | that the given socket is in non-blocking mode (#119519)
* Minor speed/accuracy improvement for kde() (gh-119910)Raymond Hettinger2024-06-012-9/+10
|
* gh-117657: Fix TSAN race in QSBR assertion (#119887)Sam Gross2024-06-012-3/+2
| | | | Due to a limitation in TSAN, all reads from `PyThreadState.state` must be atomic to avoid reported races.
* gh-117657: Fix TSAN race in free-threaded GC (#119883)Sam Gross2024-06-012-6/+2
| | | | | Only call `gc_restore_tid()` from stop-the-world contexts. `worklist_pop()` can be called while other threads are running, so use a relaxed atomic to modify `ob_tid`.
* Bump types-psutil from 5.9.5.20240423 to 5.9.5.20240516 in /Tools (#119900)dependabot[bot]2024-06-011-1/+1
|