Commit Graph

1256 Commits

Author SHA1 Message Date
C.A.M. Gerlach b2db1c2080
[3.10] Docs: Fix backtick errors found by sphinx-lint (GH-97998) (#98373)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit fa2d43e518)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-10-18 01:49:47 +02:00
Miss Islington (bot) 03ea515f33
Fix types in buffer/memoryview docs (GH-98118)
The definition of obj in the `Py_buffer` struct is as a PyObject*
ec091bd47e/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 c459fedf7c)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2022-10-09 18:02:49 -07:00
Miss Islington (bot) 90f2c7992f
Add a warning message about PyOS_snprintf (GH-95993)
(cherry picked from commit c7b2204996)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
2022-10-07 13:36:21 -07:00
Łukasz Langa 537c93ea3b
[3.10] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97977)
Also, disable using invalid sphinx-lint 0.6.2.
(cherry picked from commit f612565bd3)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-06 11:56:52 -07:00
Łukasz Langa 3b0f2a7ff0
[3.10] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (GH-97768) (#97925)
:c:type:`<C type>` -> :c:expr:`<C type>`

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0031e62973)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 14:10:55 -07:00
Miss Islington (bot) b39182e4b0
[3.10] gh-93738: Documentation C syntax (Function glob patterns -> literal markup) (GH-97774) (#97911)
(cherry picked from commit 0e72606dd4)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-05 11:00:50 -07:00
Miss Islington (bot) de0a656d5b
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) (GH-97778) (#97890)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit c70c8b6976)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:21:18 -07:00
Łukasz Langa 9aed6bdb20
[3.10] gh-93738: Documentation C syntax (Use `c:struct`) (GH-97772) (#97893)
Use `c:struct`
(cherry picked from commit a0f5599aac)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:20:46 -07:00
Łukasz Langa d99ea4c7a2
[3.10] gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) (GH-97775) (#97891)
(cherry picked from commit 6b3d4db02e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:19:38 -07:00
Miss Islington (bot) 4245764fae
[3.10] gh-93738: Documentation C syntax (:c:type:`PyObject` -> :c:expr:`PyObject`) (GH-97776) (#97888)
:c:type:`PyObject` -> :c:expr:`PyObject`
(cherry picked from commit 0bf6a617ed)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:17:46 -07:00
Miss Islington (bot) 09e5029aca
[3.10] gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`) (GH-97777) (#97877)
:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`
(cherry picked from commit 4ebb025031)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:56:46 -07:00
Miss Islington (bot) 95289bf983
[3.10] gh-93738: Documentation C syntax (:c:data:`view->obj` -> :c:expr:`view->obj`) (GH-97773) (#97868)
:c:data:`view->obj` -> :c:expr:`view->obj`
(cherry picked from commit fa59bda8d3)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:55:31 -07:00
Miss Islington (bot) 994eaa3a6f
[3.10] gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) (GH-97770) (#97870)
:c:type:`TYPE` -> :c:expr:`TYPE`
(cherry picked from commit 8b211b4cdb)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:47:56 -07:00
Miss Islington (bot) 5eedf1d863
[3.10] gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) (GH-97769) (#97872)
:c:type:`FILE` -> :c:expr:`FILE`
(cherry picked from commit 192d401ba5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:47:20 -07:00
Miss Islington (bot) 9c755d7d6b
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`) (GH-97780) (#97864)
:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`
(cherry picked from commit 510baa429a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:46:30 -07:00
Miss Islington (bot) 5aa108b9e0
[3.10] gh-93738: Documentation C syntax (:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`) (GH-97782) (#97862)
:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`
(cherry picked from commit 9ebc50866b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:41:05 -07:00
Miss Islington (bot) 20ddf1c17a
[3.10] gh-93738: Documentation C syntax (:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`) (GH-97783) (#97860)
:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`
(cherry picked from commit 898834e27b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:39:57 -07:00
Miss Islington (bot) 82ce586f10
gh-93738: Documentation C syntax (:c:data:`0` -> ``0``) (GH-97771)
:c:data:`0` -> ``0``
(cherry picked from commit 5e997cff3e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-03 18:55:08 -07:00
Miss Islington (bot) e89f8b0ae4
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
It is now deprecated and the docs should reflect that.
(cherry picked from commit 9625de6fab)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2022-08-30 01:38:53 -07:00
Miss Islington (bot) 2f88289cf5
Clarify API stability of PyTypeObject in relation to static types. (GH-96217)
Fixes:
https://github.com/python/cpython/issues/95300

Related:
https://github.com/python/cpython/issues/91271
(cherry picked from commit caa2a9799a)

Co-authored-by: ov2k <ov2k.github@gmail.com>
2022-08-25 06:42:32 -07:00
Miss Islington (bot) 8a01502e2d
gh-90359: Unify documentation style for datetime.rst (gh-94836)
(cherry picked from commit 967da5febb)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-07-13 17:51:03 -07:00
Miss Islington (bot) 381b86bde8
gh-90359: Update documentation to follow PEP 495. (gh-94800)
(cherry picked from commit 07374cce52)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-07-13 17:16:44 -07:00
Łukasz Langa 6e47020d31
[3.10] Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94558)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a5)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-07-05 14:30:37 +02:00
Miss Islington (bot) 3473a128d1
[doc] fix typo in reference to tp_descr_get and tp_descr_set (GH-94140)
(cherry picked from commit 32d595fdcd)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
2022-06-26 03:11:43 -07:00
Miss Islington (bot) 5b2ad48431
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581) (GH-93605)
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 2c3fe5eeb2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-06-10 16:04:47 +02:00
Miss Islington (bot) 2139583bf9
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93639)
(cherry picked from commit a5ba0f4ebc)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-09 16:15:49 +02:00
Miss Islington (bot) 1815d8e64f
gh-91755: Document Py_IncRef and Py_DecRef as C functions (GH-91805)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 58a3d28039)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2022-05-18 02:00:00 -07:00
Miss Islington (bot) 48f2d8de24
Document Py_ssize_t. (GH-92512)
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 664aa94b57)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-05-13 06:32:39 -07:00
Miss Islington (bot) f40731fb51
[3.10] GH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432) (GH-92470)
* 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 788ef54bc9)


Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-08 08:28:47 -07:00
Miss Islington (bot) 229dc17f7a
gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (GH-92048) (#92330)
(cherry picked from commit 43b135f94e)

Co-authored-by: Robert Howlett <robert@howletts.org.uk>

Co-authored-by: Robert Howlett <robert@howletts.org.uk>
2022-05-06 14:47:09 +02:00
Miss Islington (bot) 367faf71ea
Document the lifetime of `PyUnicode_AsUTF8String` (GH-92325)
The current wording implied this, but didn't state it explicitly.
(cherry picked from commit 740da8d37a)

Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2022-05-06 02:55:01 -07:00
Oleg Iarygin e7e8a9fa4f
[3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-04-19 13:01:09 -07:00
Miss Islington (bot) b4abef2295
c-api docs: There are five fields, not four (GH-32379)
(cherry picked from commit 4c92427fb8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-07 07:27:40 -07:00
Jelle Zijlstra 11f5fd1135
[3.10] More minor fixes to C API docs (GH-31525) (GH-32258)
* wording fixes in type.rst

* grammar and punctuation in sys.rst

* set: grammar fixes

* structures: capitalization fix

* grammar fixes for sequence

* objects: point to Py_TYPE instead of direct object access

* numbers: add more explicit Python equivalences

* method: add missing period

* memory: grammar fix

* mapping: grammar fixes

* long: grammar fix

* iter: fix grammar for PyAIter_Check

* init: grammar fix.
(cherry picked from commit 897bc6f928)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-02 16:00:51 -07:00
Miss Islington (bot) 5830a288ab
More minor fixes to C API docs (GH-31714)
* init_config: wording fixes

* bytearray: remove XXX, there is a good link to the buffer docs

* bytes, call, exceptions: minor wording fixes
(cherry picked from commit 677a879466)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-02 12:54:04 -07:00
Miss Islington (bot) 98e2ee60bd
Add missing "to" to two tp_flags notes (GH-31624)
(cherry picked from commit 422fdb3717)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-02-28 17:45:26 -08:00
Miss Islington (bot) b0de6299a8
bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)
Fix PyFrame_GetBack() and PyFrame_GetCode() return type in
the documentation.
(cherry picked from commit 78859e58e4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-02-23 11:12:51 -08:00
Miss Islington (bot) 28d9353305
Minor fixes to C API docs (GH-31501)
* C API docs: move PyErr_SetImportErrorSubclass docs

It was in the section about warnings, but it makes more sense to
put it with PyErr_SetImportError.

* C API docs: document closeit argument to PyRun_AnyFileExFlags

It was already documented for PyRun_SimpleFileExFlags.

* textual fixes to unicode docs

* Move paragraph about tp_dealloc into tp_dealloc section

* __aiter__ returns an async iterator, not an awaitable
(cherry picked from commit 43cf44ddcc)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-22 20:57:02 -08:00
Miss Islington (bot) 68a31dba97
no-issue: Fix documentation typos. (GH-30576)
(cherry picked from commit d05a66339b)

Co-authored-by: Piotr Fusik <piotr@fusik.info>
2022-01-21 04:45:42 -08:00
Miss Islington (bot) 0861a50bd4
bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30684)
(cherry picked from commit 3bf6315c4c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-01-19 12:34:17 +00:00
Miss Islington (bot) 4cfb10979d
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)
(cherry picked from commit 43c5c1369c)

Co-authored-by: Julian Gilbey <julian-git@d-and-j.net>
2022-01-11 06:53:08 -08:00
Brett Cannon 99aad31b7a
[3.10] bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e06340)

Co-authored-by: Brett Cannon <brett@python.org>
2021-11-22 15:09:15 -08:00
Sam Gross 9e0012116a
[3.10] bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246) (GH-29249)
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.
(cherry picked from commit 35e1ff38ee)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2021-10-28 21:22:57 +02:00
Christian Clauss d15f47d179
[3.10] [doc] Fix typos found using codespell (GH-28744) (GH-28758) 2021-10-06 15:56:57 +02:00
Miss Islington (bot) 1493e1a40d
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.

Co-authored-by: Patrick Reader <_@pxeger.com>
(cherry picked from commit 36122e1814)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-23 13:25:31 +03:00
Miss Islington (bot) 5683902e06
[3.10] Fix minor typo in Doc/c-api/type.rst (GH-28432) (GH-28440)
retreived-> retrieved
(cherry picked from commit af08f1ba40)


Co-authored-by: Konstantin Popov <konst.hardy@gmail.com>

Automerge-Triggered-By: GH:Fidget-Spinner
2021-09-17 19:11:51 -07:00
Miss Islington (bot) e2856859f6
docs: correct references to __isub__ etc (GH-28297)
(cherry picked from commit 800bd01b6d)

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-09-16 03:10:10 -07:00
Miss Islington (bot) 53257cf19f
bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) (GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
2021-09-07 12:43:33 +01:00
Miss Islington (bot) f709360520
[doc] Fix typo c-api/exceptions.rst (GH-27847)
Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn>
(cherry picked from commit dcbf7ff6a7)

Co-authored-by: Sunny Bean <ptq008@gmail.com>
2021-08-23 12:40:36 -07:00
Miss Islington (bot) f4b3217874
Note that tp_clear and m_clear are not always called (GH-27581)
(cherry picked from commit 10faada709)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-08-04 11:23:41 -07:00