summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix negative bandwidth test and add online code path test. (gh-118600)Raymond Hettinger2024-05-052-9/+24
|
* gh-74929: Rudimentary docs for PEP 667 (#118581)Guido van Rossum2024-05-054-3/+22
| | | | | | | | | This is *not* sufficient for the final 3.13 release, but it will do for beta 1: - What's new entry - Updated changelog entry (news blurb) - Mention the proxy for f_globals in the datamodel and Python frame object docs This doesn't have any C API details (what's new refers to the PEP).
* GH-111744: Make breakpoint() enter the debugger immediately (GH-118579)Tian Gao2024-05-058-68/+162
|
* gh-101137: Add `text/x-rst` to `mimetypes` (#118593)Nikita Sobolev2024-05-053-0/+3
|
* gh-83505: Add markdown mimetype mapping (#17995)Ryan Batchelder2024-05-052-0/+3
|
* gh-118518: Use the raw syscall directly for gettid (#118592)Pablo Galindo Salgado2024-05-051-1/+2
|
* gh-110850: Remove _PyTime_TimeUnchecked() function (#118552)Victor Stinner2024-05-0510-94/+65
| | | | | | | | | | | | | Use the new public Raw functions: * _PyTime_PerfCounterUnchecked() with PyTime_PerfCounterRaw() * _PyTime_TimeUnchecked() with PyTime_TimeRaw() * _PyTime_MonotonicUnchecked() with PyTime_MonotonicRaw() Remove internal functions: * _PyTime_PerfCounterUnchecked() * _PyTime_TimeUnchecked() * _PyTime_MonotonicUnchecked()
* gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559)Raymond Hettinger2024-05-051-18/+11
|
* Minor edit: Simplify and tighten the distribution test (gh-118585)Raymond Hettinger2024-05-051-10/+11
| | | Simplify and tighten the distribution test
* gh-118131: Command-line interface for the `random` module (#118132)Hugo van Kemenade2024-05-056-1/+203
|
* gh-118455: Fix mangle_from_ default value in email.policy.Policy.__doc__ ↵wim glenn2024-05-051-1/+1
| | | | | | | | | | | | (#118456) * Fix mangle_from_ default value in email.policy.Policy.__doc__ The docstring says it defaults to True, but it actually defaults to False. Only the Compat32 subclass overrides that. --------- Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-118164: Break a loop between _pydecimal and _pylong and optimize int to ↵Serhiy Storchaka2024-05-053-11/+70
| | | | | | | | | | | | | | | | | | | | str conversion (GH-118483) For converting large ints to strings, CPython invokes a function in _pylong.py, which uses the decimal module to implement an asymptotically waaaaay sub-quadratic algorithm. But if the C decimal module isn't available, CPython uses _pydecimal.py instead. Which in turn frequently does str(int). If the int is very large, _pylong ends up doing the work, which in turn asks decimal to do "big" arithmetic, which in turn calls str(big_int), which in turn ... it can become infinite mutual recursion. This change introduces a different int->str function that doesn't use decimal. It's asymptotically worse, "Karatsuba time" instead of quadratic time, so still a huge improvement. _pylong switches to that when the C decimal isn't available. It is also used for not too large integers (less than 450_000 bits), where it is faster (up to 2 times for 30_000 bits) than the asymptotically better implementation that uses the C decimal. Co-authored-by: Tim Peters <tim.peters@gmail.com>
* gh-74929: Remove undesirable DECREF in PEP 667 implementation (#118583)Tian Gao2024-05-052-1/+15
| | | | With tests.
* gh-118518: Allow perf to work without frame pointers (#112254)Pablo Galindo Salgado2024-05-0519-39/+892
|
* gh-118164: str(10**10000) hangs if the C _decimal module is missing (#118503)Tim Peters2024-05-043-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial stab. * Test the tentative fix. Hangs "forever" without this change. * Move the new test to a better spot. * New comment to explain why _convert_to_str allows any poewr of 10. * Fixed a comment, and fleshed out an existing test that appeared unfinished. * Added temporary asserts. Or maybe permanent ;-) * Update Lib/_pydecimal.py Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> * Remove the new _convert_to_str(). Serhiy and I independently concluded that exact powers of 10 aren't possible in these contexts, so just checking the string length is sufficient. * At least for now, add the asserts to the other block too. * 📜🤖 Added by blurb_it. --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-109617: fix ncurses incompatibility on macOS with Xcode 15 (#111258)Davide Rizzo2024-05-045-21/+77
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-117953: Track Extra Details in Global Extensions Cache (gh-118532)Eric Snow2024-05-043-138/+578
| | | | | | | | | | | | We have only been tracking each module's PyModuleDef. However, there are some problems with that. For example, in some cases we load single-phase init extension modules from def->m_base.m_init or def->m_base.m_copy, but if multiple modules share a def then we can end up with unexpected behavior. With this change, we track the following: * PyModuleDef (same as before) * for some modules, its init function or a copy of its __dict__, but specific to that module * whether it is a builtin/core module or a "dynamic" extension * the interpreter (ID) that owns the cached __dict__ (only if cached) This also makes it easier to remember the module's kind (e.g. single-phase init) and if loading it previously failed, which I'm doing separately.
* gh-117139: Fix missing semicolon (GH-118573)Ken Jin2024-05-041-1/+1
|
* gh-118569: Add a test for dynamic PEP695 classes (#118570)Nikita Sobolev2024-05-041-0/+25
|
* GH-111744: Support opcode events in bdb (GH-111834)Tian Gao2024-05-044-17/+72
|
* build(deps): bump hypothesis from 6.100.0 to 6.100.2 in /Tools (#118462)dependabot[bot]2024-05-041-1/+1
| | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.100.0 to 6.100.2. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.100.0...hypothesis-python-6.100.2)
* fix comment typo in importlib (#118567)wim glenn2024-05-041-1/+1
|
* gh-74929: Implement PEP 667 (GH-115153)Tian Gao2024-05-0419-257/+921
|
* GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵Mark Shannon2024-05-0419-448/+863
| | | | | | | | | | support of calls. (GH-118322) * Add CALL_PY_GENERAL, CALL_BOUND_METHOD_GENERAL and call CALL_NON_PY_GENERAL specializations. * Remove CALL_PY_WITH_DEFAULTS specialization * Use CALL_NON_PY_GENERAL in more cases when otherwise failing to specialize
* gh-113081: Print colorized exception just like built-in traceback in pdb ↵Tian Gao2024-05-043-2/+6
| | | | (#113082)
* gh-111997: C-API for signalling monitoring events (#116413)Irit Katriel2024-05-0420-37/+1442
|
* GH-113464: Remove the extra jump via `_SIDE_EXIT` in `_EXIT_TRACE` (GH-118545)Mark Shannon2024-05-046-53/+31
|
* gh-110850: Use _PyDeadline_Get() in EnterNonRecursiveMutex() (#118556)Victor Stinner2024-05-041-6/+7
| | | | | | | | Use _PyDeadline_Init() and _PyDeadline_Get() in EnterNonRecursiveMutex() of thread_nt.h. _PyDeadline_Get() uses the monotonic clock which is now the same as the perf counter clock on all platforms. So this change does not cause any behavior change. It just reuses existing helper functions.
* gh-115532 Add kde_random() to the statistic module (#118210)Raymond Hettinger2024-05-044-63/+207
|
* GH-113464: Generate a more efficient JIT (GH-118512)Brandt Bucher2024-05-033-392/+418
|
* GH-118251: Fix incomplete ternary expression in JIT workflow (GH-118564)Brandt Bucher2024-05-031-1/+1
|
* gh-118527: Intern filename, name, and qualname in code objects. (#118558)Sam Gross2024-05-031-0/+5
| | | | | | This interns the strings for `co_filename`, `co_name`, and `co_qualname` on codeobjects in the free-threaded build. This partially addresses a reference counting bottleneck when creating closures concurrently. The closures take the name and qualified name from the code object.
* gh-118534: Fix load of `gil->locked` (#118553)Sam Gross2024-05-031-1/+1
|
* Minor improvements to the itertools recipes (#118563)Raymond Hettinger2024-05-031-24/+12
|
* GH-116380: Move pathlib globbing implementation into `pathlib._glob` (#118562)Barney Gale2024-05-034-309/+314
| | | | | | | | Moving this code under the `pathlib` package makes it quite a lot easier to backport in the `pathlib-abc` PyPI package. It was a bit foolish of me to add it to `glob` in the first place. Also add `translate()` to `__all__` in `glob`. This function is new in 3.13, so there's no NEWS needed.
* gh-117657: Disable the function/code cache in free-threaded builds (#118301)mpage2024-05-034-1/+23
| | | | This is only used by the specializing interpreter and the tier 2 optimizer, both of which are disabled in free-threaded builds.
* GH-118251: Skip fewer test in emulated JIT CI (GH-118536)Savannah Ostrowski2024-05-032-8/+84
|
* gh-107674: Improve performance of `sys.settrace` (GH-117133)Tian Gao2024-05-037-52/+63
| | | | | | * Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing
* gh-83856: Honor atexit for all multiprocessing start methods (GH-114279)Tian Gao2024-05-035-5/+34
| | | | | Use atexit for all multiprocessing start methods to cleanup. See the GH-114279 PR discussion and related issue for details as to why.
* GH-118487: Add Black to `.pre-commit-config.yaml` for JIT files (GH-118537)Savannah Ostrowski2024-05-032-2/+17
|
* gh-115119: Update macOS installer to build with libmpdec 4.0.0 (GH-118382)Erlend E. Aasland2024-05-033-0/+13
| | | Co-authored-by: Ned Deily <nad@python.org>
* gh-115119: Update Windows installer to mpdecimal 4.0.0 (#118506)Erlend E. Aasland2024-05-034-6/+7
|
* docs: clarify csv.DictReader's treatment of the first data row (#118549)Ned Batchelder2024-05-031-2/+4
|
* gh-118527: Use deferred reference counting for C functions on modules (#118529)Sam Gross2024-05-031-0/+1
| | | | | This addresses a scaling bottleneck in the free-threaded build when calling functions like `math.floor()` concurrently from multiple threads.
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-03123-62/+376
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-118495: Skip test using threads after forking when running with TSAN ↵mpage2024-05-031-3/+2
| | | | | | | (#118530) This is unsupported. Note that `skip_unless_reliable_fork()` checks for the conditions used by the decorators that were removed, along with checking for TSAN.
* gh-117514: Add `sys._is_gil_enabled()` function (#118514)Sam Gross2024-05-035-1/+67
| | | | | The function returns `True` or `False` depending on whether the GIL is currently enabled. In the default build, it always returns `True` because the GIL is always enabled.
* gh-118527: Use `_Py_ID(__main__)` for main module name (#118528)Sam Gross2024-05-031-1/+1
| | | | | Most module names are interned and immortalized, but the main module was not. This partially addresses a scaling bottleneck in the free-threaded when creating closure concurrently in the main module.
* gh-118513: Fix sibling comprehensions with a name bound in one and global in ↵Carl Meyer2024-05-033-39/+57
| | | | | | the other (#118526) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-101732: Modules/_ssl.c: use Y2038 compatible openssl function when ↵Alexander Kanavin2024-05-032-0/+5
| | | | available (GH-118425)