]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Victor Stinner [Thu, 31 Aug 2023 16:33:34 +0000 (18:33 +0200)]
gh-108634: Py_TRACE_REFS uses a hash table (#108663)
Python built with "configure --with-trace-refs" (tracing references)
is now ABI compatible with Python release build and debug build.
Moreover, it now also supports the Limited API.
Change Py_TRACE_REFS build:
* Remove _PyObject_EXTRA_INIT macro.
* The PyObject structure no longer has two extra members (_ob_prev
and _ob_next).
* Use a hash table (_Py_hashtable_t) to trace references (all
objects): PyInterpreterState.object_state.refchain.
* Py_TRACE_REFS build is now ABI compatible with release build and
debug build.
* Limited C API extensions can now be built with Py_TRACE_REFS:
xxlimited, xxlimited_35, _testclinic_limited.
* No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2()
functions to PyModule_Create2TraceRefs() and
PyModule_FromDefAndSpec2TraceRefs().
* _Py_PrintReferenceAddresses() is now called before
finalize_interp_delete() which deletes the refchain hash table.
* test_tracemalloc find_trace() now also filters by size to ignore
the memory allocated by _PyRefchain_Trace().
Test changes for Py_TRACE_REFS:
* Add test.support.Py_TRACE_REFS constant.
* Add test_sys.test_getobjects() to test sys.getobjects() function.
* test_exceptions skips test_recursion_normalizing_with_no_memory()
and test_memory_error_in_PyErr_PrintEx() if Python is built with
Py_TRACE_REFS.
* test_repl skips test_no_memory().
* test_capi skisp test_set_nomemory().
Alex Waygood [Thu, 31 Aug 2023 14:35:23 +0000 (15:35 +0100)]
gh-97850: Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed (#108719)
Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed
Victor Stinner [Thu, 31 Aug 2023 14:13:53 +0000 (16:13 +0200)]
gh-106320: winconsoleio.c includes pycore_pyerrors.h (#108720)
Fix compiler warning:
warning C4013: '_PyErr_ChainExceptions1' undefined
Victor Stinner [Thu, 31 Aug 2023 13:37:14 +0000 (15:37 +0200)]
Run make regen-global-objects (#108714)
Victor Stinner [Thu, 31 Aug 2023 11:53:19 +0000 (13:53 +0200)]
gh-106320: Remove private _PyErr_ChainExceptions() (#108713)
Remove _PyErr_ChainExceptions(), _PyErr_ChainExceptions1() and
_PyErr_SetFromPyStatus() functions from the public C API.
* Move the private _PyErr_ChainExceptions() and
_PyErr_ChainExceptions1() function to the internal C API
(pycore_pyerrors.h).
* Move the private _PyErr_SetFromPyStatus() to the internal C API
(pycore_initconfig.h).
* No longer export the _PyErr_ChainExceptions() function.
* Move run_in_subinterp_with_config() from _testcapi to
_testinternalcapi.
Mark Shannon [Thu, 31 Aug 2023 10:34:52 +0000 (11:34 +0100)]
GH-108614: Remove non-debug uses of `#if TIER_ONE` and `#if TIER_TWO` from `_POP_FRAME` op. (GH-108685)
Victor Stinner [Thu, 31 Aug 2023 09:15:31 +0000 (11:15 +0200)]
gh-106320: Don't export _Py_ForgetReference() function (#108712)
There is no need to export the _Py_ForgetReference() function of the
Py_TRACE_REFS build. It's not used by shared extensions. Enhance also
its comment.
Victor Stinner [Thu, 31 Aug 2023 07:56:06 +0000 (09:56 +0200)]
gh-107149: Make PyUnstable_ExecutableKinds public (#108440)
Move PyUnstable_ExecutableKinds and associated macros from the
internal C API to the public C API.
Rename constants: replace "PY_" prefix with "PyUnstable_" prefix.
Alex Waygood [Thu, 31 Aug 2023 07:41:25 +0000 (08:41 +0100)]
gh-108455: peg_generator: use `types-setuptools==68.1.0.1` in CI (#108697)
Nikita Sobolev [Thu, 31 Aug 2023 07:28:27 +0000 (10:28 +0300)]
gh-101100: Fix sphinx warnings in `threading.rst` (#108684)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Carl Meyer [Thu, 31 Aug 2023 00:15:31 +0000 (18:15 -0600)]
gh-108696: revert bypassing import cache in test_import helper (#108698)
Carl Meyer [Wed, 30 Aug 2023 23:50:50 +0000 (17:50 -0600)]
gh-108654: restore comprehension locals before handling exception (#108659)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Victor Stinner [Wed, 30 Aug 2023 19:33:04 +0000 (21:33 +0200)]
gh-108297: Remove test_crashers (#108690)
The test was skipped in 2011 by
commit
89ba56d5fb1335ef808b87cd33cba95ea141c65d .
Scripts in Lib/test/crashers/ do not crash on a reliable way. They
rely on undefined behaviors, like state of the stack memory, and so
may or may not crash. It is not worth it to make sure that they crash
in a continious integration, they should be run manually time to time
instead.
albanD [Wed, 30 Aug 2023 17:07:41 +0000 (13:07 -0400)]
gh-108520: Fix bad fork detection in nested multiprocessing use case (#108568)
gh-107275 introduced a regression where a SemLock would fail being passed along nested child processes, as the `is_fork_ctx` attribute would be left missing after the first deserialization.
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Erlend E. Aasland [Wed, 30 Aug 2023 14:53:10 +0000 (16:53 +0200)]
gh-108590: Revert gh-108657 (commit
400a1cebc ) (#108686)
Reverted per Serhiy's request.
Victor Stinner [Wed, 30 Aug 2023 14:02:48 +0000 (16:02 +0200)]
gh-108494: Argument Clinic: Document how to generate code that uses the limited C API (#108584)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Victor Stinner [Wed, 30 Aug 2023 13:28:58 +0000 (15:28 +0200)]
Document Python build requirements (#108646)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Hugo van Kemenade [Wed, 30 Aug 2023 11:37:45 +0000 (05:37 -0600)]
gh-101100: Fix Sphinx warnings in the Logging Cookbook (#108678)
kato8966 [Wed, 30 Aug 2023 11:05:29 +0000 (20:05 +0900)]
Fix typo in multiprocessing docs (#108666)
Sebastian Rittau [Wed, 30 Aug 2023 09:36:59 +0000 (11:36 +0200)]
gh-108669: unittest: Fix documentation for TestResult.collectedDurations (#108670)
Corvin [Wed, 30 Aug 2023 09:06:21 +0000 (05:06 -0400)]
gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (#108657)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Serhiy Storchaka [Wed, 30 Aug 2023 08:41:04 +0000 (11:41 +0300)]
Revert "gh-103224: Use the realpath of the Python executable in `test_venv` (GH-103243)" (GH-108667)
This reverts commit
85b0b0cd947c5218260fb2bc2014c8c8de172d33 .
It broke builtbots.
Victor Stinner [Wed, 30 Aug 2023 03:34:43 +0000 (05:34 +0200)]
gh-106320: Remove private _Py_ForgetReference() (#108664)
Move the private _Py_ForgetReference() function to the internal C API
(pycore_object.h).
sterliakov [Wed, 30 Aug 2023 01:11:31 +0000 (04:11 +0300)]
Mention Ellipsis pickling in the docs (#103660)
Serhiy Storchaka [Tue, 29 Aug 2023 20:08:45 +0000 (23:08 +0300)]
Revert "Use non alternate name for Kyiv (GH-108533)" (GH-108649)
This reverts commit
7659128b9d7a30ddbcb063bc12e2ddb0f1f119e0 .
It broke tests on the Debian and macOS buildbots.
Erlend E. Aasland [Tue, 29 Aug 2023 20:02:12 +0000 (22:02 +0200)]
gh-108278: Deprecate passing the first param of sqlite3.Connection callback APIs by keyword (#108632)
Deprecate passing the callback callable by keyword for the following
sqlite3.Connection APIs:
- set_authorizer(authorizer_callback)
- set_progress_handler(progress_handler, ...)
- set_trace_callback(trace_callback)
The affected parameters will become positional-only in Python 3.15.
Alex Waygood [Tue, 29 Aug 2023 19:14:08 +0000 (20:14 +0100)]
gh-108455: peg_generator: install two stubs packages before running mypy (#108637)
Erlend E. Aasland [Tue, 29 Aug 2023 19:13:38 +0000 (21:13 +0200)]
gh-107801: Improve the accuracy of io.IOBase.seek docs (#108268)
- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Guido van Rossum [Tue, 29 Aug 2023 18:14:56 +0000 (11:14 -0700)]
gh-108488: Initialize JUMP_BACKWARD cache to 0, not 17 (#108591)
This mis-initialization caused the executor optimization to kick in sooner than intended. It also set the lower 4 bits of the counter to `1` -- those bits are supposed to be reserved (the actual counter is in the upper 12 bits).
Guido van Rossum [Tue, 29 Aug 2023 16:51:51 +0000 (09:51 -0700)]
gh-107557: Remove unnecessary SAVE_IP instructions (#108583)
Also remove NOP instructions.
The "stubs" are not optimized in this fashion (their SAVE_IP should always be preserved since it's where to jump next, and they don't contain NOPs by their nature).
Victor Stinner [Tue, 29 Aug 2023 16:04:07 +0000 (18:04 +0200)]
test_sys: remove debug print() (#108642)
Victor Stinner [Tue, 29 Aug 2023 15:46:46 +0000 (17:46 +0200)]
gh-108638: Fix stat.filemode() when _stat is missing (#108639)
Change the pure Python implementation of stat.filemode() for unknown
file type: use "?", as done by the _stat.filemode().
test_stat skips TestFilemodeCStat if the _stat extension is missing.
Jochen Sprickerhof [Tue, 29 Aug 2023 15:00:43 +0000 (17:00 +0200)]
Use non alternate name for Kyiv (GH-108533)
tzdata provides Kiev as an alternative to Kyiv:
https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314#L314
But Debian moved it to the tzdata-legacy package breaking the test:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1050530
This patch switches to the name provided by tzdata.
Serhiy Storchaka [Tue, 29 Aug 2023 14:55:56 +0000 (17:55 +0300)]
gh-108635: Make parameters of some implementations of special methods positional-only (GH-108636)
Nikita Sobolev [Tue, 29 Aug 2023 12:02:52 +0000 (15:02 +0300)]
gh-108455: peg generator: Use `strict_optional=True` for `grammar_parser` (#108629)
Nikita Sobolev [Tue, 29 Aug 2023 11:43:11 +0000 (14:43 +0300)]
gh-108623: Fix compile warning in `Modules/_multiprocessing/semaphore.c` (#108624)
Victor Stinner [Tue, 29 Aug 2023 11:39:42 +0000 (13:39 +0200)]
gh-108494: Don't build _testclinic_limited with TraceRefs (#108608)
If Python is built with ./configure --with-trace-refs, don't build
the _testclinic_limited extension. The limited C API (Py_LIMITED_API)
is not compatible with Py_TRACE_REFS.
Victor Stinner [Tue, 29 Aug 2023 11:33:28 +0000 (13:33 +0200)]
gh-108494: Argument Clinic: fix option group for Limited C API (#108574)
Use PyTuple_Size() instead of PyTuple_GET_SIZE().
Alex Waygood [Tue, 29 Aug 2023 11:23:22 +0000 (12:23 +0100)]
gh-108455: peg_generator: make the mypy config slightly stricter (#108627)
* Enable `--no-implicit-reexport`
* Enable the `truthy-bool` error code
* Enable the `ignore-without-code` error code
* Explicitly note that `--warn-unreachable` cannot yet be enabled
Alex Waygood [Tue, 29 Aug 2023 10:24:06 +0000 (11:24 +0100)]
gh-108455: Simplify the peg_generator mypy config (#108620)
make it easier to see exactly which options from mypy's `--strict` mode can't currently be enabled
Serhiy Storchaka [Tue, 29 Aug 2023 10:20:32 +0000 (13:20 +0300)]
gh-108617: Extend interactive session tests for sqlite3 (GH-108556)
Erlend E. Aasland [Tue, 29 Aug 2023 09:39:42 +0000 (11:39 +0200)]
gh-108550: Fix sqlite3 CLI regression from gh-108551 (#108618)
Edward Schauman-Haigh [Tue, 29 Aug 2023 08:51:36 +0000 (10:51 +0200)]
gh-108558: Improve sqlite3 row factory tests (#108578)
Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().
Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Brett Cannon [Tue, 29 Aug 2023 07:17:25 +0000 (00:17 -0700)]
GH-106176, GH-104702: Fix reference leak when importing across multiple threads (#108497)
Victor Stinner [Tue, 29 Aug 2023 03:40:13 +0000 (05:40 +0200)]
gh-106320: Fix test_peg_generator: _Py_UniversalNewlineFgetsWithSize() (#108609)
Fix test_peg_generator by exporting the
_Py_UniversalNewlineFgetsWithSize() function.
Victor Stinner [Tue, 29 Aug 2023 03:38:51 +0000 (05:38 +0200)]
gh-106320: Remove private _PyObject_GetState() (#108606)
Move the private _PyObject_GetState() function to the internal C API
(pycore_object.h).
Victor Stinner [Tue, 29 Aug 2023 03:20:31 +0000 (05:20 +0200)]
gh-106320: Remove private _PyOS_IsMainThread() function (#108605)
Move the following private API to the internal C API
(pycore_signal.h): _PyOS_IsMainThread() and _PyOS_SigintEvent().
Victor Stinner [Tue, 29 Aug 2023 03:13:41 +0000 (05:13 +0200)]
gh-106320: Remove private _PyErr_SetKeyError() (#108607)
Move the private _PyErr_SetKeyError() function to the internal C API
(pycore_pyerrors.h).
Victor Stinner [Tue, 29 Aug 2023 02:59:49 +0000 (04:59 +0200)]
gh-106320: Remove private _PyLong_New() function (#108604)
Move the following private API to the internal C API (pycore_long.h):
* _PyLong_Copy()
* _PyLong_FromDigits()
* _PyLong_New()
No longer export most of these functions.
Victor Stinner [Tue, 29 Aug 2023 02:44:38 +0000 (04:44 +0200)]
gh-106320: Remove private _PyGILState_GetInterpreterStateUnsafe() (#108603)
The remove private _PyGILState_GetInterpreterStateUnsafe() function
from the public C API: move it the internal C API (pycore_pystate.h).
No longer export the function.
Victor Stinner [Tue, 29 Aug 2023 02:38:23 +0000 (04:38 +0200)]
gh-106320: Remove private _PyThread_at_fork_reinit() function (#108601)
Move the private function to the internal C API (pycore_pythread.h)
and no longer exports it.
Victor Stinner [Tue, 29 Aug 2023 02:36:50 +0000 (04:36 +0200)]
gh-106320: Remove private _Py_UniversalNewlineFgetsWithSize() (#108602)
The remove private _Py_UniversalNewlineFgetsWithSize() function from
the public C API: move it the internal C API (pycore_fileutils.h).
No longer export the function.
Victor Stinner [Tue, 29 Aug 2023 02:18:52 +0000 (04:18 +0200)]
gh-106320: Remove private pythonrun API (#108599)
Remove these private functions from the public C API:
* _PyRun_AnyFileObject()
* _PyRun_InteractiveLoopObject()
* _PyRun_SimpleFileObject()
* _Py_SourceAsString()
Move them to the internal C API: add a new pycore_pythonrun.h header
file. No longer export these functions.
Victor Stinner [Tue, 29 Aug 2023 02:05:11 +0000 (04:05 +0200)]
gh-106320: Remove _PyAnextAwaitable_Type from the public C API (#108597)
It's not needed to declare it in Include/iterobject.h: just use
"extern" where it's used (only in object.c).
Victor Stinner [Tue, 29 Aug 2023 01:20:02 +0000 (03:20 +0200)]
gh-108240: Add pycore_capsule.h internal header file (#108596)
Move _PyCapsule_SetTraverse() definition to a new internal header
file: pycore_capsule.h.
Victor Stinner [Tue, 29 Aug 2023 00:29:46 +0000 (02:29 +0200)]
gh-106320: Remove private _Py_Identifier API (#108593)
Remove the private _Py_Identifier type and related private functions
from the public C API:
* _PyObject_GetAttrId()
* _PyObject_LookupSpecialId()
* _PyObject_SetAttrId()
* _PyType_LookupId()
* _Py_IDENTIFIER()
* _Py_static_string()
* _Py_static_string_init()
Move them to the internal C API: add a new pycore_identifier.h header
file. No longer export these functions.
xzmeng [Tue, 29 Aug 2023 00:14:21 +0000 (08:14 +0800)]
Fix misc doc typos (#108592)
Victor Stinner [Mon, 28 Aug 2023 23:51:39 +0000 (01:51 +0200)]
gh-108494: Build _testclinic_limited on Windows (#108589)
Add _testclinic_limited project to the Visual Studio solution:
* In "PCbuild/", copy "_asyncio.vcxproj" to "_testclinic_limited.vcxproj",
replace "RootNamespace" with "_testclinic_limited", replace "_asyncio.c"
with "_testclinic_limited.c".
* Open Visual Studio, open "PCbuild\pcbuild.sln", add the existing
"PCbuild\_testclinic_limited.vcxproj" project to the solution.
* Add a dependency from "python" project to the "_testclinic_limited"
project.
* Save and exit Visual Studio.
* Add ";_testclinic_limited" to "<TestModules Include="...">"
in "PCbuild\pcbuild.proj".
Victor Stinner [Mon, 28 Aug 2023 23:42:24 +0000 (01:42 +0200)]
gh-107149: Rename _PyUnstable_GetUnaryIntrinsicName() function (#108441)
* Rename _PyUnstable_GetUnaryIntrinsicName() to
PyUnstable_GetUnaryIntrinsicName()
* Rename _PyUnstable_GetBinaryIntrinsicName()
to PyUnstable_GetBinaryIntrinsicName().
Adam Turner [Mon, 28 Aug 2023 21:31:45 +0000 (22:31 +0100)]
GH-107603: Clinic: Pass specific attributes to ``print_block()`` (#108581)
Nikita Sobolev [Mon, 28 Aug 2023 20:04:12 +0000 (23:04 +0300)]
gh-108455: Run `mypy` on `Tools/peg_generator` (#108456)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Matthias Bussonnier [Mon, 28 Aug 2023 18:31:03 +0000 (20:31 +0200)]
gh-106670: Allow Pdb to move between chained exceptions (#106676)
Alex Waygood [Mon, 28 Aug 2023 18:25:16 +0000 (19:25 +0100)]
gh-108494: Argument clinic: Improve the `parse_file()` API (#108575)
Co-authored-by: Victor Stinner <vstinner@python.org>
Guido van Rossum [Mon, 28 Aug 2023 17:17:00 +0000 (10:17 -0700)]
gh-108487: Move assert(self != NULL) down beyond DEOPT_IF() (#108510)
Erlend E. Aasland [Mon, 28 Aug 2023 13:32:07 +0000 (15:32 +0200)]
gh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs (#108281)
Deprecate passing name, number of arguments, and the callable as keyword
arguments, for the following sqlite3.Connection APIs:
- create_function(name, nargs, callable, ...)
- create_aggregate(name, nargs, callable)
The affected parameters will become positional-only in Python 3.15.
Serhiy Storchaka [Mon, 28 Aug 2023 13:04:27 +0000 (16:04 +0300)]
gh-108494: Argument Clinic: fix support of Limited C API (GH-108536)
Erlend E. Aasland [Mon, 28 Aug 2023 12:41:05 +0000 (14:41 +0200)]
gh-104683: Argument Clinic: Refactor the module and class resolver (#108552)
Erlend E. Aasland [Mon, 28 Aug 2023 12:17:34 +0000 (14:17 +0200)]
gh-108550: Speed up sqlite3 tests (#108551)
Refactor the CLI so we can easily invoke it and mock command-line
arguments. Adapt the CLI tests so we no longer have to launch a
separate process.
Disable the busy handler for all concurrency tests; we have full
control over the order of the SQLite C API calls, so we can safely
do this.
The sqlite3 test suite now completes ~8 times faster than before.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Erlend E. Aasland [Mon, 28 Aug 2023 12:02:26 +0000 (14:02 +0200)]
gh-64662: Fix NEWS entry and remove What's New entry (#108565)
nikkie [Mon, 28 Aug 2023 11:19:29 +0000 (20:19 +0900)]
Fix typo in typing docs: Remove redundant backtick (#108559)
Adam Turner [Mon, 28 Aug 2023 05:19:31 +0000 (06:19 +0100)]
GH-108202: Combine documentation of ``calendar`` constants (#108492)
Erlend E. Aasland [Sun, 27 Aug 2023 22:18:32 +0000 (00:18 +0200)]
gh-64662: Add virtual table support to sqlite3.Connection.iterdump (#108340)
Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
John Micco [Sun, 27 Aug 2023 21:07:09 +0000 (14:07 -0700)]
gh-108465: Use compiler basename when determining compiler flags (#108392)
Note:
GNU Autoconf discourages the use of 'basename', and recommends 'expr' instead.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Erlend E. Aasland [Sun, 27 Aug 2023 20:35:27 +0000 (22:35 +0200)]
gh-107801: Document io.TextIOWrapper.tell (#108265)
Ori Avtalion [Sun, 27 Aug 2023 19:50:59 +0000 (22:50 +0300)]
gh-108542: Fix incorrect module name in NEWS entry for gh-105475 (#108543)
Raymond Hettinger [Sun, 27 Aug 2023 13:59:40 +0000 (08:59 -0500)]
gh-108322: Optimize statistics.NormalDist.samples() (gh-108324)
Clément Robert [Sun, 27 Aug 2023 13:09:40 +0000 (15:09 +0200)]
Clarify distinction between datetime module and class in deprecation messages (GH-108073)
Matthew James Kraai [Sun, 27 Aug 2023 11:26:23 +0000 (04:26 -0700)]
Fix grammatical error in stringprep documentation (#108414)
Remove the word "them", which didn't make grammatical sense.
Co-authored-by: KRAAI, MATTHEW [VISUS] <mkraai@its.jnj.com>
R [Sun, 27 Aug 2023 07:22:27 +0000 (15:22 +0800)]
gh-105052:update timeit function's description (#105060)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
qqwqqw689 [Sun, 27 Aug 2023 05:19:49 +0000 (13:19 +0800)]
gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} (#107486)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Dong-hee Na [Sun, 27 Aug 2023 03:31:29 +0000 (12:31 +0900)]
gh-107265: Fix initialize/remove_tools for ENTER_EXECUTOR case (gh-108482)
Jelle Zijlstra [Sun, 27 Aug 2023 00:13:33 +0000 (17:13 -0700)]
gh-108295: Fix crashes with TypeVar weakrefs (#108517)
Serhiy Storchaka [Sat, 26 Aug 2023 21:35:06 +0000 (00:35 +0300)]
gh-107913: Fix possible losses of OSError error codes (GH-107930)
Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
denballakh [Sat, 26 Aug 2023 09:54:16 +0000 (14:54 +0500)]
gh-107406: Add better `struct.Struct` repr (#107407)
Victor Stinner [Sat, 26 Aug 2023 02:05:17 +0000 (04:05 +0200)]
gh-106320: Remove private AC converter functions (#108505)
Move these private functions to the internal C API
(pycore_abstract.h):
* _Py_convert_optional_to_ssize_t()
* _PyNumber_Index()
Argument Clinic now emits #include "pycore_abstract.h" when these
functions are used.
The parser of the c-analyzer tool now uses a list of files which use
the limited C API, rather than a list of files using the internal C
API.
Victor Stinner [Sat, 26 Aug 2023 01:18:09 +0000 (03:18 +0200)]
gh-106320: Remove private _PyLong_FileDescriptor_Converter() (#108503)
Move the private _PyLong converter functions to the internal C API
* _PyLong_FileDescriptor_Converter(): moved to pycore_fileutils.h
* _PyLong_Size_t_Converter(): moved to pycore_long.h
Argument Clinic now emits includes for pycore_fileutils.h and
pycore_long.h when these functions are used.
Victor Stinner [Sat, 26 Aug 2023 00:24:27 +0000 (02:24 +0200)]
gh-106320: Remove private _PyLong converter functions (#108499)
Move these private functions to the internal C API (pycore_long.h):
* _PyLong_UnsignedInt_Converter()
* _PyLong_UnsignedLongLong_Converter()
* _PyLong_UnsignedLong_Converter()
* _PyLong_UnsignedShort_Converter()
Argument Clinic now emits #include "pycore_long.h" when these
functions are used.
Victor Stinner [Fri, 25 Aug 2023 22:39:24 +0000 (00:39 +0200)]
gh-108494: AC supports pos-only args in limited C API (#108498)
AC now checks for "#define Py_LIMITED_API" pattern to use the limited
C API.
Victor Stinner [Fri, 25 Aug 2023 22:01:10 +0000 (00:01 +0200)]
gh-107603: Argument Clinic can emit includes (#108486)
* Add Clinic.add_include() method
* Add CConverter.include and CConverter.add_include()
* Printer.print_block() gets a second parameter: clinic.
* Remove duplicated declaration of "clinic" global variable.
Victor Stinner [Fri, 25 Aug 2023 21:22:08 +0000 (23:22 +0200)]
gh-108494: Argument Clinic partial supports of Limited C API (#108495)
Argument Clinic now has a partial support of the
Limited API:
* Add --limited option to clinic.c.
* Add '_testclinic_limited' extension which is built with
the limited C API version 3.13.
* For now, hardcode in clinic.py that "_testclinic_limited.c" targets
the limited C API.
Brandt Bucher [Fri, 25 Aug 2023 19:12:59 +0000 (12:12 -0700)]
GH-106581: Fix instrumentation in tier 2 (GH-108493)
Irit Katriel [Fri, 25 Aug 2023 18:33:59 +0000 (19:33 +0100)]
gh-107901: add the HAS_EVAL_BREAK instruction flag (#108375)
Alex Waygood [Fri, 25 Aug 2023 17:08:29 +0000 (18:08 +0100)]
gh-104504: Cases generator: enable mypy's `possibly-undefined` error code (#108454)
Philipp A [Fri, 25 Aug 2023 16:53:11 +0000 (18:53 +0200)]
gh-102211: Document `re.{Pattern,Match}`’s existence (#102212)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Guido van Rossum [Fri, 25 Aug 2023 16:40:27 +0000 (09:40 -0700)]
gh-108311: Fix test_store_attr_with_hint by disabling optimizer in decorator (#108312)
See https://github.com/python/cpython/issues/108311#issuecomment-
1693569380
---------
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
Dong-hee Na [Fri, 25 Aug 2023 15:23:39 +0000 (00:23 +0900)]
gh-107265: Revert "Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR" (#108485)
This reverts commit
d6ac5c7b105fe57266bd71248e3ada41fedb5ba9 .
Reason: the assert we just added could be triggered (see issue).
Mariusz Felisiak [Fri, 25 Aug 2023 12:31:52 +0000 (14:31 +0200)]
gh-108364: Simplify quoting values and identifiers in sqlite3's iterdump() (#108472)
Mark Shannon [Fri, 25 Aug 2023 12:02:10 +0000 (13:02 +0100)]
gh-107932: Fix merge conflict in test_dis (GH-108478)
Fix merge conflict in test_dis
Erlend E. Aasland [Fri, 25 Aug 2023 11:28:47 +0000 (13:28 +0200)]
Docs: Resolve Sphinx warnings in dis.rst (#108476)
- Link to the code objects reference
- Suppress link to deliberately undocumented builtins.__build_class__
- Suppress links for example methods
Adam Turner [Fri, 25 Aug 2023 11:02:36 +0000 (12:02 +0100)]
Datamodel: Add headings to the standard type hierarchy (#108146)
Dedent content according to the new layout.