summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)Zackery Spytz2024-04-034-6/+40
|
* gh-116303: Skip test module dependent tests if test modules are unavailable ↵Erlend E. Aasland2024-04-0357-124/+256
| | | | (#117341)
* gh-117381: Improve error messages for ntpath.commonpath() (GH-117382)Nice Zombies2024-04-033-53/+54
|
* gh-117483: Accept "Broken pipe" as valid error message in ↵Sam Gross2024-04-031-1/+3
| | | | | | `test_wrong_cert_tls13` (GH-117484) On macOS, the closed connection can lead to a "Broken pipe" error instead of a "Connection reset by peer" error.
* GH-70647: Deprecate strptime day of month parsing without a year present to ↵Gregory P. Smith2024-04-037-1/+117
| | | | avoid leap-year bugs (GH-117107)
* gh-117431: Adapt bytes and bytearray .startswith() and .endswith() to ↵Erlend E. Aasland2024-04-037-55/+318
| | | | | | Argument Clinic (#117495) This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
* gh-117431: Fix str.endswith docstring (#117499)Erlend E. Aasland2024-04-032-8/+16
| | | | | The first parameter is named 'suffix', not 'prefix'. Regression introduced by commit 444156ed
* gh-117281: Change weakref repr() to fully qualified name (#117285)Victor Stinner2024-04-032-8/+57
| | | | | | | | Use the fully qualified type name in repr() of weakref.ref and weakref.proxy types. Fix a crash in proxy_repr() when the reference is dead. Add also test_ref_repr() and test_proxy_repr().
* gh-91565: Update issue tracker URL in error message. (#117450)Ezio Melotti2024-04-031-2/+2
| | | | | * Update issue tracker URL in commit message. * Also update issue tracker URL in comment.
* gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (#117466)Erlend E. Aasland2024-04-034-49/+149
| | | | This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
* gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491)Eric Snow2024-04-031-0/+2
| | | This is a follow-up to gh-117170 and gh-117485.
* gh-76785: Consolidate Some Interpreter-related Testing Helpers (gh-117485)Eric Snow2024-04-0210-312/+526
| | | This eliminates the duplication of functionally identical helpers in the _testinternalcapi and _xxsubinterpreters modules.
* gh-76785: Add PyInterpreterConfig Helpers (gh-117170)Eric Snow2024-04-0213-86/+754
| | | These helpers make it easier to customize and inspect the config used to initialize interpreters. This is especially valuable in our tests. I found inspiration from the PyConfig API for the PyInterpreterConfig dict conversion stuff. As part of this PR I've also added a bunch of tests.
* gh-117349: Micro-optimize a few `os.path` functions (#117350)Nice Zombies2024-04-024-39/+35
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* Fix successor opcode name printing in Tier 2 DEOPT debug message (#117471)Guido van Rossum2024-04-021-1/+1
|
* gh-112087: Make `list.extend(dict)` behave atomically (#117438)Sam Gross2024-04-021-0/+5
| | | | | | | | Add a special case for `list.extend(dict)` and `list(dict)` so that those patterns behave atomically with respect to modifications to the list or dictionary. This is required by multiprocessing, which assumes that `list(_finalizer_registry)` is atomic.
* gh-117440: Make `syslog` thread-safe in free-threaded builds (#117441)Sam Gross2024-04-022-5/+19
| | | Use critical sections to protect access to the syslog module.
* gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113)Petr Viktorin2024-04-021-2/+24
|
* gh-115538: Use pathlib to compare prefixes in test_venv (GH-117076)AN Long2024-04-021-1/+2
|
* gh-113317: Argument Clinic: Add libclinic.return_converters (#117451)Victor Stinner2024-04-023-181/+178
| | | | | | | | | | | | | | | | | Move the following converter classes to libclinic.return_converters: * CReturnConverter * CReturnConverterAutoRegister * Py_ssize_t_return_converter * bool_return_converter * double_return_converter * float_return_converter * int_return_converter * long_return_converter * size_t_return_converter * unsigned_int_return_converter * unsigned_long_return_converter Move also the add_c_return_converter() function there.
* GH-115776: Embed the values array into the object, for "normal" Python ↵Mark Shannon2024-04-0235-536/+786
| | | | objects. (GH-116115)
* gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)Grigoriev Semyon2024-04-024-1239/+1442
|
* gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private ↵Irit Katriel2024-04-0211-42/+49
| | | | (#117412)