Author arigo
Recipients _doublep, amaury.forgeotdarc, arigo, georg.brandl
Date 2008-01-21.10:16:23
SpamBayes Score 0.0458815
Marked as misclassified No
Message-id <1200910585.83.0.0844773470905.issue1878@psf.upfronthosting.co.za>
In-reply-to
Content
I don't see in general how the patch can be kept compatible with
extension modules that change the tp_dict of arbitrary types.  All I can
think of is a way to be safe against extension modules that only change
the tp_dict of their own non-heap types (i.e. types defined in C).  The
method cache is disabled for types that don't have the
Py_TPFLAGS_HAVE_VERSION_TAG flag; so if we would leave this flag out of
Py_TPFLAGS_DEFAULT, non-heap types from extension modules would by
default not use the cache.

I'm not sure about the API for this.  Would we then need to put
Py_TPFLAGS_HAVE_VERSION_TAG explicitly on all core types?  And about how
to change tp_dict in a way that makes the cache happy - do we need to
turn type_modified() into a public API?

All in all, the lack of abstraction of the C API might kill the idea of
this patch for CPython.
History
Date User Action Args
2008-01-21 10:16:26arigosetspambayes_score: 0.0458815 -> 0.0458815
recipients: + arigo, georg.brandl, amaury.forgeotdarc, _doublep
2008-01-21 10:16:25arigosetspambayes_score: 0.0458815 -> 0.0458815
messageid: <1200910585.83.0.0844773470905.issue1878@psf.upfronthosting.co.za>
2008-01-21 10:16:24arigolinkissue1878 messages
2008-01-21 10:16:24arigocreate