Commit graph

209 commits

Author SHA1 Message Date
Serhiy Storchaka
446a6db5e1
[3.11] gh-115172: Fix explicit index extries for the C API (GH-115173) (GH-115293)
(cherry picked from commit 573acb30f2)
2024-02-11 10:42:28 +00:00
Hugo van Kemenade
fc657d0c60
[3.11] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112422) 2023-11-26 05:22:17 -07:00
Serhiy Storchaka
c534637106
[3.11] gh-109634: Use :samp: role (GH-109635) (GH-109778)
(cherry picked from commit 92af0cc580)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2023-09-29 09:39:31 +03:00
Serhiy Storchaka
3ca9264aba
[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108290)
(cherry picked from commit d7202e4879)
2023-08-22 20:33:07 +02:00
Serhiy Storchaka
358b1acc69
[3.11] gh-107298: Fix some references in the C API documentation (GH-108072) (GH-108076)
(cherry picked from commit f51f0466c0)
2023-08-17 08:30:47 +00:00
Serhiy Storchaka
d9392c0c0a
[3.11] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107381)
(cherry picked from commit 983305268e)
2023-07-28 08:31:49 +00:00
Serhiy Storchaka
32e17d4a3c
[3.11] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107377)
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()

(cherry picked from commit 8d61a71f9c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 07:03:47 +00:00
Serhiy Storchaka
50d26138e6
[3.11] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107371)
(cherry picked from commit 87b39028e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-28 09:21:50 +03:00
Serhiy Storchaka
17aada0dd0
[3.11] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107331)
Fix also formatting of PyMethodDef members.
(cherry picked from commit d363eb5b02)
2023-07-27 09:26:14 +03:00
Serhiy Storchaka
d2cdf0888b
[3.11] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107121)
(cherry picked from commit 08a228da05)
2023-07-23 15:06:32 +03:00
Serhiy Storchaka
6bde1b9f04
[3.11] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106952)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:30 +03:00
Miss Islington (bot)
4b11af058e
[3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)
GH-97950: Use new-style index directive ('builtin') (GH-104164)

* 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
(cherry picked from commit f5088006ca)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-06 07:14:37 +03:00
Miss Islington (bot)
f8fb0d8e77
gh-93358: Fix python-config docs for how to embed Python (GH-98649)
(cherry picked from commit e063c23c65)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-10-29 11:55:01 -07:00
Miss Islington (bot)
27a7fe319a
[3.11] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97976)
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>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-06 10:49:29 -07:00
Łukasz Langa
83ad76275c
[3.11] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (GH-97768) (#97924)
: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:11:12 -07:00
Miss Islington (bot)
92054dfe5d
[3.11] gh-93738: Documentation C syntax (Function glob patterns -> literal markup) (GH-97774) (#97910)
(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:29 -07:00
Serhiy Storchaka
d8df7e0207
[3.11] gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS (GH-95527) (GH-95643)
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..
(cherry picked from commit f79547a429)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-04 11:45:03 +03:00
Miss Islington (bot)
77bf973930
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94557)
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:19 +02:00
Miss Islington (bot)
635b62a376
[3.11] gh-76773: Update docs mentioning no-longer-supported Windows versions & features (GH-92529) (GH-92608)
(cherry picked from commit f1bbcba74f)


Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-10 02:55:36 -07:00
Oleg Iarygin
a573cb2fec
gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-17 20:39:32 -07:00
rtobar
b275267aa7
bpo-45790: List macros in same order in which fields are described (GH-29529)
Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-04 19:36:33 -07:00
Terry Jan Reedy
ad43dc0b54
bpo-25381: Update explanation of exceptions in C. (GH-26838)
* 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>
2021-11-15 14:38:53 -08:00
Dmitry Smirnov
454cdb99ab
bpo-45633: Fix newtypes doc typo (GH-29318) 2021-11-02 22:47:06 +08:00
Sam Gross
35e1ff38ee
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)
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.
2021-10-27 21:15:13 +02:00
Steve Dower
87655e2cf5
bpo-42800: Rename AUDIT_READ to PY_AUDIT_READ (GH-25736) 2021-04-30 01:08:55 +01:00
Ryan Hileman
9a2c2a9ec3
bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)
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.
2021-04-30 00:15:55 +01:00
Victor Stinner
2459b92a4d
bpo-43774: Remove --without-cycle-gc doc (GH-25364)
The configure --without-cycle-gc option has been removed in Python
2.3 by the commit cccd1e7248. It's now
time to remove the last reference to it in the documentation.
2021-04-12 16:58:45 +01:00
Shreyan Avigyan
ea9b2d6319
bpo-43739: Add type declaration Doc/extending/extending.rst example 2021-04-10 08:54:32 -07:00
Victor Stinner
a41782cc84
bpo-43774: Document configure options (GH-25283)
Add Doc/using/configure.rst documentation to document configure,
preprocessor, compiler and linker options.

Add a new section about the "Python debug build".
2021-04-08 22:32:21 +02:00
Victor Stinner
0e2a0f72cc
bpo-42802: Remove distutils bdist_wininst command (GH-24043)
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
2021-01-09 00:35:01 +01:00
Victor Stinner
bb0b08540c
bpo-40204: Fix reference to terms in the doc (GH-21865)
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.
2020-08-14 12:20:05 +02:00
Cajetan Rodrigues
d4f3923d59
bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) 2020-04-25 07:27:53 +02:00
Serhiy Storchaka
e835b31d2b
bpo-38600: NULL -> `NULL`. (GH-17001)
Also fix some other formatting.
2019-10-30 21:37:16 +02:00
Serhiy Storchaka
25fc088607
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
Replace all *NULL* with ``NULL``.
2019-10-30 12:03:20 +02:00
Krishna Oza
038503e08a bpo-38391: Fixing a typo for Py_DECREF (GH-16616) 2019-10-07 19:57:45 +08:00
Brandt Bucher
224b8aaa7e bpo-26868: Fix example usage of PyModule_AddObject. (#15725)
* 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
2019-09-12 13:11:20 +01:00
Jeroen Demeyer
7f41c8e0dd bpo-37493: use _PyObject_CallNoArg in more places (GH-14575) 2019-07-04 19:35:31 +09:00
Stéphane Wirtel
cbb6484573 Doc: Replace the deprecated highlightlang directive by highlight. (#13377)
highlightlang is deprecated since April 2018 in Sphinx.
See https://github.com/sphinx-doc/sphinx/pull/4845
2019-05-17 15:25:34 +05:30
Wu Wei
662ebd2ab2 Doc: add the missing ".tp_flags" in type definition (GH-12902) 2019-04-22 20:08:20 +09:00
Inada Naoki
c88feceb44
Doc: define PY_SSIZE_T_CLEAN always (GH-12794) 2019-04-13 10:46:21 +09:00
Caleb Marchent
42f55ee500 fix typo in doc (#12686) 2019-04-10 18:03:02 -04:00
Serhiy Storchaka
62be74290a
bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS excluding Argument Clinic generated code.
2018-11-27 13:27:31 +02:00
Serhiy Storchaka
3f819ca138
bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
Eric Snow
9e7c92193c
bpo-17045: Improve C-API doc for PyTypeObject. (gh-7413)
The existing doc had a number of info gaps and was a little hard to use.  This patch provides several quick-reference tables as well as examples.
2018-06-14 15:46:35 -06:00
Siddhesh Poyarekar
55edd0c185 bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
2018-04-29 21:59:33 +03:00
Serhiy Storchaka
46936d5a71
Improve highlighting of some code blocks. (GH-6401) 2018-04-08 19:18:04 +03:00
Antoine Pitrou
1d80a56173
bpo-33201: Modernize "Extension types" doc (GH-6337)
* bpo-33201: Modernize "Extension types" doc
* Split tutorial and other topics
* Some small fixes
* Address some review comments
* Rename noddy* to custom* and shoddy to sublist
* Fix markup
2018-04-07 18:14:03 +02:00
Serhiy Storchaka
5bb0005f9f
Make formatting of some return codes conforming to the general style. (#5587) 2018-02-09 13:31:19 +02:00
Sanyam Khurana
338cd83c5d bpo-25910: Link redirections in docs (#1933)
Fixes some redirection links in docs.
2018-01-20 01:25:37 +01:00
Emanuele Gaifas
cdfe910e74 Extending Python Doc minor updates (GH-4518)
Move footnote markers to be closer to the related terminology:
before the end of the sentence, instead of after.
2017-11-24 00:49:57 -08:00