This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author twouters
Recipients gregory.p.smith, twouters
Date 2021-07-13.21:49:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626212953.96.0.40256914813.issue44630@roundup.psfhosted.org>
In-reply-to
Content
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.)
History
Date User Action Args
2021-07-13 21:49:14twouterssetrecipients: + twouters, gregory.p.smith
2021-07-13 21:49:13twouterssetmessageid: <1626212953.96.0.40256914813.issue44630@roundup.psfhosted.org>
2021-07-13 21:49:13twouterslinkissue44630 messages
2021-07-13 21:49:13twouterscreate