summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Cases generator: Remove type_prop and passthrough (#117614)Ken Jin2024-04-073-33/+22
|
* gh-117584: Raise TypeError for non-paths in posixpath.relpath() (GH-117585)Nice Zombies2024-04-073-1/+3
|
* GH-117512: Allow 64-bit JIT operands on 32-bit platforms (GH-117527)Brandt Bucher2024-04-064-31/+47
|
* gh-96471: Add asyncio queue shutdown (#104228)Laurie O2024-04-065-3/+301
| | | Co-authored-by: Duprat <yduprat@gmail.com>
* gh-116622: Test updates for Android (#117299)Malcolm Smith2024-04-058-14/+21
| | | | | | | - re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all Android ABIs - use support.setswitchinterval in all relevant tests - skip test_fma_zero_result on Android x86_64 - accept EACCES when calling os.get_terminal_size on Android
* GH-77609: Add recurse_symlinks argument to `pathlib.Path.glob()` (#117311)Barney Gale2024-04-055-95/+34
| | | | | | | | | | | | | | | Replace tri-state `follow_symlinks` with boolean `recurse_symlinks` argument. The new argument controls whether symlinks are followed when expanding recursive `**` wildcards. The possible argument values correspond as follows: follow_symlinks recurse_symlinks =============== ================ False N/A None False True True We therefore drop support for not following symlinks when expanding non-recursive pattern parts; it wasn't requested in the original issue, and it's a feature not found in any shells. This makes the API a easier to grok by eliminating `None` as an option. No news blurb as `follow_symlinks` was new in 3.13.
* gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests ↵Petr Viktorin2024-04-051-4/+10
| | | | | | | | | | | | | (GH-117569) gh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests To test the `errors` argument, we read a UTF-16 file as UTF-8 with "backslashreplace" error handling. However, the utf-16 codec adds an endian-specific byte-order mark, so on big-endian machines the expectation doesn't match the test file (which was saved on a little-endian machine). Use endswith to ignore the BOM.
* gh-111140: PyLong_From/AsNativeBytes: Take *flags* rather than just ↵Steve Dower2024-04-056-88/+319
| | | | *endianness* (GH-116053)
* GH-114847: Speed up `posixpath.realpath()` (#114848)Barney Gale2024-04-053-34/+64
| | | | | | | | | | | Apply the following optimizations to `posixpath.realpath()`: - Remove use of recursion - Construct child paths directly rather than using `join()` - Use `os.getcwd[b]()` rather than `abspath()` - Use `startswith(sep)` rather than `isabs()` - Use slicing rather than `split()` Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-116608: importlib.resources: Un-deprecate functional API & add ↵Petr Viktorin2024-04-056-15/+533
| | | | subdirectory support (GH-116609)
* gh-117457: Regen executor cases post PR #117477 (#117559)Erlend E. Aasland2024-04-051-2/+8
|
* gh-116303: Don't build xxlimited and xxlimited_35 if --disable-test-modules ↵Erlend E. Aasland2024-04-052-4/+4
| | | | is given (#117554)
* GH-117457: Correct pystats uop "miss" counts (GH-117477)Michael Droettboom2024-04-044-144/+548
|
* gh-117549: Match declaration order for _Py_BackoffCounter initializer (#117551)Michael Droettboom2024-04-041-1/+1
| | | Otherwise it might not compile with C++ (or certain C compilers/flags?).
* gh-117474: Skip GIL test in free-threaded build (#117475)Sam Gross2024-04-041-0/+1
| | | | In the free-threaded build, the GIL will typically be disabled so `py-bt` will not show threads waiting on the GIL.
* gh-112075: Make _PyDict_LoadGlobal thread safe (#117529)Dino Viehland2024-04-046-29/+23
| | | Make _PyDict_LoadGlobal threadsafe
* gh-117478: Add `@support.requires_gil_enabled` decorator (#117479)Sam Gross2024-04-047-11/+23
| | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-117435: Make `SemLock` thread-safe in free-threaded build (#117436)Sam Gross2024-04-042-9/+37
| | | | Use critical sections to make acquire, release, and _count thread-safe without the GIL.
* gh-117494: extract the Instruction Sequence data structure into a separate ↵Irit Katriel2024-04-0413-224/+283
| | | | file (#117496)
* gh-116968: Reimplement Tier 2 counters (#117144)Guido van Rossum2024-04-0419-235/+313
| | | | | | | | | | | | Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The API used for adaptive specialization counters is changed but the behavior is (supposed to be) identical. The behavior of the Tier 2 counters is changed: - There are no longer dynamic thresholds (we never varied these). - All counters now use the same exponential backoff. - The counter for ``JUMP_BACKWARD`` starts counting down from 16. - The ``temperature`` in side exits starts counting down from 64.
* gh-109802: Add coverage test for complex_abs() (GH-117449)Sergey B Kirpichev2024-04-041-0/+3
| | | | | | | | * gh-109802: Add coverage test for complex_abs() This tests overflow on L594. // line numbers wrt to 0f2fa6150b
* [doc] Update logging documentation to improve grammar and elucidate an ↵Vinay Sajip2024-04-042-11/+72
| | | | example. (GH-117541)
* gh-117521: Improve typing.TypeGuard docstring (#117522)Jelle Zijlstra2024-04-041-11/+14
|
* gh-117467: Add preserving of mailbox owner on flush (GH-117510)Tony Mountifield2024-04-043-3/+51
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-113317: Finish splitting Argument Clinic into sub-files (#117513)Victor Stinner2024-04-0410-2194/+2238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add libclinic.parser module and move the following classes and functions there: * Parser * PythonParser * create_parser_namespace() Add libclinic.dsl_parser module and move the following classes, functions and variables there: * ConverterArgs * DSLParser * FunctionNames * IndentStack * ParamState * StateKeeper * eval_ast_expr() * unsupported_special_methods Add libclinic.app module and move the Clinic class there. Add libclinic.cli module and move the following functions there: * create_cli() * main() * parse_file() * run_clinic()
* gh-117459: Keep the traceback in _convert_future_exc (#117460)rsp4jack2024-04-043-4/+22
|
* gh-117205: Increase chunksize when compiling pyc in parallel (#117206)Shantanu2024-04-032-1/+3
|
* gh-117267: Ensure DirEntry.stat().st_ctime still contains creation time ↵Steve Dower2024-04-032-0/+9
| | | | during deprecation period (GH-117354)
* gh-114329: Fix PyList_GetItemRef() limited C API definition (#117520)Victor Stinner2024-04-036-4/+12
|
* gh-113317: Argument Clinic: Add libclinic.clanguage (#117455)Victor Stinner2024-04-035-1602/+1635
| | | | | | | | | | | | | | | | | | | Add libclinic.clanguage module and move the following classes and functions there: * CLanguage * declare_parser() Add libclinic.codegen and move the following classes there: * BlockPrinter * BufferSeries * Destination Move the following functions to libclinic.function: * permute_left_option_groups() * permute_optional_groups() * permute_right_option_groups()
* gh-116168: Remove extra `_CHECK_STACK_SPACE` uops (#117242)Peter Lazorchak2024-04-038-126/+494
| | | This merges all `_CHECK_STACK_SPACE` uops in a trace into a single `_CHECK_STACK_SPACE_OPERAND` uop that checks whether there is enough stack space for all calls included in the entire trace.
* gh-76785: Raise InterpreterError, Not RuntimeError (gh-117489)Eric Snow2024-04-038-23/+40
| | | | | I had meant to switch everything to InterpreterError when I added it a while back. At the time I missed a few key spots. As part of this, I've added print-the-exception to _PyXI_InitTypes() and fixed an error case in `_PyStaticType_InitBuiltin().
* gh-117431: Adapt str.find and friends to Argument Clinic (#117468)Erlend E. Aasland2024-04-034-217/+439
| | | | | | | | | | This change gives a significant speedup, as the METH_FASTCALL calling convention is now used. The following methods are adapted: - str.count - str.find - str.index - str.rfind - str.rindex
* GH-114847: Raise FileNotFoundError when getcwd() returns '(unreachable)' ↵Barney Gale2024-04-032-0/+16
| | | | | | | | | (#117481) On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-117215 Make the fromskey() signature match dict.fromkeys(). (gh-117493)Raymond Hettinger2024-04-031-3/+3
|