Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
index 46361c8..2cdc807 100644
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -53,8 +53,8 @@
self.assertEqual(obj.dialect.skipinitialspace, False)
self.assertEqual(obj.dialect.strict, False)
# Try deleting or changing attributes (they are read-only)
- self.assertRaises(TypeError, delattr, obj.dialect, 'delimiter')
- self.assertRaises(TypeError, setattr, obj.dialect, 'delimiter', ':')
+ self.assertRaises(AttributeError, delattr, obj.dialect, 'delimiter')
+ self.assertRaises(AttributeError, setattr, obj.dialect, 'delimiter', ':')
self.assertRaises(AttributeError, delattr, obj.dialect, 'quoting')
self.assertRaises(AttributeError, setattr, obj.dialect,
'quoting', None)