Antoine Pitrou
093c8e4bf0
Issue #12149 : Update the method cache after a type's dictionnary gets
...
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
2011-07-12 21:58:39 +02:00
Antoine Pitrou
84f1b1718d
Issue #12149 : Update the method cache after a type's dictionnary gets
...
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
2011-07-12 21:57:15 +02:00
Benjamin Peterson
f5ff22329b
use a invalid name for the __class__ closure for super() ( closes #12370 )
...
This prevents the assignment of __class__ in the class body from breaking
super. (Although a determined person could do locals()["@__class__"] = 4)
2011-06-19 19:42:22 -05:00
Benjamin Peterson
c7284122be
indicate return value on __dir__ methods
2011-05-24 12:46:15 -05:00
Benjamin Peterson
1fdcf0e4b1
merge 3.2
2011-05-24 12:45:33 -05:00
Benjamin Peterson
17658a1ca0
merge 3.1
2011-05-24 12:44:26 -05:00
Benjamin Peterson
fbe56bb8bd
use '->' to indicate return values
2011-05-24 12:42:51 -05:00
Benjamin Peterson
82b00c1d30
move specialized dir implementations into __dir__ methods ( closes #12166 )
2011-05-24 11:09:06 -05:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Ezio Melotti
b88ed1549e
#11565 : Merge with 3.2.
2011-03-16 11:38:59 +02:00
Eric V. Smith
b9cd3531c4
Issue 9856: Change object.__format__ with a non-empty format string from a PendingDeprecationWarning to a DeprecationWarning.
2011-03-12 10:08:48 -05:00
Antoine Pitrou
16c4ce1903
Issue #9935 : Speed up pickling of instances of user-defined classes.
2011-03-11 21:30:43 +01:00
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
2011-03-02 01:03:11 +00:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +00:00
Martin v. Löwis
7be5b78b4f
Merged revisions 88456 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88456 | martin.v.loewis | 2011-02-21 17:24:00 +0100 (Mo, 21 Feb 2011) | 2 lines
- Check for NULL result in PyType_FromSpec.
........
2011-02-21 16:26:47 +00:00
Martin v. Löwis
5e06a5d4cd
- Check for NULL result in PyType_FromSpec.
2011-02-21 16:24:00 +00:00
Georg Brandl
032400b2d8
#11249 : in PyType_FromSpec, copy tp_doc slot since it usually will point to a static string literal which should not be deallocated together with the type.
2011-02-19 21:47:02 +00:00
Martin v. Löwis
738236dbd6
Issue #11067 : Add PyType_GetFlags, to support PyUnicode_Check
...
in the limited ABI
2011-02-05 20:35:29 +00:00
Benjamin Peterson
32a8fe8b56
Merged revisions 88069 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88069 | benjamin.peterson | 2011-01-17 13:54:55 -0600 (Mon, 17 Jan 2011) | 1 line
remove unneeded assertion
........
2011-01-17 20:03:01 +00:00
Benjamin Peterson
37b9e46a04
remove unneeded assertion
2011-01-17 19:54:55 +00:00
Benjamin Peterson
d82f45b720
Merged revisions 88066 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88066 | benjamin.peterson | 2011-01-17 13:44:46 -0600 (Mon, 17 Jan 2011) | 1 line
correct assertion
........
2011-01-17 19:46:48 +00:00
Benjamin Peterson
0dd5ca0882
correct assertion
2011-01-17 19:44:46 +00:00
Benjamin Peterson
acd17591f5
Merged revisions 88063 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88063 | benjamin.peterson | 2011-01-17 13:24:34 -0600 (Mon, 17 Jan 2011) | 4 lines
turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
........
2011-01-17 19:36:44 +00:00
Benjamin Peterson
67641d25d4
turn some checks into assertions, since they are implied by the caller
...
Reviewed by Georg.
2011-01-17 19:24:34 +00:00
Benjamin Peterson
a53d2acb3d
Merged revisions 87960 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87960 | benjamin.peterson | 2011-01-12 12:56:07 -0600 (Wed, 12 Jan 2011) | 1 line
use PyErr_SetString instead of PyErr_Format
........
2011-01-12 19:02:36 +00:00
Benjamin Peterson
23b628ed0b
use PyErr_SetString instead of PyErr_Format
2011-01-12 18:56:07 +00:00
Benjamin Peterson
de368717da
Merged revisions 87952-87954 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87952 | benjamin.peterson | 2011-01-12 09:24:27 -0600 (Wed, 12 Jan 2011) | 1 line
move this test to test_descr; it's not abc specific
........
r87953 | benjamin.peterson | 2011-01-12 09:25:02 -0600 (Wed, 12 Jan 2011) | 1 line
oops, wrong class
........
r87954 | benjamin.peterson | 2011-01-12 09:34:01 -0600 (Wed, 12 Jan 2011) | 1 line
don't segfault on deleting __abstractmethods__ #10892
........
2011-01-12 15:42:34 +00:00
Benjamin Peterson
477ba919c1
don't segfault on deleting __abstractmethods__ #10892
2011-01-12 15:34:01 +00:00
Victor Stinner
0fcab4a3ed
Issue #9566 : use Py_ssize_t instead of int
2011-01-04 12:59:15 +00:00
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
2010-10-23 16:20:50 +00:00
Antoine Pitrou
ff150f2921
Revert r85797 (and r85798): it broke the Windows buildbots because of
...
test_multiprocessing's misbehaviour.
2010-10-22 21:41:05 +00:00
Antoine Pitrou
7eecffd05d
Issue #9935 : Speed up pickling of instances of user-defined classes.
2010-10-22 19:43:59 +00:00
Benjamin Peterson
e7dfeeb889
-1 is reserved for errors
2010-10-17 21:27:01 +00:00
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
2010-10-17 20:54:53 +00:00
Benjamin Peterson
866c74e3d6
Merged revisions 85193 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85193 | benjamin.peterson | 2010-10-02 21:13:39 -0500 (Sat, 02 Oct 2010) | 1 line
typo
........
2010-10-03 02:19:18 +00:00
Benjamin Peterson
84060b81e3
typo
2010-10-03 02:13:39 +00:00
Benjamin Peterson
0ad44fa3f7
Merged revisions 85154,85182 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85154 | benjamin.peterson | 2010-10-01 19:03:31 -0500 (Fri, 01 Oct 2010) | 1 line
type.__abstractmethods__ should raise an AttributeError #10006
........
r85182 | benjamin.peterson | 2010-10-02 12:55:47 -0500 (Sat, 02 Oct 2010) | 1 line
add a test and a note about metaclasses now being abcs
........
2010-10-02 18:04:55 +00:00
Benjamin Peterson
aec5fd1397
type.__abstractmethods__ should raise an AttributeError #10006
2010-10-02 00:03:31 +00:00
Mark Dickinson
a67c70d4a9
Merged revisions 84984 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84984 | mark.dickinson | 2010-09-23 21:11:19 +0100 (Thu, 23 Sep 2010) | 5 lines
Issue #9930 : Remove an unnecessary type check in wrap_binaryfunc_r;
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
........
2010-09-23 20:16:03 +00:00
Mark Dickinson
b09a3d69a6
Issue #9930 : Remove an unnecessary type check in wrap_binaryfunc_r;
...
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
2010-09-23 20:11:19 +00:00
Eric Smith
e4d6317c87
Issue 7994: Make object.__format__() raise a PendingDeprecationWarning
...
if the format string is not empty. Manually merge r79596 and r84772
from 2.x.
Also, apparently test_format() from test_builtin never made it into
3.x. I've added it as well. It tests the basic format()
infrastructure.
2010-09-13 20:48:43 +00:00
Benjamin Peterson
039d0a00c8
Merged revisions 84320 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84320 | benjamin.peterson | 2010-08-25 18:13:17 -0500 (Wed, 25 Aug 2010) | 1 line
basicsize and itemsize are Py_ssize_t #9688
........
2010-08-25 23:19:30 +00:00
Benjamin Peterson
0e10206f2c
basicsize and itemsize are Py_ssize_t #9688
2010-08-25 23:13:17 +00:00
Alexander Belopolsky
102594f7ff
Merged revisions 84106 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84106 | alexander.belopolsky | 2010-08-16 16:17:07 -0400 (Mon, 16 Aug 2010) | 1 line
Issue #8983 : Corrected docstrings.
........
2010-08-16 20:26:04 +00:00
Alexander Belopolsky
977a684c94
Issue #8983 : Corrected docstrings.
2010-08-16 20:17:07 +00:00
Victor Stinner
4a2b7a1b14
Issue #9425 : Create PyErr_WarnFormat() function
...
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
2010-08-13 14:03:48 +00:00
Benjamin Peterson
20f9c3c50f
revert unintended changes
2010-07-20 22:39:34 +00:00
Benjamin Peterson
013783c529
move test_trace.py so as not to conflict with future tests for the trace module
2010-07-20 22:37:19 +00:00