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

Unused Superclass in calendar.py #67493

Closed
CliffM mannequin opened this issue Jan 22, 2015 · 4 comments
Closed

Unused Superclass in calendar.py #67493

CliffM mannequin opened this issue Jan 22, 2015 · 4 comments
Labels
easy stdlib Python modules in the Lib dir tests Tests in the Lib/test dir

Comments

@CliffM
Copy link
Mannequin

CliffM mannequin commented Jan 22, 2015

BPO 23304
Nosy @berkerpeksag, @serhiy-storchaka
Files
  • calendar_1.patch
  • 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 = None
    closed_at = <Date 2015-02-28.09:22:10.286>
    created_at = <Date 2015-01-22.21:46:50.237>
    labels = ['easy', 'tests', 'library', 'invalid']
    title = 'Unused Superclass in calendar.py'
    updated_at = <Date 2015-02-28.17:04:44.140>
    user = 'https://bugs.python.org/CliffM'

    bugs.python.org fields:

    activity = <Date 2015-02-28.17:04:44.140>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-02-28.09:22:10.286>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2015-01-22.21:46:50.237>
    creator = 'CliffM'
    dependencies = []
    files = ['37891']
    hgrepos = []
    issue_num = 23304
    keywords = ['patch', 'easy']
    message_count = 4.0
    messages = ['234513', '234895', '234915', '234917']
    nosy_count = 4.0
    nosy_names = ['berker.peksag', 'serhiy.storchaka', 'CliffM', 'Vipul.Sharma']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue23304'
    versions = ['Python 3.5']

    @CliffM
    Copy link
    Mannequin Author

    CliffM mannequin commented Jan 22, 2015

    calendar.py ( lines 17,18 ) is not used :

    # Exception raised for bad input (with string parameter for details)
    error = ValueError

    This could either be deleted OR used as the superclass in the next two class declarations as the comment suggests.

    @CliffM CliffM mannequin added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir labels Jan 22, 2015
    @SilentGhost SilentGhost mannequin added the easy label Jan 22, 2015
    @VipulSharma
    Copy link
    Mannequin

    VipulSharma mannequin commented Jan 28, 2015

    I am submitting a patch file, hope this works. Please review it and correct me if I am wrong anywhere as this is my first contribution.

    @berkerpeksag
    Copy link
    Member

    Looks like "error" was unused since https://hg.python.org/cpython/rev/acdc0b9a6c78#l2.48 (see also https://hg.python.org/cpython/rev/6ee380349c84/ for time.gmtime()). LGTM.

    @serhiy-storchaka
    Copy link
    Member

    I suppose that calendar.error is here for compatibility. It is an alias to ValueError, so that errors raised by the calendar module can be catched with the "except calendar.error:" statement. Making calendar.error different class will likely break user code. I am inclined to reject this patch.

    @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
    easy stdlib Python modules in the Lib dir tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants