summaryrefslogtreecommitdiffstats
path: root/Doc/extending
Commit message (Collapse)AuthorAgeFilesLines
* gh-101100: Add a table of class attributes to the "Custom classes" section ↵Alex Waygood2024-09-252-2/+2
| | | | of the data model docs (#124480)
* gh-123517: Remove unnecessary ``:meth:`` parentheses (#123518)Wei-Hsiang (Matt) Wang2024-09-011-1/+1
|
* docs: fix a few typos identified by codespell (#119516)Ned Batchelder2024-05-262-2/+2
|
* gh-115172: Fix explicit index extries for the C API (GH-115173)Serhiy Storchaka2024-02-112-5/+5
|
* gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958)Serhiy Storchaka2023-12-041-1/+1
| | | | | | | | | | | Change the declaration of the keywords parameter in functions PyArg_ParseTupleAndKeywords() and PyArg_VaParseTupleAndKeywords() from `char **` to `char * const *` in C and `const char * const *` in C++. It makes these functions compatible with argument of type `const char * const *`, `const char **` or `char * const *` in C++ and `char * const *` in C without explicit type cast. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-101100: Fix Sphinx reference warnings (GH-112416)Hugo van Kemenade2023-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * Fix Sphinx warning in library/xml.rst Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes * Fix Sphinx warning in library/importlib.resources.rst * Use italics for parameters * Link to the exception * Fix Sphinx warning in library/gzip.rst * Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst * Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst * Fix Sphinx warning in extending/newtypes.rst * Fix Sphinx warning in c-api/set.rst On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
* gh-109634: Use :samp: role (GH-109635)Serhiy Storchaka2023-09-231-1/+1
|
* GH-92584: Remove distutils from the newtypes tutorial includes (#108024)Adam Turner2023-08-221-27/+27
|
* gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)Serhiy Storchaka2023-08-221-1/+1
|
* gh-107298: Fix some references in the C API documentation (GH-108072)Serhiy Storchaka2023-08-171-2/+2
|
* GH-92584: Remove Installing Python Modules (Distutils version) (#108020)Adam Turner2023-08-161-0/+1
|
* gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345)Serhiy Storchaka2023-07-274-37/+37
|
* gh-107091: Fix some uses of :attr: role (GH-107318)Serhiy Storchaka2023-07-272-2/+2
| | | | Fix also formatting of PyMethodDef members.
* gh-107298: Fix more Sphinx warnings in the C API doc (#107329)Victor Stinner2023-07-272-41/+41
| | | | | | | | | | | | | | | | | | | | | | | Declare the following functions as macros, since they are actually macros. It avoids a warning on "TYPE" or "macro" argument. * PyMem_New() * PyMem_Resize() * PyModule_AddIntMacro() * PyModule_AddStringMacro() * PyObject_GC_New() * PyObject_GC_NewVar() * PyObject_New() * PyObject_NewVar() Add C standard C types to nitpick_ignore in Doc/conf.py: * int64_t * uint64_t * uintptr_t No longer ignore non existing "__int" type in nitpick_ignore. Update Doc/tools/.nitignore
* gh-107298: Fix doc references to undocumented modules (#107300)Victor Stinner2023-07-262-6/+6
| | | Update also Doc/tools/.nitignore.
* gh-86493: Modernize modules initialization code (GH-106858)Serhiy Storchaka2023-07-252-11/+4
| | | | | Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().
* gh-107091: Fix the use of some C domain roles (#107092)Serhiy Storchaka2023-07-231-5/+5
|
* gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920)Serhiy Storchaka2023-07-212-6/+6
|
* gh-104922: Doc: add note about PY_SSIZE_T_CLEAN (#106314)Inada Naoki2023-07-022-2/+11
| | | Add note about PY_SSIZE_T_CLEAN in extending and embedding document.
* Fix inaccuracies in "Assorted Topics" section of "Defining Extension Types" ↵chgnrdv2023-06-161-5/+5
| | | | tutorial (#104969)
* gh-105145: Remove old functions to config Python init (#105154)Victor Stinner2023-06-012-18/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the following old functions to configure the Python initialization, deprecated in Python 3.11: * PySys_AddWarnOptionUnicode() * PySys_AddWarnOption() * PySys_AddXOption() * PySys_HasWarnOptions() * PySys_SetArgvEx() * PySys_SetArgv() * PySys_SetPath() * Py_SetPath() * Py_SetProgramName() * Py_SetPythonHome() * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Most of these functions are kept in the stable ABI, except: * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Update Doc/extending/embedding.rst and Doc/extending/extending.rst to use the new PyConfig API. _testembed.c: * check_stdio_details() now sets stdio_encoding and stdio_errors of PyConfig. * Add definitions of functions removed from the API but kept in the stable ABI. * test_init_from_config() and test_init_read_set() now use PyConfig_SetString() instead of PyConfig_SetBytesString(). Remove _Py_ClearStandardStreamEncoding() internal function.
* gh-104922: Make `PY_SSIZE_T_CLEAN` not mandatory again (#105051)Inada Naoki2023-05-311-3/+3
|
* GH-97950: Use new-style index directive ('builtin') (#104164)Adam Turner2023-05-061-1/+1
| | | | | | | | | | | | | * Uncomment builtin removal in pairindextypes * Use new-style index directive ('builtin') - C API * Use new-style index directive ('builtin') - Extending * Use new-style index directive ('builtin') - Library * Use new-style index directive ('builtin') - Reference * Use new-style index directive ('builtin') - Tutorial
* gh-103712: Increase the length of the type name in AttributeError messages ↵Alex Gaynor2023-04-241-1/+1
| | | | (#103713)
* gh-99202: Fix extension type from documentation for compiling in C++20 mode ↵Jeffrey Newman2023-04-061-2/+2
| | | | (#102518)
* gh-47146: Soft-deprecate structmember.h, expose its contents via Python.h ↵Petr Viktorin2022-11-222-40/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-99014) The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. There are no deprecation warnings. Old code can stay unchanged (unless the extra include and non-namespaced macros bother you greatly). Specifically, no uses in CPython are updated -- that would just be unnecessary churn. The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. Its contents are now available just by including ``Python.h``, with a ``Py`` prefix added if it was missing: - `PyMemberDef`, `PyMember_GetOne` and`PyMember_SetOne` - Type macros like `Py_T_INT`, `Py_T_DOUBLE`, etc. (previously ``T_INT``, ``T_DOUBLE``, etc.) - The flags `Py_READONLY` (previously ``READONLY``) and `Py_AUDIT_READ` (previously all uppercase) Several items are not exposed from ``Python.h``: - `T_OBJECT` (use `Py_T_OBJECT_EX`) - `T_NONE` (previously undocumented, and pretty quirky) - The macro ``WRITE_RESTRICTED`` which does nothing. - The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of `Py_AUDIT_READ`. - In some configurations, ``<stddef.h>`` is not included from ``Python.h``. It should be included manually when using ``offsetof()``. The deprecated header continues to provide its original contents under the original names. Your old code can stay unchanged, unless the extra include and non-namespaced macros bother you greatly. There is discussion on the issue to rename `T_PYSSIZET` to `PY_T_SSIZE` or similar. I chose not to do that -- users will probably copy/paste that with any spelling, and not renaming it makes migration docs simpler. Co-Authored-By: Alexander Belopolsky <abalkin@users.noreply.github.com> Co-Authored-By: Matthias Braun <MatzeB@users.noreply.github.com>
* gh-93358: Fix python-config docs for how to embed Python (#98649)Erlend E. Aasland2022-10-291-6/+6
|
* gh-93738: Disallow pre-v3 syntax in the C domain (#97962)Adam Turner2022-10-062-4/+4
| | | Also, disable using invalid sphinx-lint 0.6.2.
* gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768)Adam Turner2022-10-052-7/+7
| | | | | :c:type:`<C type>` -> :c:expr:`<C type>` Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-93738: Documentation C syntax (Function glob patterns -> literal markup) ↵Adam Turner2022-10-051-3/+3
| | | | (#97774)
* GH-95245: Document use of `MANAGED` flags instead of offsets. (GH-96044)Mark Shannon2022-08-301-24/+9
|
* gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS ↵Serhiy Storchaka2022-08-041-2/+2
| | | | | | | | | | (GH-95527) If an HTTP link is redirected to a same looking HTTPS link, the latter can be used directly without changes in readability and behavior. It protects from a men-in-the-middle attack. This change does not affect Python examples.
* gh-85454: Remove distutils documentation (#95239)Christian Heimes2022-07-252-122/+12
| | | | Most places now refer to setuptools or link to setuptools documentation. Some examples like zipapp need to be updated later.
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Ned Batchelder2022-07-052-3/+3
| | | | | (GH-94551) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
* gh-76773: Update docs mentioning no-longer-supported Windows versions & ↵CAM Gerlach2022-05-101-3/+1
| | | | features (GH-92529)
* gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)Oleg Iarygin2022-04-181-2/+2
| | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-45790: List macros in same order in which fields are described (GH-29529)rtobar2022-04-051-2/+2
| | | | | Signed-off-by: Rodrigo Tobar <rtobar@icrar.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-25381: Update explanation of exceptions in C. (GH-26838)Terry Jan Reedy2021-11-151-7/+5
| | | | | | | | | | | | | | * bpo-25381: Update explanation of exception globals This paragraph in extending/extending.rst was unchanged (except for NULL markup) since committed in 2007 Aug 15 for 2.6 alpha. * Respond to reviews and remove duplication. * Update Doc/extending/extending.rst Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45633: Fix newtypes doc typo (GH-29318)Dmitry Smirnov2021-11-021-1/+1
|
* bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)Sam Gross2021-10-271-1/+13
| | | | | Objects that support garbage collection ("container" objects) should call PyObject_GC_UnTrack() from their destructors before clearing any fields which may point to other "container" objects.
* bpo-42800: Rename AUDIT_READ to PY_AUDIT_READ (GH-25736)Steve Dower2021-04-301-4/+4
|
* bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)Ryan Hileman2021-04-291-5/+10
| | | | | | | | | | Accessing the following attributes will now fire PEP 578 style audit hooks as ("object.__getattr__", obj, name): * PyTracebackObject: tb_frame * PyFrameObject: f_code * PyGenObject: gi_code, gi_frame * PyCoroObject: cr_code, cr_frame * PyAsyncGenObject: ag_code, ag_frame Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED. Update obsolete flag documentation.
* bpo-43774: Remove --without-cycle-gc doc (GH-25364)Victor Stinner2021-04-121-6/+1
| | | | | The configure --without-cycle-gc option has been removed in Python 2.3 by the commit cccd1e72481106b0a373117f32fda6261f3141a7. It's now time to remove the last reference to it in the documentation.
* bpo-43739: Add type declaration Doc/extending/extending.rst exampleShreyan Avigyan2021-04-101-1/+1
|
* bpo-43774: Document configure options (GH-25283)Victor Stinner2021-04-082-2/+3
| | | | | | Add Doc/using/configure.rst documentation to document configure, preprocessor, compiler and linker options. Add a new section about the "Python debug build".
* bpo-42802: Remove distutils bdist_wininst command (GH-24043)Victor Stinner2021-01-081-1/+0
| | | | | | | | | | The distutils bdist_wininst command deprecated in Python 3.8 has been removed. The distutils bidst_wheel command is now recommended to distribute binary packages on Windows. * Remove Lib/distutils/command/bdist_wininst.py * Remove PC/bdist_wininst/ project * Remove Lib/distutils/command/wininst-*.exe programs * Remove all references to bdist_wininst
* bpo-40204: Fix reference to terms in the doc (GH-21865)Victor Stinner2020-08-141-1/+1
| | | | | | | | Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead.
* bpo-40279: Add some error-handling to the module initialisation docs example ↵Cajetan Rodrigues2020-04-251-3/+11
| | | | (GH-19705)
* bpo-38600: NULL -> ``NULL``. (GH-17001)Serhiy Storchaka2019-10-301-1/+1
| | | Also fix some other formatting.
* bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)Serhiy Storchaka2019-10-304-57/+57
| | | | Replace all *NULL* with ``NULL``.