Andrew Svetlov
3ba3a3ee56
Issue #15422 : get rid of PyCFunction_New macro
2012-12-25 13:32:35 +02:00
Andrew Svetlov
2cd8ce4690
Issue #9856 : Replace deprecation warinigs to raising TypeError in object.__format__
...
Patch by Florent Xicluna.
2012-12-23 14:27:17 +02:00
Benjamin Peterson
3cb90241fc
merge 3.3
2012-10-31 00:04:42 -04:00
Benjamin Peterson
2c05a2e01b
do safety checks on __qualname__ assignment
2012-10-31 00:01:15 -04:00
Benjamin Peterson
8afa7fa510
don't shadow the __qualname__ descriptor with __qualname__ in the class's __dict__ ( closes #16271 )
2012-10-30 23:51:03 -04:00
Victor Stinner
4ca1cf35fb
Issue #16086 : PyTypeObject.tp_flags and PyType_Spec.flags are now unsigned
...
... (unsigned long and unsigned int) to avoid an undefined behaviour with
Py_TPFLAGS_TYPE_SUBCLASS ((1 << 31). PyType_GetFlags() result type is now
unsigned too (unsigned long, instead of long).
2012-10-30 23:40:45 +01:00
Trent Nelson
da064d0745
Silence compiler warnings on Solaris 10 via explicit (void *) casts.
2012-09-18 22:00:25 -04:00
Trent Nelson
ab02db23b1
Silence compiler warnings on Solaris 10 via explicit (void *) casts.
...
(Compiler: Solaris Studio 12.3)
2012-09-18 21:58:03 -04:00
Christian Heimes
76c082911b
Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_qualname returns NULL. CID 715371
2012-09-10 17:00:30 +02:00
Christian Heimes
e81dc296f2
Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_name returns NULL. CID 715371
2012-09-10 16:57:36 +02:00
Christian Heimes
455657961e
Fixed possible reference leak to mod when type_name() returns NULL
2012-09-10 03:01:16 +02:00
Christian Heimes
a0e7e41cba
Fixed possible reference leak to mod when type_name() returns NULL
2012-09-10 03:00:14 +02:00
Antoine Pitrou
5b4faae307
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
...
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Note that the trashcan functions are part of the stable ABI, therefore
they have to be kept around for binary compatibility of extensions.
2012-09-06 01:17:42 +02:00
Antoine Pitrou
56cd62c04a
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
...
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.
2012-09-06 00:59:49 +02:00
Benjamin Peterson
6a42bd67d7
Make super() internal errors RuntimeError instead of SystemError ( closes #15839 )
2012-09-01 23:04:38 -04:00
Antoine Pitrou
721738fbee
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:20:39 +02:00
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:18:25 +02:00
Antoine Pitrou
66a3a7ed10
Try to fix crash on x86 OpenIndiana buildbot.
2012-06-24 00:42:59 +02:00
Antoine Pitrou
1351ca6e66
Replace assert() with a more informative fatal error.
2012-06-24 00:30:12 +02:00
Antoine Pitrou
bb78f57c14
Use struct member (ht_type) instead of casting pointers.
2012-06-24 00:18:27 +02:00
Martin v. Löwis
9c56409d33
Issue #15146 : Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
2012-06-23 23:20:45 +02:00
Antoine Pitrou
99cc629969
Issue #15142 : Fix reference leak when deallocating instances of types created using PyType_FromSpec().
2012-06-23 14:42:38 +02:00
Antoine Pitrou
a4db02c7a3
Issue #15142 : Fix reference leak when deallocating instances of types created using PyType_FromSpec().
2012-06-23 14:45:21 +02:00
Nick Coghlan
0b43bcf528
Close #14857 : fix regression in references to PEP 3135 implicit __class__ closure variable. Reopens issue #12370 , but also updates unittest.mock to workaround that issue
2012-05-27 18:17:07 +10:00
Antoine Pitrou
1b634c266c
Use size_t, not ssize_t (issue #14801 ).
2012-05-14 14:44:37 +02:00
Antoine Pitrou
a1433fed8e
Remove tab characters
2012-05-14 14:43:25 +02:00
Antoine Pitrou
682d94c11a
Use size_t, not ssize_t (issue #14801 ).
2012-05-14 14:43:03 +02:00
Benjamin Peterson
1cffbac2cb
merge 3.2 ( #14752 )
2012-05-08 09:22:45 -04:00
Benjamin Peterson
89a6e9a27b
fix possible refleak ( closes #14752 )
2012-05-08 09:22:24 -04:00
Benjamin Peterson
64acccf46d
decref cached keys on type deallocation ( #13903 )
2012-04-27 15:07:36 -04:00
Martin v. Loewis
4f2f3b6217
Account for shared keys in type's __sizeof__ ( #13903 ).
2012-04-24 19:13:57 +02:00
Benjamin Peterson
42f58818d6
merge 3.2 ( #14658 )
2012-04-24 11:09:20 -04:00
Benjamin Peterson
7b1668735a
don't use a slot wrapper from a different special method ( closes #14658 )
...
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
2012-04-24 11:06:25 -04:00
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
...
Patch from Mark Shannon.
2012-04-23 11:24:50 -04:00
Benjamin Peterson
9ee601e197
merge 3.2
2012-04-01 18:51:37 -04:00
Benjamin Peterson
b6af60c2a9
adjust formatting
2012-04-01 18:49:54 -04:00
Benjamin Peterson
3471bb67e7
remove extraneous condition
2012-04-01 18:48:40 -04:00
Benjamin Peterson
ab3c1c1994
be consistent with rest of function
2012-04-01 18:48:02 -04:00
Victor Stinner
3c1e48176e
Issue #14383 : Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
...
These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
2012-03-26 22:10:51 +02:00
Benjamin Peterson
96384b93aa
make extra arguments to object.__init__/__new__ to errors in most cases (finishes #1683368 )
2012-03-17 00:05:44 -05:00
Benjamin Peterson
9a03ecfa50
simply this slightly
2012-03-16 20:15:54 -05:00
Benjamin Peterson
de394543b4
merge 3.2 ( #14334 )
2012-03-16 09:35:38 -05:00
Benjamin Peterson
16d84ac355
check to make sure the attribute is a string ( #14334 )
2012-03-16 09:32:59 -05:00
Victor Stinner
d74782b0ac
Close #14199 : _PyType_Lookup() and super_getattro() keep a strong reference to
...
the type MRO to avoid a crash if the MRO is changed during the lookup.
2012-03-09 00:39:08 +01:00
Benjamin Peterson
9a6338651e
merge 3.2 (#3787e896dbe9)
2012-03-07 18:52:52 -06:00
Benjamin Peterson
52c424343d
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
...
Patch from Armin, test from me.
2012-03-07 18:41:11 -06:00
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