summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #21073: explain why Py_ReprEnter() allows for a missing thread state.Antoine Pitrou2014-03-311-0/+2
|
* Close #20500: Don't trigger PyObject_Str assertion at shutdownNick Coghlan2014-02-091-1/+1
|
* Issue #6477: Merge with 3.3.Alexandre Vassalotti2013-12-011-6/+6
|\
| * Issue #6477: Keep PyNotImplemented_Type and PyNone_Type private.Alexandre Vassalotti2013-12-011-6/+6
| |
* | Issue #6477: Merge with 3.3.Alexandre Vassalotti2013-12-011-2/+2
|\ \ | |/
| * Issue #6477: Added support for pickling the types of built-in singletons.Alexandre Vassalotti2013-12-011-2/+2
| |
* | Make Ellipsis and NotImplemented picklable through the reduce protocol.Alexandre Vassalotti2013-11-241-1/+12
| |
* | ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.Christian Heimes2013-11-201-146/+0
| | | | | | | | Python now uses SipHash24 on all major platforms.
* | Issue #19512, #19515: remove shared identifiers, move identifiers where theyVictor Stinner2013-11-071-6/+7
| | | | | | | | | | | | | | are used. Move also _Py_IDENTIFIER() defintions to the top in modified files to remove identifiers duplicated in the same file.
* | Issue #19512: Use the new _PyId_builtins identifierVictor Stinner2013-11-061-2/+6
| |
* | Issue #19512: Py_ReprEnter() and Py_ReprLeave() now use an identifier for theVictor Stinner2013-11-061-4/+4
| | | | | | | | "Py_Repr" dictionary key
* | Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handleVictor Stinner2013-10-291-4/+3
| | | | | | | | | | exceptions when merging fast locals into f_locals of a frame. PyEval_GetLocals() now raises an exception and return NULL on failure.
* | Remove the freelist scheme for setobjects.Raymond Hettinger2013-09-081-1/+0
| | | | | | | | | | | | | | | | | | The setobject freelist was consuming memory but not providing much value. Even when a freelisted setobject was available, most of the setobject fields still needed to be initialized and the small table still required a memset(). This meant that the custom freelisting scheme for sets was providing almost no incremental benefit over the default Python freelist scheme used by _PyObject_Malloc() in Objects/obmalloc.c.
* | Restore changeset 5bd9db528aed (issue #18408)Victor Stinner2013-08-261-0/+15
| | | | | | | | | | | | | | | | "Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an assertion error if they are called with an exception set (PyErr_Occurred()). As PyEval_EvalFrameEx(), they may clear the current exception and so the caller looses its exception."
* | Issue #18408: _PyObject_Dump() now saves/restores the current exceptionVictor Stinner2013-08-261-0/+6
| | | | | | | | So it can be called even if an exception was raised
* | Issue #18772: fix the gdb plugin after the set implementation changesAntoine Pitrou2013-08-241-1/+1
| |
* | Back out 5bd9db528aed (issue #18408). It caused unsolved buildbot failures.Antoine Pitrou2013-08-231-16/+0
| |
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-2/+2
| |
* | Issue #18112: PEP 442 implementation (safe object finalization).Antoine Pitrou2013-07-301-2/+68
| |
* | Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with anVictor Stinner2013-07-171-0/+16
| | | | | | | | | | | | | | assertion error if they are called with an exception set (PyErr_Occurred()). As PyEval_EvalFrameEx(), they may clear the current exception and so the caller looses its exception.
* | Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failureVictor Stinner2013-07-171-1/+2
| |
* | Issue #18408: Py_ReprLeave() now saves/restores the current exception,Victor Stinner2013-07-161-2/+11
| | | | | | | | and ignores exceptions raised during the call
* | Issue #3329: Implement the PEP 445Victor Stinner2013-07-071-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new enum: * PyMemAllocatorDomain Add new structures: * PyMemAllocator * PyObjectArenaAllocator Add new functions: * PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree() * PyMem_GetAllocator(), PyMem_SetAllocator() * PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator() * PyMem_SetupDebugHooks() Changes: * PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead of calling PyObject_Malloc()/PyObject_Realloc() in debug mode. * PyObject_Malloc()/PyObject_Realloc() now falls back to PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes. * Redesign debug checks on memory block allocators as hooks, instead of using C macros
* | Revert changeset 6661a8154eb3: Issue #3329: Add new APIs to customize memory ↵Victor Stinner2013-06-151-0/+20
| | | | | | | | | | | | allocators The new API require more discussion.
* | Issue #3329: Add new APIs to customize memory allocatorsVictor Stinner2013-06-141-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a new PyMemAllocators structure * New functions: - PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory allocator functions - PyMem_GetRawAllocators(), PyMem_SetRawAllocators() - PyMem_GetAllocators(), PyMem_SetAllocators() - PyMem_SetupDebugHooks() - _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators() * Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0) * Add unit test for new get/set allocators functions * PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls back on PyMem_Realloc() instead of realloc() * PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(), instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
* | Optimize ascii(str): don't encode/decode repr if repr is already ASCIIVictor Stinner2013-04-141-0/+3
| |
* | initialize map/filter/zip in _PyBuiltin_Init rather than the catch-all functionBenjamin Peterson2012-10-311-9/+0
| |
* | merge 3.3 (#16369)Benjamin Peterson2012-10-311-0/+24
|\ \ | |/
| * merge 3.2 (#16369)Benjamin Peterson2012-10-311-0/+24
| |\
| | * initialize more global type objects (closes #16369)Benjamin Peterson2012-10-311-0/+24
| | |
| | * Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-051-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sporadic crashes in multi-thread programs when several long deallocator chains ran concurrently and involved subclasses of built-in container types. Because of this change, a couple extension modules compiled for 3.2.4 (those which use the trashcan mechanism, despite it being undocumented) will not be loadable by 3.2.3 and earlier. However, extension modules compiled for 3.2.3 and earlier will be loadable by 3.2.4.
* | | Added notimplemented_dealloc for better error reportingArmin Ronacher2012-10-061-1/+10
|/ /
* | Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-051-0/+37
| | | | | | | | | | | | | | | | | | | | | | sporadic crashes in multi-thread programs when several long deallocator chains ran concurrently and involved subclasses of built-in container types. Because of this change, a couple extension modules compiled for 3.2.4 (those which use the trashcan mechanism, despite it being undocumented) will not be loadable by 3.2.3 and earlier. However, extension modules compiled for 3.2.3 and earlier will be loadable by 3.2.4.
* | Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-221-0/+12
| | | | | | | | allocation issues
* | Eric Snow's implementation of PEP 421.Barry Warsaw2012-06-031-0/+3
| | | | | | | | Issue 14673: Add sys.implementation
* | Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-23/+4
| | | | | | | | Patch from Mark Shannon.
* | merge 3.2 (#14509)Benjamin Peterson2012-04-091-0/+2
|\ \ | |/
* | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-041-0/+13
| | | | | | | | the stable ABI.
* | Micro-optimize PyObject_GetAttrString()Victor Stinner2012-03-221-1/+1
| | | | | | | | w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
* | refactor and avoid warningsBenjamin Peterson2012-03-091-7/+5
| |
* | Issue #14211: _PyObject_GenericSetAttrWithDict() keeps a strong reference toVictor Stinner2012-03-081-4/+5
| | | | | | | | | | the descriptor because it may be destroyed before being used, destroyed during the update of the dict for example.
* | - Issue #10181: New memoryview implementation fixes multiple ownershipStefan Krah2012-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and lifetime issues of dynamically allocated Py_buffer members (#9990) as well as crashes (#8305, #7433). Many new features have been added (See whatsnew/3.3), and the documentation has been updated extensively. The ndarray test object from _testbuffer.c implements all aspects of PEP-3118, so further development towards the complete implementation of the PEP can proceed in a test-driven manner. Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review and many ideas. - Issue #12834: Fix incorrect results of memoryview.tobytes() for non-contiguous arrays. - Issue #5231: Introduce memoryview.cast() method that allows changing format and shape without making a copy of the underlying memory.
* | merge 3.2Benjamin Peterson2012-02-211-0/+1
|\ \ | |/
* | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-1/+12
|\ \ | |/
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
* | | add generic implementation of a __dict__ descriptor for C typesBenjamin Peterson2012-02-201-0/+42
| | |
* | | use the static identifier api for looking up special methodsBenjamin Peterson2012-01-221-4/+4
| | | | | | | | | | | | | | | I had to move the static identifier code from unicodeobject.h to object.h in order for this to work.
* | | Consolidate the occurrances of the prime used as the multiplier when hashing.Gregory P. Smith2012-01-141-1/+1
|\ \ \ | |/ /
* | | improve abstract property support (closes #11610)Benjamin Peterson2011-12-151-0/+23
| | | | | | | | | | | | Thanks to Darren Dale for patch.