Petr Viktorin
3f563cea56
bpo-39245: Make Vectorcall C API public (GH-17893)
...
* Add backcompat defines and move non-limited API declaration to cpython/
This partially reverts commit 2ff58a24e8
which added PyObject_CallNoArgs to the 3.9+ stable ABI. This should not
be done; there are enough other call APIs in the stable ABI to choose from.
* Adjust documentation
Mark all newly public functions as added in 3.9.
Add a note about the 3.8 provisional names.
Add notes on public API.
* Put PyObject_CallNoArgs back in the limited API
* Rename PyObject_FastCallDict to PyObject_VectorcallDict
2020-02-06 15:48:27 +01:00
Victor Stinner
c6e5c1123b
bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)
...
Remove:
* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
2020-02-03 15:17:15 +01:00
Alex
4e205b74f9
Fix quoted signature of setattrofunc (GH-17251)
...
setattrofunc returns `int`, not `PyObject *`.
2019-11-22 14:48:14 +01:00
Jeroen Demeyer
9a13a388f2
bpo-36974: expand call protocol documentation (GH-13844)
...
CC @encukou
I'm also adding Petr Viktorin as contributor for vectorcall in the "what's new" section.
https://bugs.python.org/issue36974
Automerge-Triggered-By: @encukou
Automerge-Triggered-By: @encukou
2019-11-12 05:08:00 -08: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
Ammar Askar
5faff977ad
bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)
...
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
2019-09-27 04:11:27 -07:00
Julien Palard
375a3e2bdb
bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)
2019-09-13 15:07:37 +02:00
Ezio Melotti
2d8d597bb8
bpo-38103: fix conflicting labels in the docs. (GH-15906)
2019-09-11 11:57:59 +01:00
Hai Shi
bc5caf88ca
bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)
...
It was listed as `binaryfunc`. It should be `unaryfunc`.
2019-06-19 20:32:23 -07:00
Jeroen Demeyer
9e3e06e582
bpo-36974: document PEP 590 (GH-13450)
2019-06-03 01:43:13 +02:00
Antoine Pitrou
ada319bb6d
bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944)
...
It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags.
This will reduce the risk of running out of bits in the 32-bit tp_flags value.
2019-05-29 22:12:38 +02:00
Jeroen Demeyer
eb65e2443a
bpo-36922: implement PEP-590 Py_TPFLAGS_METHOD_DESCRIPTOR (GH-13338)
...
Co-authored-by: Mark Shannon <mark@hotpy.org>
2019-05-28 14:42:53 +02:00
Petr Viktorin
f1e17e9f97
bpo-34626: Document creating heap types from the C-API (GH-9154)
...
bpo-34626: Document creating heap types from the C-API
Add missing descriptions of PEP384's PyType_Spec and PyType_Slot,
along with some introductory prose.
2019-05-24 11:19:42 +02: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
Andre Delfino
f4efa312d1
Correct "inplace" with "in-place" (GH-10480)
2019-04-08 18:14:43 +09:00
Stéphane Wirtel
7c4fcb6b05
Add the meaning of the returned value of PyTypeObject.tp_init (GH-12325)
2019-03-15 09:18:36 -07: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
Serhiy Storchaka
f5b1183610
bpo-5945: Improve mappings and sequences C API docs. (GH-7029)
2018-05-22 11:02:44 +03:00
stratakis
e8b1965639
bpo-23699: Use a macro to reduce boilerplate code in rich comparison functions (GH-793)
2017-11-02 20:32:54 +10:00
Michael Seifert
da67e0d644
bpo-29916: Include PyGetSetDef in C API extension documentation. ( #831 )
2017-09-15 19:25:27 +03:00
Martin Panter
b5e3959e5f
Issue #28771 : Merge C API doc fix from 3.6
2016-12-10 05:57:49 +00:00
Martin Panter
7a44783b42
Issue #28771 : Update tp_get/setattr signature documentation
2016-12-10 05:56:13 +00:00
Serhiy Storchaka
007d7ff73f
Issue #28761 : The fields name and doc of structures PyMemberDef, PyGetSetDef,
...
PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
type "const char *" rather of "char *".
2016-11-22 07:58:08 +02:00
Serhiy Storchaka
1ecf7d204d
Issue #28496 : Mark up constants 0, 1 and -1 that denote return values or
...
special input values as literal text.
2016-10-27 21:41:19 +03:00
Serhiy Storchaka
de0574bdab
Issue #18287 : PyType_Ready() now checks that tp_name is not NULL.
...
Original patch by Niklas Koep.
2016-10-07 23:24:35 +03:00
Martin Panter
bae5d81f5d
Issue #24314 : Fix doc links for general attributes like __name__, __dict__
2016-06-18 03:57:31 +00:00
Martin Panter
45be8d67be
Issue #25701 : Document C API functions that both set and delete objects
...
Also document that the separate functions that delete objects are preferred;
using PyObject_SetAttr(), _SetAttrString(), and PySequence_SetItem() to
delete is deprecated.
2015-12-08 00:03:20 +00:00
Martin Panter
36f22a2820
Issue #24808 : Merge 3.4 into 3.5; adjust new tp_as_async field
2015-08-25 05:25:21 +00:00
Martin Panter
78d5033337
Issue #24808 : Update the documentation of some PyTypeObject fields
...
Patch by Joseph Weston.
2015-08-25 05:06:39 +00:00
Yury Selivanov
bce294b993
docs.capi: Fix tp_as_async doc
2015-06-23 11:46:09 -04:00
Yury Selivanov
6ef059097c
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
2015-05-28 11:21:31 -04:00
Yury Selivanov
a18cad543f
Issue 24180: Fixes by Berker Peksag.
2015-05-21 17:02:31 -04:00
Yury Selivanov
f3e40fac10
Issue 24180: Documentation for PEP 492 changes.
2015-05-21 11:50:30 -04:00
Georg Brandl
31e34fe7a3
merge with 3.4
2014-10-05 16:38:25 +02:00
Georg Brandl
340c749a3a
Closes #19477 : remove outdated documentation of tp_print type object slot.
2014-10-05 16:38:02 +02:00
Andrew Svetlov
a6237d822a
Merge 3.4
2014-07-03 16:07:57 +03:00
Andrew Svetlov
0d50af45b6
Update docs about tp_richcompare
2014-07-03 16:07:17 +03:00
Antoine Pitrou
63aeb71909
Issue #9307 : document the various Py_TPFLAGS_*_SUBCLASS flags. Patch by Yury V. Zaytsev.
2014-04-29 01:39:26 +02:00
Antoine Pitrou
f9f54a2f5f
Issue #9307 : document the various Py_TPFLAGS_*_SUBCLASS flags. Patch by Yury V. Zaytsev.
2014-04-29 01:39:03 +02:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Benjamin Peterson
f0f7844f38
the name of the slot of nb_multiply not nb_mul
2014-04-08 10:44:30 -04:00
Larry Hastings
3732ed2414
Merge in all documentation changes since branching 3.4.0rc1.
2014-03-15 21:13:56 -07:00
Serhiy Storchaka
d51f42372b
Issue 19195: Improved cross-references in C API documentation.
2013-10-09 13:26:57 +03:00
Serhiy Storchaka
0b68a2d675
Issue 19195: Improved cross-references in C API documentation.
2013-10-09 13:26:17 +03:00
Serhiy Storchaka
bbbf191707
Issue #18743 : Fix references to non-existant "StringIO" module.
2013-08-17 00:11:54 +03:00
Serhiy Storchaka
e79be877df
Issue #18743 : Fix references to non-existant "StringIO" module.
2013-08-17 00:09:55 +03:00
Antoine Pitrou
a68cbfa556
Issue #18589 : fix hyperlinking of type slots (tp_*)
2013-08-01 21:14:43 +02:00
Antoine Pitrou
39668f57f4
Issue #18589 : fix hyperlinking of type slots (tp_*)
2013-08-01 21:12:45 +02:00
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
2013-07-30 19:59:21 +02:00