IDLE
- bpo-35668 [https://bugs.python.org/issue?@action=redirect&bpo=35668]: Add docstrings to the IDLE debugger module. Fix two bugs: initialize
Idb.botframe
(should be in Bdb); inIdb.in_rpc_code
, check whetherprev_frame
isNone
before trying to use it. Greatly expand test_debugger.
工具/示例
- gh-111903 [https://github.com/python/cpython/issues/111903]: Argument Clinic now supports the
@critical_section
directive that instructs Argument Clinic to generate a critical section around the function call, which locks theself
object in--disable-gil
builds. Patch by Sam Gross.
C API
gh-112026 [https://github.com/python/cpython/issues/112026]: Add again the private
PyThreadStateUncheckedGet()
function as an alias to the new publicPyThreadState_GetUnchecked()
function. Patch by Victor Stinner.gh-112026 [https://github.com/python/cpython/issues/112026]: Restore the removed
PyDictGetItemStringWithError()
function. It is used by numpy. Patch by Victor Stinner.gh-112026 [https://github.com/python/cpython/issues/112026]: Restore removed private C API functions, macros and structures which have no simple replacement for now:
PyDictGetItem_KnownHash()
PyDictNewPresized()
PyHASHBITS
PyHASHIMAG
PyHASHINF
PyHASHMODULUS
PyHASHMULTIPLIER
PyLongCopy()
PyLongFromDigits()
PyLongNew()
PyLongSign()
PyObjectCallMethodId()
PyObjectCallMethodNoArgs()
PyObjectCallMethodOneArg()
PyObjectCallOneArg()
PyObjectEXTRA_INIT
PyObjectFastCallDict()
PyObjectGetAttrId()
PyObjectVectorcall()
PyObjectVectorcallMethod()
PyStackAsDict()
PyThreadCurrentFrames()
_PyUnicodeWriter structure
PyUnicodeWriterDealloc()
PyUnicodeWriterFinish()
PyUnicodeWriterInit()
PyUnicodeWriterPrepare()
PyUnicodeWriterPrepareKind()
PyUnicodeWriterWriteASCIIString()
PyUnicodeWriterWriteChar()
PyUnicodeWriterWriteLatin1String()
PyUnicodeWriterWriteStr()
PyUnicodeWriterWriteSubstring()
PyUnicodeAsString()
PyUnicodeFromId()
PyVectorcallFunction()
PyIDENTIFIER()
Pyc_abs()
Pyc_diff()
Pyc_neg()
Pyc_pow()
Pyc_prod()
Pyc_quot()
Pyc_sum()
Pystatic_string()
Pystatic_string_init()
Patch by Victor Stinner.
gh-112026 [https://github.com/python/cpython/issues/112026]: Add again
and
includes inPython.h
, but don't include them in the limited C API version 3.13 and newer. Patch by Victor Stinner.gh-111956 [https://github.com/python/cpython/issues/111956]: Add internal-only one-time initialization API:
_PyOnceFlag
and_PyOnceFlag_CallOnce
.gh-111262 [https://github.com/python/cpython/issues/111262]: Add
PyDict_Pop()
andPyDict_PopString()
functions: remove a key from a dictionary and optionally return the removed value. This is similar todict.pop()
, but without the default value and not raisingKeyError
if the key missing. Patch by Stefan Behnel and Victor Stinner.gh-111863 [https://github.com/python/cpython/issues/111863]: Rename
Py_NOGIL
toPy_GIL_DISABLED
. Patch by Hugo van Kemenade.gh-111138 [https://github.com/python/cpython/issues/111138]: Add
PyList_Extend()
andPyList_Clear()
functions: similar to Pythonlist.extend()
andlist.clear()
methods. Patch by Victor Stinner.gh-108765 [https://github.com/python/cpython/issues/108765]: On Windows,
Python.h
no longer includes the
standard header file. If needed, it should now be included explicitly. Patch by Victor Stinner.gh-111569 [https://github.com/python/cpython/issues/111569]: Implement "Python Critical Sections" from PEP 703 [https://peps.python.org/pep-0703/]. These are macros to help replace the GIL with perobject locks in the
--disable-gil
build of CPython. The macros are no-ops in the default build.gh-111506 [https://github.com/python/cpython/issues/111506]: In the limited C API version 3.13,
Py_SET_REFCNT()
function is now implemented as an opaque function call. Patch by Victor Stinner.gh-108082 [https://github.com/python/cpython/issues/108082]: Add
PyErr_FormatUnraisable()
function.gh-110964 [https://github.com/python/cpython/issues/110964]: Move the undocumented private _PyArg functions and PyArgParser structure to internal C API (
pycore_modsupport.h
). Patch by Victor Stinner.gh-110815 [https://github.com/python/cpython/issues/110815]: Support nonASCII keyword names in
PyArg_ParseTupleAndKeywords()
.gh-109587 [https://github.com/python/cpython/issues/109587]: Introduced
PyUnstable_PerfTrampoline_CompileCode()
,PyUnstable_PerfTrampoline_SetPersistAfterFork()
andPyUnstable_CopyPerfMapFile()
. These functions allow extension modules to initialize trampolines eagerly, after the application is "warmed up". This makes it possible to have perf-trampolines running in an always-enabled fashion.gh-85283 [https://github.com/python/cpython/issues/85283]: Add the
PySys_Audit()
function to the limited C API. Patch by Victor Stinner.gh-85283 [https://github.com/python/cpython/issues/85283]: Add
PyMem_RawMalloc()
,PyMem_RawCalloc()
,PyMem_RawRealloc()
andPyMem_RawFree()
to the limited C API. Patch by Victor Stinner.gh-106672 [https://github.com/python/cpython/issues/106672]: Functions
PyDict_GetItem()
,PyDict_GetItemString()
,PyMapping_HasKey()
,PyMapping_HasKeyString()
,PyObject_HasAttr()
,PyObject_HasAttrString()
, andPySys_GetObject()
, which clear all errors occurred during calling the function, report now them usingsys.unraisablehook()
.gh-67565 [https://github.com/python/cpython/issues/67565]: Remove redundant C-contiguity check in
getargs.c
,binascii
,ssl
and Argument Clinic. Patched by Stefan Krah and Furkan Onder
Python 3.13.0 alpha 1
Release date: 2023-10-13