Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csv.Error can't be subclassed #88255

Closed
hoefling mannequin opened this issue May 9, 2021 · 3 comments
Closed

csv.Error can't be subclassed #88255

hoefling mannequin opened this issue May 9, 2021 · 3 comments
Assignees
Labels
3.10 only security fixes 3.11 only security fixes extension-modules C modules in the Modules dir

Comments

@hoefling
Copy link
Mannequin

hoefling mannequin commented May 9, 2021

BPO 44089
Nosy @orsenthil, @encukou, @miss-islington, @hoefling, @Fidget-Spinner
PRs
  • bpo-44089: Allow subclassing of csv.Error #26008
  • [3.10] bpo-44089: Allow subclassing of csv.Error (GH-26008) #26066
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/orsenthil'
    closed_at = <Date 2021-05-12.14:03:02.273>
    created_at = <Date 2021-05-09.12:15:42.830>
    labels = ['extension-modules', '3.10', '3.11']
    title = "csv.Error can't be subclassed"
    updated_at = <Date 2021-05-12.14:04:27.564>
    user = 'https://github.com/hoefling'

    bugs.python.org fields:

    activity = <Date 2021-05-12.14:04:27.564>
    actor = 'orsenthil'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2021-05-12.14:03:02.273>
    closer = 'orsenthil'
    components = ['Extension Modules']
    creation = <Date 2021-05-09.12:15:42.830>
    creator = 'hoefling'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44089
    keywords = ['patch']
    message_count = 3.0
    messages = ['393320', '393513', '393514']
    nosy_count = 5.0
    nosy_names = ['orsenthil', 'petr.viktorin', 'miss-islington', 'hoefling', 'kj']
    pr_nums = ['26008', '26066']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44089'
    versions = ['Python 3.10', 'Python 3.11']

    @hoefling
    Copy link
    Mannequin Author

    hoefling mannequin commented May 9, 2021

    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

    @hoefling hoefling mannequin added 3.10 only security fixes 3.11 only security fixes extension-modules C modules in the Modules dir labels May 9, 2021
    @orsenthil
    Copy link
    Member

    New changeset 3e44e9a by Miss Islington (bot) in branch '3.10':
    bpo-44089: Allow subclassing of csv.Error (GH-26008) (GH-26066)
    3e44e9a

    @orsenthil orsenthil self-assigned this May 12, 2021
    @orsenthil orsenthil self-assigned this May 12, 2021
    @orsenthil
    Copy link
    Member

    This was also merged in 3.11 2b458c1

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant