[issue40737] Handle PyModule_AddObject() error correctly in sqlite3

2020-05-23 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: This issue could probably be expanded to the whole Modules directory. A lot of the modules fail to clean up properly on PyModule_AddObject() error. -- ___ Python tracker

[issue40737] Handle PyModule_AddObject() error correctly in sqlite3

2020-05-22 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +19592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20323 ___ Python tracker ___ __

[issue40737] Handle PyModule_AddObject() error correctly in sqlite3

2020-05-22 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : According to the documentation, PyModule_AddObject() only decrements the reference count of value on success. The calling code must PyDECREF() manually on error. Fixed by attached patch. -- components: Library (Lib) files: 0001-Use-PyModul