summaryrefslogtreecommitdiff
path: root/Objects/object.c
Commit message (Collapse)AuthorAgeFilesLines
* initialize more global type objects (closes #16369)Benjamin Peterson2012-10-301-0/+24
|
* Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-061-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.
* 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.
* | make sure to initialize the method wrapper typeBenjamin Peterson2011-09-011-0/+3
| |
* | remove duplicated type readyBenjamin Peterson2011-07-291-3/+0
| |
* | merge 3.1Benjamin Peterson2011-05-231-5/+6
|\ \ | |/
| * correctly lookup __dir__Benjamin Peterson2011-05-231-5/+6
| |
| * Merged revisions 84717 via svnmerge fromBenjamin Peterson2010-09-111-6/+6
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84717 | benjamin.peterson | 2010-09-11 11:39:57 -0500 (Sat, 11 Sep 2010) | 1 line fix formatting ........
| * Merged revisions 84344 via svnmerge fromAntoine Pitrou2010-08-281-48/+65
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84344 | antoine.pitrou | 2010-08-28 20:17:03 +0200 (sam., 28 août 2010) | 4 lines Issue #1868: Eliminate subtle timing issues in thread-local objects by getting rid of the cached copy of thread-local attribute dictionary. ........
| * Merged revisions 83184 via svnmerge fromAntoine Pitrou2010-07-271-13/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83184 | antoine.pitrou | 2010-07-28 00:08:27 +0200 (mer., 28 juil. 2010) | 3 lines Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg. ........
| * Merged revisions 81250-81253 via svnmerge fromVictor Stinner2010-05-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81250 | victor.stinner | 2010-05-17 03:13:37 +0200 (lun., 17 mai 2010) | 2 lines Issue #6697: Fix a crash if code of "python -c code" contains surrogates ........ r81251 | victor.stinner | 2010-05-17 03:26:01 +0200 (lun., 17 mai 2010) | 3 lines PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead of strict) error handler to escape surrogates ........ r81252 | victor.stinner | 2010-05-17 10:58:51 +0200 (lun., 17 mai 2010) | 6 lines handle_system_exit() flushs files to warranty the output order PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr() writes into the Python object sys.stderr. Each object has its own buffer, so call sys.stderr.flush() and fflush(stderr). ........ r81253 | victor.stinner | 2010-05-17 11:33:42 +0200 (lun., 17 mai 2010) | 6 lines Fix refleak in internal_print() introduced by myself in r81251 _PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is destroyed. ........
| * Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-1221/+1221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
| * Merged revisions 78876 via svnmerge fromVictor Stinner2010-03-211-5/+12
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78876 | victor.stinner | 2010-03-12 18:17:58 +0100 (ven., 12 mars 2010) | 3 lines Issue #6697: catch _PyUnicode_AsString() errors in getattr() and setattr() builtin functions. ........
| * Merged revisions 76663 via svnmerge fromMark Dickinson2009-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76663 | mark.dickinson | 2009-12-04 10:06:06 +0000 (Fri, 04 Dec 2009) | 1 line Issue #7430: Remove lingering reference to cmp in recursion error message. ........
| * Merged revisions 74459 via svnmerge fromBenjamin Peterson2009-08-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74459 | benjamin.peterson | 2009-08-15 08:23:05 -0500 (Sat, 15 Aug 2009) | 9 lines Merged revisions 74457 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line #6707 fix a crash with dir() on an uninitialized module ........ ................
* | Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+13
| |
* | Remove redundant includes of headers that are already included by Python.h.Georg Brandl2010-11-301-1/+0
| |
* | follow up to #9778: define and use an unsigned hash typeBenjamin Peterson2010-10-231-4/+4
| |
* | make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-7/+7
| |
* | Use locale encoding if Py_FileSystemDefaultEncoding is not setVictor Stinner2010-10-151-4/+0
| | | | | | | | | | | | | | | | * PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
* | Issue #9630: Redecode filenames when setting the filesystem encodingVictor Stinner2010-09-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Redecode the filenames of: - all modules: __file__ and __path__ attributes - all code objects: co_filename attribute - sys.path - sys.meta_path - sys.executable - sys.path_importer_cache (keys) Keep weak references to all code objects until initfsencoding() is called, to be able to redecode co_filename attribute of all code objects.
* | fix formattingBenjamin Peterson2010-09-111-6/+6
| |
* | Issue #1868: Eliminate subtle timing issues in thread-local objects byAntoine Pitrou2010-08-281-48/+65
| | | | | | | | getting rid of the cached copy of thread-local attribute dictionary.
* | Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.Antoine Pitrou2010-07-271-13/+2
| |
* | Issue #8188: Introduce a new scheme for computing hashes of numbersMark Dickinson2010-05-231-49/+87
| | | | | | | | | | | | (instances of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it easy to maintain the invariant that hash(x) == hash(y) whenever x and y have equal value.
* | Issue #8749: remove unused code in Objects/object.c. Thanks Yaniv Aknin.Mark Dickinson2010-05-221-24/+0
| |
* | Fix refleak in internal_print() introduced by myself in r81251Victor Stinner2010-05-171-0/+1
| | | | | | | | | | | | _PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is destroyed.
* | PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (insteadVictor Stinner2010-05-171-1/+3
| | | | | | | | of strict) error handler to escape surrogates
* | Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1226/+1226
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* | Merged revisions 79809 via svnmerge fromMark Dickinson2010-04-061-3/+6
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79809 | mark.dickinson | 2010-04-05 19:54:51 +0100 (Mon, 05 Apr 2010) | 1 line Use a better NaN test in _Py_HashDouble as well. ........
* | Merged revisions 79804 via svnmerge fromMark Dickinson2010-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79804 | mark.dickinson | 2010-04-05 19:07:51 +0100 (Mon, 05 Apr 2010) | 5 lines Use a more robust infinity check in _Py_HashDouble. This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.) ........
* | Issue #6697: catch _PyUnicode_AsString() errors in getattr() and setattr()Victor Stinner2010-03-121-5/+12
| | | | | | | | builtin functions.
* | Issue #7430: Remove lingering reference to cmp in recursion error message.Mark Dickinson2009-12-041-1/+1
| |
* | Issue #6970: Remove redundant calls made when comparing objects.Mark Dickinson2009-11-151-1/+3
| |
* | Issue 7147 - remove ability to attempt to build Python without complex ↵Skip Montanaro2009-10-181-2/+1
| | | | | | | | number support (was broken anyway)
* | Merged revisions 74457 via svnmerge fromBenjamin Peterson2009-08-151-3/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74457 | benjamin.peterson | 2009-08-15 08:16:38 -0500 (Sat, 15 Aug 2009) | 1 line #6707 fix a crash with dir() on an uninitialized module ........
* | remove reference to PyCObjectBenjamin Peterson2009-07-011-3/+0
|/
* Merged revisions 72907 via svnmerge fromBenjamin Peterson2009-05-251-0/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72907 | benjamin.peterson | 2009-05-24 21:40:21 -0500 (Sun, 24 May 2009) | 1 line handle errors from _PyObject_LookupSpecial when __get__ fails ........
* these builtins have to be initializedBenjamin Peterson2009-05-091-0/+9
|
* this is now a bound methodBenjamin Peterson2009-05-081-1/+1
|
* Merged revisions 72461 via svnmerge fromBenjamin Peterson2009-05-081-9/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72461 | benjamin.peterson | 2009-05-07 22:06:00 -0500 (Thu, 07 May 2009) | 1 line add _PyObject_LookupSpecial to handle fetching special method lookup ........
* add a replacement API for PyCObject, PyCapsule #5630Benjamin Peterson2009-05-051-1/+4
| | | | | | All stdlib modules with C-APIs now use this. Patch by Larry Hastings
* Merged revisions 71734,71738-71739 via svnmerge fromBenjamin Peterson2009-04-201-6/+44
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71734 | benjamin.peterson | 2009-04-18 17:15:26 -0500 (Sat, 18 Apr 2009) | 1 line many more types to initialize (I had to expose some of them) ........ r71738 | benjamin.peterson | 2009-04-18 21:32:42 -0500 (Sat, 18 Apr 2009) | 1 line initialize weakref some weakref types ........ r71739 | benjamin.peterson | 2009-04-18 21:40:43 -0500 (Sat, 18 Apr 2009) | 1 line make errors consistent ........
* Merged revisions 71722 via svnmerge fromBenjamin Peterson2009-04-181-7/+61
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71722 | benjamin.peterson | 2009-04-18 15:12:47 -0500 (Sat, 18 Apr 2009) | 1 line try to initalize all builtin types with PyType_Ready to avoid problems like #5787 ........
* Merge revision 71222 from trunk: #5615: make it possible to configure ↵Georg Brandl2009-04-051-0/+6
| | | | --without-threads again.
* Merged revisions 69846 via svnmerge fromMark Dickinson2009-02-211-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........
* Merged revisions 69582-69583 via svnmerge fromAntoine Pitrou2009-02-131-15/+7
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69582 | antoine.pitrou | 2009-02-13 14:52:33 +0100 (ven., 13 févr. 2009) | 4 lines Issue #5186: Reduce hash collisions for objects with no __hash__ method by rotating the object pointer by 4 bits to the right. ........ r69583 | antoine.pitrou | 2009-02-13 14:57:40 +0100 (ven., 13 févr. 2009) | 3 lines Fix compiler warning (gcc) ........
* Merged revisions 69436 via svnmerge fromMark Dickinson2009-02-081-1/+1
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69436 | mark.dickinson | 2009-02-08 14:42:28 +0000 (Sun, 08 Feb 2009) | 10 lines Issue #789290: make sure that hash(2**63) == hash(2.**63) on 64-bit platforms. The previous code was fragile, depending on the twin accidents that: (1) in C, casting the double value 2.**63 to long returns the integer value -2**63, and (2) in Python, hash(-2**63) == hash(2**63). There's already a test for this in test_hash. ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-3/+3
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.