diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-13 23:18:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 23:18:28 (GMT) |
commit | bb260c2a212aee2a7d7a32bf5208fd554bf72713 (patch) | |
tree | cfdd7bdb3afba63d966183bdf5dad5573fb08030 /Lib/plistlib.py | |
parent | 425756abdc03263ab3a52b068befd1ddb16c2dd2 (diff) | |
download | cpython-bb260c2a212aee2a7d7a32bf5208fd554bf72713.zip cpython-bb260c2a212aee2a7d7a32bf5208fd554bf72713.tar.gz cpython-bb260c2a212aee2a7d7a32bf5208fd554bf72713.tar.bz2 |
[3.10] bpo-44630: Fix assertion errors in csv module (GH-27127) (GH-27129)
Fix incorrect handling of exceptions when interpreting dialect objects in
the csv module. Not clearing exceptions between calls to
PyObject_GetAttrString() causes assertion failures in pydebug mode (or with
assertions enabled).
Add a minimal test that would've caught this (passing None as dialect, or
any object that isn't a csv.Dialect subclass, which the csv module allows
and caters to, even though it is not documented.) In pydebug mode, the test
triggers the assertion failure in the old code.
Contributed-By: T. Wouters [Google]
(cherry picked from commit 0093876328afa330224c9d887c18dee0b3117852)
Co-authored-by: T. Wouters <thomas@python.org>
Automerge-Triggered-By: GH:gpshead
Diffstat (limited to 'Lib/plistlib.py')
0 files changed, 0 insertions, 0 deletions