summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-041-0/+11
|
* bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)Hai Shi2019-07-031-1/+1
|
* bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)Victor Stinner2019-07-011-0/+7
|
* bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set ↵Pablo Galindo2019-07-011-10/+11
| | | | | | PyCode_New as a compatibility wrapper (GH-13959) Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper
* bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)Jeroen Demeyer2019-06-281-0/+22
|
* bpo-37432: Doc: Fix signature of PyObject_Del() (GH-14430)Hai Shi2019-06-281-1/+1
|
* bpo-37390: Add audit event table to documentations (GH-14406)Steve Dower2019-06-272-5/+1
| | | Also updates some (unreleased) event names to be consistent with the others.
* bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)Hai Shi2019-06-201-1/+1
| | | It was listed as `binaryfunc`. It should be `unaryfunc`.
* bpo-36710: Remove PyImport_Cleanup() function (GH-14221)Victor Stinner2019-06-191-15/+0
| | | | | | | * Rename PyImport_Cleanup() to _PyImport_Cleanup() and move it to the internal C API. Add 'tstate' parameters. * Remove documentation of _PyImport_Init(), PyImport_Cleanup(), _PyImport_Fini(). All three were documented as "For internal use only.".
* bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)Victor Stinner2019-06-171-1/+2
| | | | Explain in the doc why PyObject_CallNoArgs() should be preferred over other existing ways to call a function without any arguments.
* bpo-37194: Complete PyObject_CallXXX() docs (GH-14156)Victor Stinner2019-06-171-8/+16
| | | | Mention explicitly that PyObject_CallXXX() functions raise an exception an failure.
* bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)Victor Stinner2019-06-171-0/+10
| | | | | | | | | | | | | | | Add a new public PyObject_CallNoArgs() function to the C API: call a callable Python object without any arguments. It is the most efficient way to call a callback without any argument. On x86-64, for example, PyObject_CallFunctionObjArgs(func, NULL) allocates 960 bytes on the stack per call, whereas PyObject_CallNoArgs(func) only allocates 624 bytes per call. It is excluded from stable ABI 3.8. Replace private _PyObject_CallNoArg() with public PyObject_CallNoArgs() in C extensions: _asyncio, _datetime, _elementtree, _pickle, _tkinter and readline.
* bpo-28805: document METH_FASTCALL (GH-14079)Jeroen Demeyer2019-06-161-12/+51
|
* bpo-37253: Fix typo in PyCompilerFlags doc (GH-14036)Victor Stinner2019-06-131-1/+1
| | | Remove ";" to fix Sphinx formatting.
* bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019)Victor Stinner2019-06-131-4/+15
| | | | | * Update PyCompilerFlags structure documentation. * Document the new cf_feature_version field in the Changes in the C API section of the What's New in Python 3.8 doc.
* bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)Zackery Spytz2019-06-061-2/+4
|
* bpo-36974: document PEP 590 (GH-13450)Jeroen Demeyer2019-06-022-122/+276
|
* bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)Serhiy Storchaka2019-06-012-1/+11
|
* bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)Pablo Galindo2019-06-011-1/+1
|
* bpo-37122: Make co->co_argcount represent the total number of positonal ↵Pablo Galindo2019-06-011-0/+2
| | | | arguments in the code object (GH-13726)
* Document changes for PyCode_New regarding PEP570 (GH-13706)Pablo Galindo2019-05-311-0/+3
|
* bpo-32388: Remove cross-version binary compatibility requirement in tp_flags ↵Antoine Pitrou2019-05-291-0/+5
| | | | | | | | (GH-4944) It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags. This will reduce the risk of running out of bits in the 32-bit tp_flags value.
* bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)Pablo Galindo2019-05-281-1/+1
| | | | | | | | | | | | | | | | | | * bpo-36540: Documentation for PEP570 - Python positional only arguments * fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments * Update reference for compound statements * Apply suggestions from Carol Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Update Doc/tutorial/controlflow.rst Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Add extra bullet point and minor edits
* bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980)Zackery Spytz2019-05-281-0/+12
|
* bpo-36922: implement PEP-590 Py_TPFLAGS_METHOD_DESCRIPTOR (GH-13338)Jeroen Demeyer2019-05-281-0/+26
| | | Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-36763: Implement the PEP 587 (GH-13592)Victor Stinner2019-05-273-0/+1026
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a whole new documentation page: "Python Initialization Configuration" * PyWideStringList_Append() return type is now PyStatus, instead of int * PyInterpreterState_New() now calls PyConfig_Clear() if PyConfig_InitPythonConfig() fails. * Rename files: * Python/coreconfig.c => Python/initconfig.c * Include/cpython/coreconfig.h => Include/cpython/initconfig.h * Include/internal/: pycore_coreconfig.h => pycore_initconfig.h * Rename structures * _PyCoreConfig => PyConfig * _PyPreConfig => PyPreConfig * _PyInitError => PyStatus * _PyWstrList => PyWideStringList * Rename PyConfig fields: * use_module_search_paths => module_search_paths_set * module_search_path_env => pythonpath_env * Rename PyStatus field: _func => func * PyInterpreterState: rename core_config field to config * Rename macros and functions: * _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv() * _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv() * _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString() * _PyInitError_Failed() => PyStatus_Exception() * _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx * _Py_UnixMain() => Py_BytesMain() * _Py_ExitInitError() => Py_ExitStatusException() * _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs() * _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs() * _Py_PreInitialize() => Py_PreInitialize() * _Py_RunMain() => Py_RunMain() * _Py_InitializeFromConfig() => Py_InitializeFromConfig() * _Py_INIT_XXX() => _PyStatus_XXX() * _Py_INIT_FAILED() => _PyStatus_EXCEPTION() * Rename 'err' PyStatus variables to 'status' * Convert RUN_CODE() macro to config_run_code() static inline function * Remove functions: * _Py_InitializeFromArgs() * _Py_InitializeFromWideArgs() * _PyInterpreterState_GetCoreConfig()
* Support Py_UNUSED() on clang (GH-13544)Victor Stinner2019-05-241-1/+1
|
* Fix typo: decription -> description (GH-13543)Xtreak2019-05-241-1/+1
|
* bpo-34626: Document creating heap types from the C-API (GH-9154)Petr Viktorin2019-05-242-17/+127
| | | | | | | bpo-34626: Document creating heap types from the C-API Add missing descriptions of PEP384's PyType_Spec and PyType_Slot, along with some introductory prose.
* bpo-23395: Fix PyErr_SetInterrupt if the SIGINT signal is ignored or not ↵Matěj Cepl2019-05-231-6/+6
| | | | | handled (GH-7778) ``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
* bpo-36842: Implement PEP 578 (GH-12613)Steve Dower2019-05-233-0/+77
| | | Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
* bpo-36829: Add sys.unraisablehook() (GH-13187)Victor Stinner2019-05-221-0/+5
| | | | | | | | | | | | | | | | | | | Add new sys.unraisablehook() function which can be overridden to control how "unraisable exceptions" are handled. It is called when an exception has occurred but there is no way for Python to handle it. For example, when a destructor raises an exception or during garbage collection (gc.collect()). Changes: * Add an internal UnraisableHookArgs type used to pass arguments to sys.unraisablehook. * Add _PyErr_WriteUnraisableDefaultHook(). * The default hook now ignores exception on writing the traceback. * test_sys now uses unittest.main() to automatically discover tests: remove test_main(). * Add _PyErr_Init(). * Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr while using it
* Doc: Replace the deprecated highlightlang directive by highlight. (#13377)Stéphane Wirtel2019-05-1758-58/+58
| | | | highlightlang is deprecated since April 2018 in Sphinx. See https://github.com/sphinx-doc/sphinx/pull/4845
* bpo-36728: Remove PyEval_ReInitThreads documentation (GH-13282)Victor Stinner2019-05-131-7/+0
|
* bpo-36783: Add new references for C API Documentation changes (GH-13204)Edison A2019-05-131-6/+6
|
* bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)toonarmycaptain2019-05-081-12/+12
| | | | Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized. Changed multiple instances.
* bpo-36783: Added C API Documentation for Time_FromTimeAndFold and ↵Edison A2019-05-071-0/+16
| | | | | | PyDateTime_FromDateAndTimeAndFold (GH-13147)
* Doc/c-api/exceptions.rst: fix grammar (#12091)Daniel Hahler2019-05-061-2/+2
| | | | | | | | | | | * Doc/c-api/exceptions.rst: fix grammar skip issue skip news * Use ", in that case" Co-Authored-By: blueyed <github@thequod.de>
* bpo-36475: Finalize PyEval_AcquireLock() and PyEval_AcquireThread() properly ↵Joannah Nanjekye2019-04-291-0/+24
| | | | | | | | (GH-12667) PyEval_AcquireLock() and PyEval_AcquireThread() now terminate the current thread if called while the interpreter is finalizing, making them consistent with PyEval_RestoreThread(), Py_END_ALLOW_THREADS, and PyGILState_Ensure().
* bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can ↵Pablo Galindo2019-04-131-0/+12
| | | | | | | | terminate the calling thread (GH-12541) Calling these function from a thread when the runtime is finalizing will terminate the thread, even if the thread was not created by Python. Users can use _Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of being finalized before calling this function to avoid unwanted termination.
* Doc: define PY_SSIZE_T_CLEAN always (GH-12794)Inada Naoki2019-04-131-1/+5
|
* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)Victor Stinner2019-04-111-2/+9
| | | | | Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD, 0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte patterns than Windows CRT debug malloc() and free().
* Correct "inplace" with "in-place" (GH-10480)Andre Delfino2019-04-081-2/+2
|
* bpo-36157:Document PyInterpreterState_Main() (GH-12238)Joannah Nanjekye2019-04-011-0/+5
| | | | | | | I have added documentation for `PyInterpreterState_Main()`. I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` . https://bugs.python.org/issue36157
* bpo-20844: open script file with "rb" mode (GH-12616)Inada Naoki2019-04-011-0/+4
|
* C API docs: Py_IsInitialized is always safe to call (GH-12630)Nick Coghlan2019-03-301-0/+1
|
* bpo-36124: Add PyInterpreterState.dict. (gh-12132)Eric Snow2019-03-151-0/+12
|
* Add the meaning of the returned value of PyTypeObject.tp_init (GH-12325)Stéphane Wirtel2019-03-151-0/+2
|
* bpo-36185: Fix typo in Doc/c-api/objbuffer.rst. (GH-12204)Emmanuel Arias2019-03-071-1/+1
|
* bpo-31904: Add encoding support for VxWorks RTOS (GH-12051)pxinwr2019-03-042-6/+6
| | | | | | | | Use UTF-8 as the system encoding on VxWorks. The main reason are: 1. The locale is frequently misconfigured. 2. Missing some functions to deal with locale in VxWorks C library.