classification
Title: csv.Error can't be subclassed
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: hoefling, kj, miss-islington, orsenthil, petr.viktorin
Priority: normal Keywords: patch

Created on 2021-05-09 12:15 by hoefling, last changed 2021-05-12 14:04 by orsenthil. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26008 merged kj, 2021-05-09 14:54
PR 26066 merged miss-islington, 2021-05-12 13:47
Messages (3)
msg393320 - (view) Author: Oleg Hoefling (hoefling) * Date: 2021-05-09 12:15
Due to changes introduced in https://bugs.python.org/issue14935 the `csv.Error` can't be subclassed in 3.10. To reproduce:

Python 3.9.4 (default, Apr  6 2021, 00:00:00)
>>> import csv
>>> class C(csv.Error):
...     pass


Python 3.10.0b1 (default, May  4 2021, 00:00:00)
>>> import csv
>>> class C(csv.Error):
...     pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: type '_csv.Error' is not an acceptable base type
msg393513 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-12 14:02
New changeset 3e44e9af9ea4c5e82912a01f256d4abcae96f32b by Miss Islington (bot) in branch '3.10':
bpo-44089: Allow subclassing of ``csv.Error`` (GH-26008) (GH-26066)
https://github.com/python/cpython/commit/3e44e9af9ea4c5e82912a01f256d4abcae96f32b
msg393514 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2021-05-12 14:04
This was also merged in 3.11 https://github.com/python/cpython/commit/2b458c1dba4058c808fde25226bb2d91c5a909ca
History
Date User Action Args
2021-05-12 14:04:27orsenthilsetmessages: + msg393514
2021-05-12 14:03:02orsenthilsetstatus: open -> closed
assignee: orsenthil
resolution: fixed
stage: patch review -> resolved
2021-05-12 14:02:50orsenthilsetnosy: + orsenthil
messages: + msg393513
2021-05-12 13:47:23miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24707
2021-05-09 14:54:08kjsetkeywords: + patch
nosy: + kj

pull_requests: + pull_request24659
stage: patch review
2021-05-09 12:20:40xtreaksetnosy: + petr.viktorin
2021-05-09 12:15:42hoeflingcreate