summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] Docs: Fix backtick errors found by sphinx-lint (GH-97998) (#98371)C.A.M. Gerlach2022-10-222-2/+2
| | | | | | | | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>. (cherry picked from commit fa2d43e5184f5eaf3391844ec2400342a1b2ead4) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-95913: Fix and copyedit New Features section of 3.11 What's New (GH-95915)Miss Islington (bot)2022-10-221-2/+2
| | | | | (cherry picked from commit 8ee27e33182e6d9040e79f6ccc9219afa049d40e) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-93738: Documentation C syntax (:c:data:`0` -> ``0``) (GH-97771)Miss Islington (bot)2022-10-221-1/+1
| | | | | | :c:data:`0` -> ``0`` (cherry picked from commit 5e997cff3e1dea24241726338457611beb8882ec) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyUnicodeObject*` -> ↵Miss Islington (bot)2022-10-221-1/+1
| | | | | | | | :c:expr:`PyUnicodeObject*`) (GH-97783) (#97859) :c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*` (cherry picked from commit 898834e27b82bd1f3532b6448a862a7a9cdeff66) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyBytesObject*` -> ↵Miss Islington (bot)2022-10-221-1/+1
| | | | | | | | :c:expr:`PyBytesObject*`) (GH-97782) (#97861) :c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*` (cherry picked from commit 9ebc50866b58a0ee2985c6540a67fee8a4a49e4d) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyTupleObject*` -> ↵Miss Islington (bot)2022-10-221-1/+1
| | | | | | | | :c:expr:`PyTupleObject*`) (GH-97780) (#97863) :c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*` (cherry picked from commit 510baa429affb832d7b4ed68182e59daa2815d2e) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) ↵Miss Islington (bot)2022-10-223-8/+8
| | | | | | | | (GH-97769) (#97871) :c:type:`FILE` -> :c:expr:`FILE` (cherry picked from commit 192d401ba53224020f5f9ca6e1ff2c9f89511ac4) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) ↵Miss Islington (bot)2022-10-221-2/+2
| | | | | | | | (GH-97770) (#97874) :c:type:`TYPE` -> :c:expr:`TYPE` (cherry picked from commit 8b211b4cdbcddecfcc4d1682864795b5f1438c59) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> ↵Miss Islington (bot)2022-10-221-1/+1
| | | | | | | | :c:expr:`PyInterpreterState *`) (GH-97777) (#97865) :c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *` (cherry picked from commit 4ebb0250314b57637d213cd5bc5f5ce5dd911d94) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:data:`view->obj` -> ↵Miss Islington (bot)2022-10-221-5/+5
| | | | | | | | :c:expr:`view->obj`) (GH-97773) (#97867) :c:data:`view->obj` -> :c:expr:`view->obj` (cherry picked from commit fa59bda8d30ea0b6c19007205b57c800c944304c) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyObject` -> ↵Miss Islington (bot)2022-10-229-29/+29
| | | | | | | | :c:expr:`PyObject`) (GH-97776) (#97889) :c:type:`PyObject` -> :c:expr:`PyObject` (cherry picked from commit 0bf6a617ed1832bc4803e532c8d6b3427cf48b13) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) ↵Miss Islington (bot)2022-10-222-4/+4
| | | | | | (GH-97775) (#97873) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (Use `c:struct`) (GH-97772) (#97869)Miss Islington (bot)2022-10-222-5/+5
| | | | | | Use `c:struct` (cherry picked from commit a0f5599aac2037da715d09733e0a83a9cba7c37a) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> ↵Miss Islington (bot)2022-10-222-3/+3
| | | | | | | | :c:expr:`PyTypeObject*`) (GH-97778) (#97892) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit c70c8b69762f720377adaf22f2e5ec6496a7be53) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Documentation C syntax (Function glob patterns -> literal ↵Miss Islington (bot)2022-10-225-15/+15
| | | | | | | | markup) (GH-97774) (#97910) (cherry picked from commit 0e72606dd4cf3023a4f8c2fe3c58082592b253f7) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.11] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C ↵Łukasz Langa2022-10-2214-116/+116
| | | | | | | | | | type>) (GH-97768) (#97924) :c:type:`<C type>` -> :c:expr:`<C type>` Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 0031e62973801d34a9e19ab7bb199e9668e32d7b) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97976)Miss Islington (bot)2022-10-221-6/+6
| | | | | | | Also, disable using invalid sphinx-lint 0.6.2. (cherry picked from commit f612565bd32d4ab0945798da775eea070f08b6fe) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* Fix types in buffer/memoryview docs (GH-98118)Miss Islington (bot)2022-10-222-2/+2
| | | | | | | | | | | The definition of obj in the `Py_buffer` struct is as a PyObject* https://github.com/python/cpython/blob/ec091bd47e2f968b0d1631b9a8104283a7beeb1b/Include/pybuffer.hGH-L22 PyMemoryView_GET_BASE returns `.obj` - thus its return type should be a PyObject* (or at least a void*). It definitely doesn't return `Py_buffer` (cherry picked from commit c459fedf7cfd5dadf72e088d789c7375b3a6e093) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)Miss Islington (bot)2022-08-301-3/+6
| | | | | | It is now deprecated and the docs should reflect that. (cherry picked from commit 9625de6fab4597bcd04ec390b680b053b0533816) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Clarify API stability of PyTypeObject in relation to static types. (GH-96217)Miss Islington (bot)2022-08-251-3/+3
| | | | | | | | | | Fixes: https://github.com/python/cpython/issues/95300 Related: https://github.com/python/cpython/issues/91271 (cherry picked from commit caa2a9799a47294441e4206037620322eea9ed06) Co-authored-by: ov2k <ov2k.github@gmail.com>
* GH-92678: Document that you shouldn't be doing your own dictionary offset ↵Miss Islington (bot)2022-08-092-12/+23
| | | | | | | calculations. (GH-95598) (GH-95821) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Mark Shannon <mark@hotpy.org>
* gh-94936: C getters: co_varnames, co_cellvars, co_freevars (GH-95008)Miss Islington (bot)2022-08-041-0/+25
| | | | | (cherry picked from commit 42b102bbf9a9ae6fae8f6710202fb7afeeac277c) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* [3.11] gh-90359: Unify documentation style for datetime.rst (gh-94836) ↵Dong-hee Na2022-07-141-0/+7
| | | | | | | (gh-94838) (cherry picked from commit 967da5febbc77b36a5b14863e61db3a2d441a940) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* gh-90359: Update documentation to follow PEP 495. (gh-94800)Miss Islington (bot)2022-07-141-0/+12
| | | | | (cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Miss Islington (bot)2022-07-055-6/+6
| | | | | | | | (GH-94551) (GH-94557) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021 (cherry picked from commit 3440d197a55800ecceea3e115e44b4262411359c) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.11] [doc] fix typo in reference to tp_descr_get and tp_descr_set ↵Irit Katriel2022-06-261-2/+2
| | | | | | | | | (GH-94140) (GH-94293) (cherry picked from commit 32d595fdcd4be8e1f41dcfe84ccf4de89fea3c3f) Co-authored-by: Max Bachmann <kontakt@maxbachmann.de> Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
* gh-87961: Remove outdated notes from functions that aren't in the Limited ↵Miss Islington (bot)2022-06-103-26/+0
| | | | | | | | | | | | API (GH-93581) (GH-93604) Nowadays everything that *is* in the Limited API has a note added automatically. These notes could mislead people to think that these functions could never be added to the limited API. Remove them. (cherry picked from commit 2c3fe5eeb2b64deb2132d9259e74b521c14fd92d) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Doc: Update references and examples of old, unsupported OSes and uarches ↵Miss Islington (bot)2022-06-091-3/+2
| | | | | | | (GH-92791) (GH-93638) (cherry picked from commit a5ba0f4ebca5020f6c77718a20663e0ac6e194ac) Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-92913: Fix typos in documentation (GH-93129)Miss Islington (bot)2022-05-231-3/+3
| | | | | (cherry picked from commit 6a6f823ea7f565722148462a0372aa90085637bc) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields ↵Miss Islington (bot)2022-05-191-4/+16
| | | | | | | (GH-92980) (cherry picked from commit 403d16fa28764718dcd0536ccb3ab8d05768465d) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-91755: Document Py_IncRef and Py_DecRef as C functions (GH-91805)Miss Islington (bot)2022-05-181-4/+10
| | | | | | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 58a3d28039863b014f57a1ac93b51e20920ebe7b) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
* Document Py_ssize_t. (GH-92512)Miss Islington (bot)2022-05-138-22/+29
| | | | | | | | | It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But there's 8182 errors left. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit 664aa94b570a4a8f3535efb2e3d638a4ab655943) Co-authored-by: Julien Palard <julien@palard.fr>
* gh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (GH-92696) (GH-92703)Miss Islington (bot)2022-05-121-3/+3
| | | | | | | | | | | | | | | Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline functions of unicodeobject.h. Change also the kind type from unsigned int to int: same parameter type than PyUnicode_FromKindAndData(). The limited API version 3.11 no longer casts arguments to expected types. (cherry picked from commit d0c9353a79c2003385c83892db5dfd4e443474c9) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* Enhance PyConfig documentation (GH-92394)Miss Islington (bot)2022-05-091-37/+46
| | | | | (cherry picked from commit 7b9803f93fbd1f8cfcc93ae7847ba029e9183db4) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] GH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432) ↵Miss Islington (bot)2022-05-081-11/+11
| | | | | | | | | | | | | (GH-92469) * Remove redundant footnote ref: the footnote has been removed * Fix footnote ref to match footnote * Convert footnotes into reST footnotes: will error if missing (cherry picked from commit 788ef54bc94b0a7aa2a93f626e4067ab8561424c) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Automerge-Triggered-By: GH:serhiy-storchaka
* Document the lifetime of `PyUnicode_AsUTF8String` (#92325)Matt Wozniski2022-05-061-1/+2
| | | The current wording implied this, but didn't state it explicitly.
* gh-88279: Deprecate PySys_SetArgvEx() (#92363)Victor Stinner2022-05-063-5/+23
| | | | | | | Deprecate the following C functions: * PySys_SetArgv() * PySys_SetArgvEx() * PySys_SetPath()
* gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)Victor Stinner2022-05-051-9/+37
| | | | | | | | | | | | Add the -P command line option and the PYTHONSAFEPATH environment variable to not prepend a potentially unsafe path to sys.path. * Add sys.flags.safe_path flag. * Add PyConfig.safe_path member. * Programs/_bootstrap_python.c uses config.safe_path=0. * Update subprocess._optim_args_from_interpreter_flags() to handle the -P command line option. * Modules/getpath.py sets safe_path to 1 if a "._pth" file is present.
* gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (#92048)Robert Howlett2022-05-051-1/+1
|
* gh-89653: PEP 670: Convert PyBytes macros to functions (#91990)Victor Stinner2022-05-032-4/+4
| | | | | | | | | | | | Convert the following macros to static inline functions: * PyByteArray_AS_STRING() * PyByteArray_GET_SIZE() * PyBytes_AS_STRING() * PyBytes_GET_SIZE() Limited C API version 3.11 no longer casts arguments. Add _PyBytes_CAST() and _PyByteArray_CAST() macros.
* gh-92154: Expose PyCode_GetCode in the C API (GH-92168)Ken Jin2022-05-031-0/+14
|
* gh-88097: doc: fix link to Py_Version (#92141)Victor Stinner2022-05-021-1/+1
|
* gh-89653: PEP 670: Amend docs (GH-91813)Erlend Egeberg Aasland2022-04-224-17/+18
|
* Docs: Clarify availability of PyOS_CheckStack (GH-91816)Petr Viktorin2022-04-221-3/+3
|
* gh-91768: C API no longer use "const PyObject*" type (#91769)Victor Stinner2022-04-211-7/+12
| | | | | | | | | | | | | Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument type is now "PyObject*", rather than "const PyObject*". * Replace also "const PyObject*" with "PyObject*" in functions: * _Py_strhex_impl() * _Py_strhex_with_sep() * _Py_strhex_bytes_with_sep() * Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros. * Py_IS_TYPE() can now use Py_TYPE() in its implementation.
* GH-88116: Document that PyCodeNew is dangerous, and make PyCode_NewEmpty ↵Mark Shannon2022-04-211-6/+15
| | | | less dangerous. (GH-91790)
* GH-88756: Update docs for PEP 523 eval function type. (GH-91788)Mark Shannon2022-04-211-1/+4
|
* bpo-40421: Cleanup PyFrame C API (GH-32417)Victor Stinner2022-04-191-16/+2
|
* gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)Oleg Iarygin2022-04-181-4/+4
| | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531)Irit Katriel2022-04-151-4/+40
|