Armin Rigo <[EMAIL PROTECTED]> added the comment: Maybe there is a better solution along the following line: conditionally define Py_TPFLAGS_DEFAULT so that when compiling the Python core it includes the Py_TPFLAGS_HAVE_VERSION_TAG, but when compiling extension modules it does not. This should ensure compatibility with many existing extension modules. (It would still break if they play tricks like modifying the tp_dict of types other than their own.)
In addition, to support the method cache in newer C extension modules: * C types defined by C extension modules can include the Py_TPFLAGS_HAVE_VERSION_TAG explicitly to enable the cache; * new C API functions should be introduced to give an official way to access the tp_dict of a type, e.g. PyType_{Get,Set,Del}DictItemString(). _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1878> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com