summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal ↵Joannah Nanjekye2019-10-041-0/+8
| | | | | (GH-16558) Revert the removal of PyThreadState_DeleteCurrent() with documentation.
* bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)Victor Stinner2019-10-011-25/+10
| | | | PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no longer return PyStatus: they cannot fail anymore.
* bpo-38304: Remove PyConfig.struct_size (GH-16500) (GH-16508)Victor Stinner2019-10-011-36/+3
| | | | | | | For now, we'll rely on the fact that the config structures aren't covered by the stable ABI. We may revisit this in the future if we further explore the idea of offering a stable embedding API. (cherry picked from commit bdace21b769998396d0ccc8da99a8ca9b507bfdf)
* bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)Victor Stinner2019-09-291-1/+7
| | | | | | | | | Fix warnings options priority: PyConfig.warnoptions has the highest priority, as stated in the PEP 587. * Document options order in PyConfig.warnoptions documentation. * Make PyWideStringList_INIT macro private: replace "Py" prefix with "_Py". * test_embed: add test_init_warnoptions().
* bpo-38304: Add PyConfig.struct_size (GH-16451)Victor Stinner2019-09-281-5/+39
| | | | | | | | | | | | | | | | | Add a new struct_size field to PyPreConfig and PyConfig structures to allow to modify these structures in the future without breaking the backward compatibility. * Replace private _config_version field with public struct_size field in PyPreConfig and PyConfig. * Public PyPreConfig_InitIsolatedConfig() and PyPreConfig_InitPythonConfig() return type becomes PyStatus, instead of void. * Internal _PyConfig_InitCompatConfig(), _PyPreConfig_InitCompatConfig(), _PyPreConfig_InitFromConfig(), _PyPreConfig_InitFromPreConfig() return type becomes PyStatus, instead of void. * Remove _Py_CONFIG_VERSION * Update the Initialization Configuration documentation.
* bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)Ammar Askar2019-09-272-5/+22
| | | | | | | | | | | | | | As mentioned in the bpo ticket, this mistake came up on two reviews: - https://github.com/python/cpython/pull/16127#pullrequestreview-288312751 - https://github.com/python/cpython/pull/16071#pullrequestreview-287819525 Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry. https://bugs.python.org/issue38206 Automerge-Triggered-By: @encukou
* bpo-38234: Complete init config documentation (GH-16404)Victor Stinner2019-09-261-23/+37
|
* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)Victor Stinner2019-09-261-5/+14
| | | | | | | | | | | | * Add test_embed.test_init_setpath_config(): test Py_SetPath() with PyConfig. * test_init_setpath() and test_init_setpythonhome() no longer call Py_SetProgramName(), but use the default program name. * _PyPathConfig: isolated, site_import and base_executable fields are now only available on Windows. * If executable is set explicitly in the configuration, ignore calculated base_executable: _PyConfig_InitPathConfig() copies executable to base_executable. * Complete path config documentation.
* bpo-38140: Document offsets in PyMemberDef (GH-16354)Petr Viktorin2019-09-252-1/+17
| | | | | | bpo-38140: Document offsets in PyMemberDef Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)Victor Stinner2019-09-241-2/+6
| | | | | | | Py_SetPath() now sets sys.executable to the program full path (Py_GetProgramFullPath()), rather than to the program name (Py_GetProgramName()). Fix also memory leaks in pathconfig_set_from_config().
* bpo-38236: Dump path config at first import error (GH-16300)Victor Stinner2019-09-231-1/+11
| | | | Python now dumps path configuration if it fails to import the Python codecs of the filesystem and stdio encodings.
* bpo-38140: Make dict and weakref offsets opaque for C heap types (#16076)Eddie Elizondo2019-09-191-2/+1
| | | | | | * Make dict and weakref offsets opaque for C heap types * Add news
* bpo38158: Removing nonexistant member "doc" from PyType_Spec documentation ↵t k2019-09-151-4/+0
| | | | (GH-16142)
* bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)Julien Palard2019-09-131-6/+0
|
* Emphasize the need to always call PySequence_Fast. (GH-11140)Matti Picus2019-09-121-7/+14
|
* bpo-37363: Document internal audit events (GH-14663)Christian Heimes2019-09-121-1/+6
| | | | | | | | | Three internal cpython events were not documented, yet. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37363
* bpo-26868: Fix example usage of PyModule_AddObject. (#15725)Brandt Bucher2019-09-121-1/+16
| | | | | | | | | | | | | | | | * Add a note to the PyModule_AddObject docs. * Correct example usages of PyModule_AddObject. * Whitespace. * Clean up wording. * 📜🤖 Added by blurb_it. * First code review. * Add < 0 in the tests with PyModule_AddObject
* bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992)Hai Shi2019-09-111-2/+2
| | | https://bugs.python.org/issue37698
* bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988)Hai Shi2019-09-111-0/+7
| | | | | | | https://bugs.python.org/issue37750 Automerge-Triggered-By: @matrixise
* bpo-38103: fix conflicting labels in the docs. (GH-15906)Ezio Melotti2019-09-111-2/+2
|
* Docs: Small tweaks to c-api/intro#Include_Files (GH-14698)Kyle Stanley2019-09-101-7/+9
|
* bpo-36971: add subsections in C API "Common Object Structures" page (#13446)Jeroen Demeyer2019-09-101-0/+10
|
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131)Nick Coghlan2019-08-251-3/+0
| | | | | | | | | | | | | | | - drop TargetScopeError in favour of raising SyntaxError directly as per the updated PEP 572 - comprehension iteration variables are explicitly local, but named expression targets in comprehensions are nonlocal or global. Raise SyntaxError as specified in PEP 572 - named expression targets in the outermost iterable of a comprehension have an ambiguous target scope. Avoid resolving that question now by raising SyntaxError. PEP 572 originally required this only for cases where the bound name conflicts with the iteration variable in the comprehension, but CPython can't easily restrict the exception to that case (as it doesn't know the target variable names when visiting the outermost iterator expression)
* bpo-36763, doc: Add links in the new C API init doc (GH-15433)Victor Stinner2019-08-232-0/+4
|
* bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)Victor Stinner2019-08-231-2/+6
|
* Unmark files as executable that can't actually be executed. (GH-15353)Greg Price2019-08-211-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are plenty of legitimate scripts in the tree that begin with a `#!`, but also a few that seem to be marked executable by mistake. Found them with this command -- it gets executable files known to Git, filters to the ones that don't start with a `#!`, and then unmarks them as executable: $ git ls-files --stage \ | perl -lane 'print $F[3] if (!/^100644/)' \ | while read f; do head -c2 "$f" | grep -qxF '#!' \ || chmod a-x "$f"; \ done Looking at the list by hand confirms that we didn't sweep up any files that should have the executable bit after all. In particular * The `.psd` files are images from Photoshop. * The `.bat` files sure look like things that can be run. But we have lots of other `.bat` files, and they don't have this bit set, so it must not be needed for them. Automerge-Triggered-By: @benjaminp
* bpo-15913: Implement PyBuffer_SizeFromFormat() (GH-13873)Joannah Nanjekye2019-08-201-2/+4
| | | | Implement PyBuffer_SizeFromFormat() function (previously documented but not implemented): call struct.calcsize().
* Insert a missing close parenthesis (GH-15316)cocoatomo2019-08-171-1/+1
|
* bpo-37540: vectorcall: keyword names must be strings (GH-14682)Jeroen Demeyer2019-08-162-2/+3
| | | | | | | | The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
* bpo-36487: Make C-API docs clear about what the main interpreter is. (gh-12666)Joannah Nanjekye2019-08-021-4/+12
|
* bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)Hai Shi2019-07-311-0/+6
|
* Remove trailing .0 from version changed note (GH-14987)Nick Coghlan2019-07-281-1/+1
|
* Docs: Correct formatting of a multiline code block (GH-13806)Joseph Fox-Rabinovitz2019-07-171-2/+4
|
* bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)sgal2019-07-161-3/+1
| | | | | | | | | | | | | | | | * Remove a vague statement in documentation * Remove another vague sentence A sentence starting with "So it should be possible..." shouldn't be in the docs either. Co-Authored-By: Kyle Stanley <aeros167@gmail.com> * Include the removal of the previous line Co-Authored-By: Kyle Stanley <aeros167@gmail.com> * Remove an extra space
* Remove redundant docs of PyEval_EvalFrameEx (GH-14765)Hai Shi2019-07-141-6/+6
|
* bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)Jeroen Demeyer2019-07-111-0/+12
|
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-081-0/+11
|
* bpo-37487: Fix PyList_GetItem index description. (GH-14623)Terry Jan Reedy2019-07-061-3/+3
| | | 0 is a legal index.
* closes bpo-37508: Fix name of type in memory.rst. (GH-14604)Hai Shi2019-07-061-1/+1
|
* 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.