New submission from Thomas Wouters <tho...@python.org>:
The csv module has some incorrect exception handling when dealing with dialect objects that are not csv.Dialect subclasses (or that otherwise raise errors when accessing the dialect attributes): >>> csv.reader([], dialect=None) python: ../../cpython/Objects/typeobject.c:3820: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. Aborted The problem is Modules/_csv.c tries to cater to dialects that lack the attributes it wants to access, but does so by leaving exceptions set between calls to PyObject_SetAttrString(). Since 3.7, that causes assertion failures. (I have a PR with a fix.) ---------- assignee: twouters components: Extension Modules messages: 397446 nosy: gregory.p.smith, twouters priority: normal severity: normal status: open title: Assertion failure in csv module type: crash versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44630> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com