Skip to content

csv.Error can't be subclassed #88255

Closed
Closed

Description

@hoefling
mannequin
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']

    Activity

    1. hoefling commented on May 9, 2021

      hoeflingmannequin
      MannequinAuthor

      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
    2. orsenthil commented on May 12, 2021

      @orsenthil
      Member

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

    3. self-assigned this
      on May 12, 2021
    4. self-assigned this
      on May 12, 2021
    5. orsenthil commented on May 12, 2021

      @orsenthil
      Member

      This was also merged in 3.11 2b458c1

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions