summaryrefslogtreecommitdiffstats
path: root/Modules/_abc.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43977: Properly update the tp_flags of existing subclasses when their ↵Brandt Bucher2021-06-251-6/+31
| | | | parents are registered (GH-26864)
* bpo-43977: Make sure that tp_flags for pattern matching are inherited ↵Mark Shannon2021-05-021-2/+9
| | | | correctly. (GH-25813)
* bpo-43977: Use tp_flags for collection matching (GH-25723)Mark Shannon2021-04-301-0/+33
| | | | | | | | | | | | | * Add Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING, add to all relevant standard builtin classes. * Set relevant flags on collections.abc.Sequence and Mapping. * Use flags in MATCH_SEQUENCE and MATCH_MAPPING opcodes. * Inherit Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING. * Add NEWS * Remove interpreter-state map_abc and seq_abc fields.
* bpo-40137: Add pycore_moduleobject.h internal header (GH-25507)Victor Stinner2021-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pycore_moduleobject.h internal header file with static inline functions to access module members: * _PyModule_GetDict() * _PyModule_GetDef() * _PyModule_GetState() These functions don't check at runtime if their argument has a valid type and can be inlined even if Python is not built with LTO. _PyType_GetModuleByDef() uses _PyModule_GetDef(). Replace PyModule_GetState() with _PyModule_GetState() in the extension modules, considered as performance sensitive: * _abc * _functools * _operator * _pickle * _queue * _random * _sre * _struct * _thread * _winapi * array * posix The following extensions are now built with the Py_BUILD_CORE_MODULE macro defined, to be able to use the internal pycore_moduleobject.h header: _abc, array, _operator, _queue, _sre, _struct.
* bpo-42157: Convert unicodedata.UCD to heap type (GH-22991)Victor Stinner2020-10-261-8/+8
| | | | | | | Convert the unicodedata extension module to the multiphase initialization API (PEP 489) and convert the unicodedata.UCD static type to a heap type. Co-Authored-By: Mohamed Koubaa <koubaa.m@gmail.com>
* bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for ↵Pablo Galindo2020-05-271-0/+1
| | | | | | | | | PyType_FromSpec types (reverts GH-19414) (GH-20264) Heap types now always visit the type in tp_traverse. See added docs for details. This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f. Automerge-Triggered-By: @encukou
* bpo-40566: Apply PEP 573 to abc module (GH-20005)Dong-hee Na2020-05-091-15/+19
|
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+0
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-40149: Implement traverse in _abc._abc_data (GH-19412)Victor Stinner2020-04-071-4/+22
| | | Implement traverse and clear slots in _abc._abc_data type.
* bpo-40077: Convert _abc module to use PyType_FromSpec() (GH-19202)Dong-hee Na2020-03-301-30/+75
| | | | | | | Replace statically allocated types with heap allocated types: use PyType_FromSpec(). Add a module state to store the _abc_data_type. Add traverse, clear and free functions to the module.
* bpo-1635741: Port _abc extension to multiphase initialization (PEP 489) ↵Hai Shi2020-02-171-9/+18
| | | | (GH-18030)
* bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)Dong-hee Na2020-02-171-1/+1
|
* bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)Jeroen Demeyer2019-07-111-15/+8
|
* Fix some typos (GH-14435)Min ho Kim2019-07-051-2/+2
|
* bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)Jeroen Demeyer2019-06-281-6/+13
|
* fix _abc.c compile error on Cygwin (GH-8445)E. M. Bray2019-02-241-1/+1
|
* bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. ↵Zackery Spytz2018-12-071-0/+4
| | | | | | (GH-11015) Set MemoryError when appropriate, add missing failure checks, and fix some potential leaks.
* Fix misleading mentions of tp_size in comments (GH-9093)Peter Eisentraut2018-09-101-1/+1
| | | | Many type object initializations labeled a field "tp_size" in the comment, but the name of that field is tp_basicsize.
* bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid ↵Alexey Izbyshev2018-08-201-0/+3
| | | | | | __subclasses__ (GH-8835) The missing NULL check was reported by Svace static analyzer.
* bpo-32999: ast: Convert useless check to assert (GH-6197)INADA Naoki2018-03-231-3/+1
|
* bpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189)INADA Naoki2018-03-221-24/+11
| | | | bpo-33018 (GH-5944) fixed bpo-32999 too. So fc7df0e6 is not required anymore. Revert it except test case.
* bpo-33018: Improve issubclass() error checking and message. (GH-5944)jab2018-03-221-0/+5
| | | | | This improves error message for situations when a non-class is checked w.r.t. an abstract base class.
* bpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)INADA Naoki2018-03-071-12/+25
|
* bpo-31333: Re-implement ABCMeta in C (#5273)Ivan Levkivskyi2018-02-181-0/+822
This adds C versions of methods used by ABCMeta that improve performance of various ABC operations.