summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-113317: Add ParseArgsCodeGen class (#117707)Victor Stinner2024-04-114-846/+953
|
* gh-113317: Add Codegen class to Argument Clinic (#117626)Victor Stinner2024-04-118-180/+183
| | | | | | | | | | | * Move ifndef_symbols, includes and add_include() from Clinic to Codegen. Add a 'codegen' (Codegen) attribute to Clinic. * Remove libclinic.crenderdata module: move code to libclinic.codegen. * BlockPrinter.print_block(): remove unused 'limited_capi' argument. Remove also 'core_includes' parameter. * Add get_includes() methods. * Make Codegen.ifndef_symbols private. * Make Codegen.includes private. * Make CConverter.includes private.
* gh-117711: Only check for 'test/wheeldata' when it's actually used (#117712)Karolina Surma2024-04-111-0/+4
| | | | | | | It's possible to build Python with option `--with-wheel-pkg-dir` pointing to a custom wheel directory. Don't include the directory in the test set if the wheels are used from a different location. Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* gh-117606: Truncate extremely long error message in `test_exceptions` (#117670)Nice Zombies2024-04-111-1/+2
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-76785: Add More Tests to test_interpreters.test_api (gh-117662)Eric Snow2024-04-1118-418/+2012
| | | In addition to the increase test coverage, this is a precursor to sorting out how we handle interpreters created directly via the C-API.
* GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726)Barney Gale2024-04-114-71/+52
| | | | | | | | | | | Move `pathlib.Path.walk()` implementation into `glob._Globber`. The new `glob._Globber.walk()` classmethod works with strings internally, which is a little faster than generating `Path` objects and keeping them normalized. The `pathlib.Path.walk()` method converts the strings back to path objects. In the private pathlib ABCs, our existing subclass of `_Globber` ensures that `PathBase` instances are used throughout. Follow-up to #117589.
* GH-117586: Speed up `pathlib.Path.glob()` by working with strings (#117589)Barney Gale2024-04-104-195/+269
| | | | | | | | | | | | Move pathlib globbing implementation into a new private class: `glob._Globber`. This class implements fast string-based globbing. It's called by `pathlib.Path.glob()`, which then converts strings back to path objects. In the private pathlib ABCs, add a `pathlib._abc.Globber` subclass that works with `PathBase` objects rather than strings, and calls user-defined path methods like `PathBase.stat()` rather than `os.stat()`. This sets the stage for two more improvements: - GH-115060: Query non-wildcard segments with `lstat()` - GH-116380: Unify `pathlib` and `glob` implementations of globbing. No change to the implementations of `glob.glob()` and `glob.iglob()`.
* gh-67224: Make linecache imports relative to improve startup speed (#117501)Pablo Galindo Salgado2024-04-101-3/+11
|
* GH-117546: Fix symlink resolution in `os.path.realpath('loop/../link')` ↵Barney Gale2024-04-104-17/+7
| | | | | | (#117568) Continue resolving symlink targets after encountering a symlink loop, which matches coreutils `realpath` behaviour.
* gh-117531: Unblock getters after non-immediate queue shutdown (#117532)Laurie O2024-04-103-5/+26
| | | (This is a small tweak of the original gh-104750 which added shutdown.)
* gh-115142: Skip ``test_capi.test_dict.py`` if ``_testcapi`` and ↵Kirill Podoprigora2024-04-101-2/+5
| | | | | ``_testlimitedcapi`` are not available (GH-117588) gh-115142: Skip test_dict if _testcapi and _testlimitedcapi is not available
* gh-112536: Define `_Py_THREAD_SANITIZER` on GCC when TSan is enabled (#117702)Sam Gross2024-04-101-0/+3
| | | | | The `__has_feature(thread_sanitizer)` is a Clang-ism. Although new versions of GCC implement `__has_feature`, the `defined(__has_feature)` check still fails on GCC so we don't use that code path.
* gh-117142: Port _ctypes to multi-phase init (GH-117181)neonene2024-04-1010-178/+1125
|
* gh-117692: Fix `AttributeError` in `DocTestFinder` on wrapped ↵Nikita Sobolev2024-04-103-1/+24
| | | | | | `builtin_or_method` (#117699) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-117686: Improve the performance of ntpath.expanduser() (#117690)Nice Zombies2024-04-102-2/+4
| | | Refactor out _get_bothseps() call from the loop.
* gh-117431: Argument Clinic: copy forced text signature when cloning (#117591)Erlend E. Aasland2024-04-104-10/+70
|
* gh-117360: Clearer wording in os.path.lexists() docs (#117679)Nice Zombies2024-04-091-1/+1
| | | Co-authored-by: Zachary Ware <zach@python.org>
* gh-117597: Clarify exception handling in the tutorial (#117681)Nice Zombies2024-04-091-3/+3
|
* gh-117648: Amend NEWS entry (#117697)Erlend E. Aasland2024-04-091-1/+1
| | | | Make the wording more vague; the performance impact varies a lot depending on platform and input.
* Merge branch 'main' of https://github.com/python/cpythonThomas Wouters2024-04-0921-92/+548
|\
| * gh-117663: [Enum] fix _simple_enum's detection of aliases (GH-117664)Ethan Furman2024-04-093-29/+97
| |
| * gh-117534: Add checking for input parameter in iso_to_ymd (#117543)Vlad48962024-04-094-7/+16
| | | | | | | | | | | | | | Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
| * Revert "gh-106023: Update What's New in 3.13: _PyObject_FastCall() ↵Victor Stinner2024-04-091-0/+5
| | | | | | | | | | | | | | | | (#117633)" (#117676) This reverts commit 9a12f5d1c19dee1f89684be776680aeaf117be5b. I was wrong: the _PyObject_FastCall() function was removed. But we kept the _PyObject_FastCallDict() function.
| * gh-117658: Fix check_dump_traceback_threads in free-threaded build (#117659)Sam Gross2024-04-091-1/+3
| | | | | | | | With the GIL disabled, the waiting thread may still be in the `self.running.set() ` call when faulthandler dumps tracebacks.
| * gh-116720: Fix corner cases of taskgroups (#117407)Guido van Rossum2024-04-098-13/+183
| | | | | | | | | | | | | | | | | | | | This prevents external cancellations of a task group's parent task to be dropped when an internal cancellation happens at the same time. Also strengthen the semantics of uncancel() to clear self._must_cancel when the cancellation count reaches zero. Co-Authored-By: Tin Tvrtković <tinchester@gmail.com> Co-Authored-By: Arthur Tacca
| * gh-116622: Enable `test_doctest` on platforms that don't support ↵Malcolm Smith2024-04-091-3/+8
| | | | | | | | | | subprocesses (#116758) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
| * gh-117516: Implement typing.TypeIs (#117517)Jelle Zijlstra2024-04-095-39/+236
| | | | | | | | | | | | See PEP 742. Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* | Post 3.13.0a6Thomas Wouters2024-04-091-1/+1
| |
* | Python 3.13.0a6v3.13.0a6Thomas Wouters2024-04-09122-346/+1315
|/
* gh-107674: Remove some unnecessary code in instrumentation code (GH-117393)Tian Gao2024-04-091-1/+1
|
* gh-117648: Improve performance of os.join (#117654)Nice Zombies2024-04-093-2/+4
| | | | | Replace map() with a method call in the loop body. Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* gh-117182: Allow lazily loaded modules to modify their own __class__Chris Markiewicz2024-04-093-4/+38
|
* gh-117645: Skip test_dynamic global specialization on WASI (#117646)Victor Stinner2024-04-081-2/+2
| | | | Skip test_load_global_specialization_failure_keeps_oparg() of test_dynamic on WASI build. The test uses too much stack memory.
* Enhance regrtest get_signal_name(): support shell exit code (#117647)Victor Stinner2024-04-082-0/+9
|
* gh-81322: support multiple separators in StreamReader.readuntil (#16429)Bruce Merry2024-04-084-21/+103
|
* gh-117642: Fix PEP 737 implementation (GH-117643)Serhiy Storchaka2024-04-085-8/+42
| | | | | * Fix implementation of %#T and %#N (they were implemented as %T# and %N#). * Restore tests removed in gh-116417.
* gh-117439: Make refleak checking thread-safe without the GIL (#117469)Sam Gross2024-04-089-44/+62
| | | | | This keeps track of the per-thread total reference count operations in PyThreadState in the free-threaded builds. The count is merged into the interpreter's total when the thread exits.
* gh-117547: Fix mimalloc compile error on OpenBSD (#117548)Sam Gross2024-04-081-2/+2
|
* gh-111926: Make weakrefs thread-safe in free-threaded builds (#117168)mpage2024-04-0817-327/+491
| | | | | | | | | Most mutable data is protected by a striped lock that is keyed on the referenced object's address. The weakref's hash is protected using the weakref's per-object lock. Note that this only affects free-threaded builds. Apart from some minor refactoring, the added code is all either gated by `ifdef`s or is a no-op (e.g. `Py_BEGIN_CRITICAL_SECTION`).
* gh-96471: Correct documentation for asyncio queue shutdown (#117621)Laurie O2024-04-083-6/+9
|
* gh-117293: Fix race condition in run_workers.py (#117298)Sam Gross2024-04-081-16/+21
| | | | | | | | | The worker thread may still be alive after it enqueues it's last result, which can lead to a delay of 30 seconds after the test finishes. This happens much more frequently in the free-threaded build with the GIL disabled. This changes run_workers.py to track of live workers by enqueueing a `WorkerExited()` instance before the worker exits.
* gh-117552: Add timeout in HTTPHandlerTest (#117553)Sam Gross2024-04-081-1/+2
|
* gh-116303: Skip tests if C recursion limit is unavailable (GH-117368)Erlend E. Aasland2024-04-0814-35/+32
| | | | | The test suite fetches the C recursion limit from the _testcapi extension module. Test extension modules can be disabled using the --disable-test-modules configure option.
* gh-106023: Update What's New in 3.13: _PyObject_FastCall() (#117633)Victor Stinner2024-04-081-5/+0
| | | The function _PyObject_FastCall() was restored.
* gh-111726: Explicitly close database connections in sqlite3 doctests (#111730)Nikita Sobolev2024-04-081-0/+27
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-111726: Remove some doctests from sqlite3 docs (#117623)Erlend E. Aasland2024-04-081-36/+7
| | | | | * remove load extension doctest since we cannot skip it conditionally * remove sys.unraisablehook example; using unraisable hooks is not "an improved debug experience"
* gh-113317: Remove unused INVALID constant in Argument Clinic (#117624)Victor Stinner2024-04-082-5/+0
|
* gh-111726: Cleanup test files after running sqlite3 doctest (#117604)Hugo van Kemenade2024-04-081-0/+8
| | | | Remove all temporary databases in a dedicated 'testcleanup' step at the end of the file.
* gh-117594: Require cpu resource to test_search_anchor_at_beginning (gh-117595)Donghee Na2024-04-071-1/+4
|
* Fix reference in code.rst (#117615)Anita Hammer2024-04-071-1/+1
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>