Victor Stinner
6f73874edd
Close #14095 : type.__new__() doesn't remove __qualname__ key from the class
dict anymore if the key is present. Reject also non-string qualified names.
And fix reference leaks in type.__new__().
14 years ago
Benjamin Peterson
006c5a2235
check for NULL to fix segfault
14 years ago
Benjamin Peterson
8eb1269c34
add generic implementation of a __dict__ descriptor for C types
14 years ago
Benjamin Peterson
2652d2570e
ready types returned from PyType_FromSpec
14 years ago
Benjamin Peterson
e28108cbd7
adjust declaration
14 years ago
Benjamin Peterson
ce79852077
use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
14 years ago
Antoine Pitrou
5b62942074
Issue #13577 : Built-in methods and functions now have a __qualname__.
Patch by sbt.
14 years ago
Antoine Pitrou
2e872082f6
Fix the fix for issue #12149 : it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
14 years ago
Florent Xicluna
aa6c1d240f
Issue #13575 : there is only one class type.
14 years ago
Antoine Pitrou
86a36b500a
PEP 3155 / issue #13448 : Qualified name for classes and functions.
14 years ago
Eli Bendersky
d3baae73be
Issue #13161 : fix doc strings of __i*__ operators
14 years ago
Martin v. Löwis
d10759f6ed
Make _PyUnicode_FromId return borrowed references.
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
14 years ago
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
15 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
15 years ago
Martin v. Löwis
bfc6d74b25
Use GetAttrId directly. Proposed by Amaury.
15 years ago
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
15 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
15 years ago
Victor Stinner
639418812f
Use the new Py_ARRAY_LENGTH macro
15 years ago
Ezio Melotti
2aa2b3b4d5
Clean up a few tabs that went in with PEP393.
15 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 years ago
Benjamin Peterson
01fc6cd056
make __doc__ mutable on heaptypes ( closes #12773 )
15 years ago
Benjamin Peterson
d9f23d2004
factor out common checks for setting special type attributes
15 years ago
Benjamin Peterson
d17cefc787
crush other possible refleaks in this section
15 years ago
Benjamin Peterson
ae13c88d8d
fix possible refleaks
15 years ago
Benjamin Peterson
c4085c8470
complain when a class variable shadows a name in __slots__ ( closes #12766 )
15 years ago
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724 .
15 years ago
Antoine Pitrou
8cdc40e3b0
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
Patch by Andreas Stührk.
15 years ago
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.
15 years ago
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)
15 years ago
Benjamin Peterson
c7284122be
indicate return value on __dir__ methods
15 years ago
Benjamin Peterson
fbe56bb8bd
use '->' to indicate return values
15 years ago
Benjamin Peterson
82b00c1d30
move specialized dir implementations into __dir__ methods ( closes #12166 )
15 years ago
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Eric V. Smith
b9cd3531c4
Issue 9856: Change object.__format__ with a non-empty format string from a PendingDeprecationWarning to a DeprecationWarning.
15 years ago
Antoine Pitrou
16c4ce1903
Issue #9935 : Speed up pickling of instances of user-defined classes.
15 years ago
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
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.
........
15 years ago
Martin v. Löwis
5e06a5d4cd
- Check for NULL result in PyType_FromSpec.
15 years ago
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.
15 years ago
Martin v. Löwis
738236dbd6
Issue #11067 : Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI
15 years ago
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
........
15 years ago
Benjamin Peterson
37b9e46a04
remove unneeded assertion
15 years ago
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
........
15 years ago
Benjamin Peterson
0dd5ca0882
correct assertion
15 years ago
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.
........
15 years ago
Benjamin Peterson
67641d25d4
turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
15 years ago
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
........
15 years ago
Benjamin Peterson
23b628ed0b
use PyErr_SetString instead of PyErr_Format
15 years ago
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
........
15 years ago