On 28.04.16 01:24, Case Van Horsen wrote:
On Wed, Apr 27, 2016 at 11:06 AM, Serhiy Storchaka <storch...@gmail.com> wrote:
I think it is better to have relation with PyModule_AddIntConstant() etc
than with PyObject_SetAttrString.

My patch doesn't introduce new public function, but changes the behavior of
the old function. This needs minimal changes to user code that mostly use
PyModule_AddObject() incorrectly (not blaming authors).

How will this impact code that uses PyModule_AddObject() correctly?

No impact except emitting a deprecation warning at build time. But we can remove a deprecation warning and add it in future release if this is annoying.

But are you sure, that your code uses PyModule_AddObject() correctly? Only two modules in the stdlib (_json and _tkinter) used it correctly. Other modules have bugs even in tries to use PyModule_AddObject() correctly for some operations.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to