summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43413: Revert changes in set.__init__ (GH-28403)Serhiy Storchaka2021-12-261-3/+1
| | | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-46140: take more Py_buffer arguments as const * (GH-30217)David Hewitt2021-12-222-12/+13
|
* bpo-46107: ExceptionGroup.subgroup()/split() should copy __note__ to the ↵Irit Katriel2021-12-211-0/+5
| | | | parts (GH-30159)
* Revert "bpo-46131: add fastpath for PyFloat_Check() (GH-30200)" (GH-30208)Raymond Hettinger2021-12-192-4/+0
| | | This reverts commit 2ef06d412531d1163dbc72877c88aedf3ed82a25.
* bpo-46131: add fastpath for PyFloat_Check() (#30200)Matti Picus2021-12-192-0/+4
|
* bpo-45711: Remove type and traceback from exc_info (GH-30122)Irit Katriel2021-12-171-6/+0
| | | | | | | | * Do not PUSH/POP traceback or type to the stack as part of exc_info * Remove exc_traceback and exc_type from _PyErr_StackItem * Add to what's new, because this change breaks things like Cython
* bpo-46039: Split yield from in two (GH-30035)Mark Shannon2021-12-152-8/+18
| | | | | | * Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE. * Remove YIELD_FROM opcode.
* bpo-44525: Split calls into PRECALL and CALL (GH-30011)Mark Shannon2021-12-142-5/+5
| | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
* bpo-45292: [PEP-654] add except* (GH-29581)Irit Katriel2021-12-142-24/+139
|
* bpo-45953: Statically initialize the small ints. (gh-30092)Eric Snow2021-12-141-29/+0
| | | | | | | The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init. I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects. https://bugs.python.org/issue45953
* bpo-45855: document that `no_block` has no use anymore in PyCapsule_Import ↵Georg Brandl2021-12-121-7/+3
| | | | (#29665)
* bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with ↵Kumar Aditya2021-12-121-1/+1
| | | | PyImport_ImportModule (GH-30046)
* bpo-46008: Make runtime-global object/type lifecycle functions and state ↵Eric Snow2021-12-0911-72/+193
| | | | | | | | | | | | consistent. (gh-29998) This change is strictly renames and moving code around. It helps in the following ways: * ensures type-related init functions focus strictly on one of the three aspects (state, objects, types) * passes in PyInterpreterState * to all those functions, simplifying work on moving types/objects/state to the interpreter * consistent naming conventions help make what's going on more clear * keeping API related to a type in the corresponding header file makes it more obvious where to look for it https://bugs.python.org/issue46008
* bpo-45813: Drop redundant assertion from frame.clear() (GH-29990)Andrew Svetlov2021-12-081-1/+4
| | | | | * bpo-45813: Drop redundant assertion from frame.clear() * Move assertion to frame_dealloc()
* bpo-46009: Do not exhaust generator when send() method raises (GH-29986)Mark Shannon2021-12-081-0/+13
|
* bpo-45947: Place dict and values pointer at fixed (negative) offset just ↵Mark Shannon2021-12-074-144/+131
| | | | | | | | | | | | | | | | | | | before GC header. (GH-29879) * Place __dict__ immediately before GC header for plain Python objects. * Fix up lazy dict creation logic to use managed dict pointers. * Manage values pointer, placing them directly before managed dict pointers. * Convert hint-based load/store attr specialization target managed dict classes. * Specialize LOAD_METHOD for managed dict objects. * Remove unsafe _PyObject_GC_Calloc function. * Remove unsafe _PyObject_GC_Malloc() function. * Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.
* bpo-45963: Make space for the InterpreterFrame of a generator in that ↵Mark Shannon2021-12-061-84/+99
| | | | | | | generator. (GH-29891) * Make generator, coroutine and async gen structs all the same size. * Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
* bpo-45607: Make it possible to enrich exception displays via setting their ↵Irit Katriel2021-12-031-0/+31
| | | | __note__ field (GH-29880)
* bpo-45885: Specialize COMPARE_OP (GH-29734)Dennis Sweeney2021-12-031-0/+14
| | | | | | | * Add COMPARE_OP_ADAPTIVE adaptive instruction. * Add COMPARE_OP_FLOAT_JUMP, COMPARE_OP_INT_JUMP and COMPARE_OP_STR_JUMP specialized instructions. * Introduce and use _PyUnicode_Equal
* bpo-45954: Rename PyConfig.no_debug_ranges to code_debug_ranges (GH-29886)Victor Stinner2021-12-021-1/+1
| | | | | | | Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and invert the value. Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in PyConfig.code_debug_ranges documentation.
* bpo-45786: Allocate space for frame in frame object. (GH-29729)Mark Shannon2021-11-292-122/+41
|
* bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809)Steve Dower2021-11-271-4/+4
|
* bpo-45760: Remove PyNumber_InMatrixMultiply (GH-29751)Dong-hee Na2021-11-261-29/+4
|
* bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵Mark Shannon2021-11-235-23/+71
| | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
* bpo-45813: Make sure that frame->generator is NULLed when generator is ↵Mark Shannon2021-11-221-0/+1
| | | | deallocated. (GH-29700)
* bpo-45609: Specialize STORE_SUBSCR (GH-29242)Dennis Sweeney2021-11-191-21/+47
| | | | | * Specialize STORE_SUBSCR for list[int], and dict[object] * Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
* bpo-45510: Specialize BINARY_SUBTRACT (GH-29523)Dong-hee Na2021-11-181-5/+9
|
* bpo-45636: Simplify BINARY_OP (GH-29565)Brandt Bucher2021-11-161-0/+12
|
* bpo-45723: Prepare support for autoconf 2.71 (GH-29441)Christian Heimes2021-11-081-5/+0
|
* bpo-45392: Update the docstring of the 'type' built-in (GH-29439)Mark Dickinson2021-11-061-3/+1
|
* bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)Itamar Ostricher2021-11-041-1/+1
|
* bpo-45691: Make array of small ints static to fix use-after-free error. ↵Mark Shannon2021-11-031-16/+14
| | | | (GH-29366)
* Store actual ints, not pointers to them in the interpreter state. (GH-29274)Mark Shannon2021-10-281-15/+6
|
* bpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235)Mark Shannon2021-10-281-6/+5
|
* bpo-45637: Store the frame pointer in the cframe (GH-29267)Mark Shannon2021-10-281-5/+5
| | | * Rename 'frame' to 'current_frame'
* bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)Tim Peters2021-10-251-13/+64
| | | | | | | | Keep track of whether unsafe_tuple_compare() calls are resolved by the very first tuple elements, and adjust strategy accordingly. This can significantly cut the number of calls made to the full-blown PyObject_RichCompareBool(), and especially when duplicates are rare. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes ↵Irit Katriel2021-10-221-1/+527
| | | | (GH-28569)
* bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)Dennis Sweeney2021-10-221-6/+14
| | | | | * Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
* bpo-43706: Use PEP 590 vectorcall to speed up enumerate() (GH-25154)Dong-hee Na2021-10-211-0/+40
|
* bpo-45526: obmalloc radix use 64 addr bits (GH-29062)Neil Schemenauer2021-10-211-20/+35
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051)Neil Schemenauer2021-10-211-1/+1
| | | | | MAP_BOT_LENGTH was incorrectly used to compute MAP_TOP_MASK instead of MAP_TOP_LENGTH. On 64-bit machines, the error causes the tree to hold 46-bits of virtual addresses, rather than the intended 48-bits.
* bpo-45522: Allow to disable freelists on build time (GH-29056)Christian Heimes2021-10-216-26/+98
| | | | | | | | Freelists for object structs can now be disabled. A new ``configure`` option ``--without-freelists`` can be used to disable all freelists except empty tuple singleton. Internal Py*_MAXFREELIST macros can now be defined as 0 without causing compiler warnings and segfaults. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45315: PyType_FromSpec: Copy spec->name and have the type own the memory ↵Petr Viktorin2021-10-211-15/+36
| | | | for its name (GH-29103)
* bpo-35134: Add Include/cpython/longobject.h (GH-29044)Victor Stinner2021-10-192-0/+2
| | | | | | | | | | Move Include/longobject.h non-limited API to a new Include/cpython/longobject.h header file. Move the following definitions to the internal C API: * _PyLong_DigitValue * _PyLong_FormatAdvancedWriter() * _PyLong_FormatWriter()
* bpo-45256: Avoid C calls for most Python to Python calls. (GH-28937)Mark Shannon2021-10-181-1/+3
| | | | | | * Avoid making C calls for most calls to Python functions. * Change initialize_locals(steal=true) and _PyTuple_FromArraySteal to consume the argument references regardless of whether they succeed or fail.
* bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975)Victor Stinner2021-10-152-2/+3
| | | | | | | | | Rename Include/namespaceobject.h to Include/internal/pycore_namespace.h. The _testmultiphase extension is now built with the Py_BUILD_CORE_MODULE macro defined to access _PyNamespace_Type. object.c: remove unused "pycore_context.h" include.
* bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)Victor Stinner2021-10-152-2/+2
| | | | Move the interpreteridobject.h header file from Include/ to Include/internal/. It only provides private functions.
* bpo-35134: Move classobject.h to Include/cpython/ (GH-28968)Victor Stinner2021-10-153-3/+0
| | | | | | | | | Move classobject.h, context.h, genobject.h and longintrepr.h header files from Include/ to Include/cpython/. Remove redundant "#ifndef Py_LIMITED_API" in context.h. Remove explicit #include "longintrepr.h" in C files. It's not needed, Python.h already includes it.
* bpo-45479: Futher simplify Py_UniversalNewlineFgets. (GH-28967)Benjamin Peterson2021-10-151-23/+9
| | | Thank you to Eryk Sun for the suggestions in https://github.com/python/cpython/pull/28965#discussion_r729527143.
* closes bpo-45479: Degunkify Py_UniversalNewlineFgets. (GH-28965)Benjamin Peterson2021-10-151-32/+5
| | | Remove dead variables and control flow.