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__().
2012-02-25 01:22:36 +01:00
Benjamin Peterson
006c5a2235
check for NULL to fix segfault
2012-02-19 20:36:12 -05:00
Benjamin Peterson
8eb1269c34
add generic implementation of a __dict__ descriptor for C types
2012-02-19 19:59:10 -05:00
Benjamin Peterson
2372bb0722
merge 3.2 ( closes #13908 )
2012-01-29 20:17:07 -05:00
Benjamin Peterson
2652d2570e
ready types returned from PyType_FromSpec
2012-01-29 20:16:37 -05:00
Benjamin Peterson
e28108cbd7
adjust declaration
2012-01-29 20:13:18 -05:00
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.
2012-01-22 11:24:29 -05:00
Antoine Pitrou
5b62942074
Issue #13577 : Built-in methods and functions now have a __qualname__.
...
Patch by sbt.
2011-12-23 12:40:16 +01:00
Antoine Pitrou
d73a9acb63
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.
2011-12-15 14:17:36 +01:00
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.
2011-12-15 14:15:31 +01:00
Florent Xicluna
aa6c1d240f
Issue #13575 : there is only one class type.
2011-12-12 18:54:29 +01:00
Antoine Pitrou
86a36b500a
PEP 3155 / issue #13448 : Qualified name for classes and functions.
2011-11-25 18:56:07 +01:00
Eli Bendersky
e92ff0503c
Issue #13161 : fix doc strings of __i*__ operators. Closes #13161
2011-11-11 17:02:16 +02:00
Eli Bendersky
d3baae73be
Issue #13161 : fix doc strings of __i*__ operators
2011-11-11 16:57:05 +02:00
Martin v. Löwis
d10759f6ed
Make _PyUnicode_FromId return borrowed references.
...
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
2011-11-07 13:00:05 +01:00
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
2011-10-23 22:04:16 +10:00
Nick Coghlan
9715d26305
Merge issue 1294232 patch from 3.2
2011-10-23 22:36:42 +10:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Martin v. Löwis
bfc6d74b25
Use GetAttrId directly. Proposed by Amaury.
2011-10-13 20:03:57 +02:00
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
2011-10-10 18:11:30 +02:00
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.
2011-10-09 10:38:36 +02:00
Victor Stinner
639418812f
Use the new Py_ARRAY_LENGTH macro
2011-09-29 00:42:28 +02:00
Ezio Melotti
2aa2b3b4d5
Clean up a few tabs that went in with PEP393.
2011-09-29 00:58:57 +03:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Benjamin Peterson
01fc6cd056
make __doc__ mutable on heaptypes ( closes #12773 )
2011-08-17 12:03:47 -05:00
Benjamin Peterson
d9f23d2004
factor out common checks for setting special type attributes
2011-08-17 11:54:03 -05:00
Benjamin Peterson
d17cefc787
crush other possible refleaks in this section
2011-08-16 22:28:23 -05:00
Benjamin Peterson
3e6267e704
merge 3.2
2011-08-16 22:27:42 -05:00
Benjamin Peterson
ae13c88d8d
fix possible refleaks
2011-08-16 22:26:48 -05:00
Benjamin Peterson
c4085c8470
complain when a class variable shadows a name in __slots__ ( closes #12766 )
2011-08-16 18:53:26 -05:00
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
...
The macro was introduced in #12724 .
2011-08-10 20:28:54 -05:00
Antoine Pitrou
9b43b6e14e
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:18:18 +02:00
Antoine Pitrou
ff35050493
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:17:14 +02:00
Antoine Pitrou
8cdc40e3b0
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:15:07 +02:00
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