[Python-Dev] PEP 442 accepted

Antoine Pitrou solipsis at pitrou.net
Fri Jun 14 20:09:08 CEST 2013


On Fri, 14 Jun 2013 19:34:41 +0200
Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Wed, 5 Jun 2013 09:10:54 -0700
> Benjamin Peterson <benjamin at python.org> wrote:
> > I (and Guido) are accepting PEP 442 (Safe object finalization) on the
> > condition that finalizers are only ever called once globally.
> 
> Ok, so there's an issue with that condition: it can't be upholded on
> non-GC objects. Creating a non-GC object is quite obscure and rare,
> though, since it requires basically a class with no __dict__ and an
> empty __slots__: [...]

One more problem, albeit minor: there's a test_descr failure in some
part marked as "CPython implementation detail":

======================================================================
FAIL: test_subtype_resurrection (test.test_descr.ClassPropertiesAndMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/cpython/finalize/Lib/test/test_descr.py", line 3749, in test_subtype_resurrection
    self.assertEqual(len(C.container), 1)
AssertionError: 0 != 1


However, the third-party test suites (Tornado, Tulip, SQLAlchemy,
Django, zope.interface) show no regressions.

Regards

Antoine.




More information about the Python-Dev mailing list