Eddie Elizondo <eduardo.elizondoru...@gmail.com> added the comment:

@ronaldoussoren

* This change currently works for all CPython. If you are using this pattern 
then you probably want to be using PyType_FromSpec rather than having a static 
PyTypeObject as discussed in PEP384: https://www.python.org/dev/peps/pep-0384. 
In general, extensions should all be using PyType_FromSpec rather than static 
PyTypeObjects.

* As mentioned by Erik Bray in the e-mail thread, the usage of a static 
PyTypeObject with a PyVarObject_HEAD_INIT requires a compile-time constant. 
This causes problems cross-compatibility problems, especially with Windows. You 
can read more here: 
http://iguananaut.net/blog/programming/windows-data-import.html

In general, this pattern is just pervasive. It causes cross-compatibility 
issues, it can cause users to forget calling PyType_Ready on a type and we are 
better off without it.

Again, please read the mail thread. Everything that I'm saying here is all 
discussed there.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34522>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to