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

Remove extraneous backwards-compatibility attributes from some modules #50131

Closed
larryhastings opened this issue Apr 29, 2009 · 2 comments
Closed
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@larryhastings
Copy link
Contributor

BPO 5881
Nosy @larryhastings, @benjaminp
Files
  • lch.modulecleanup.r72081.diff: Patch against py3k/trunk r72081.
  • 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 2009-05-04.22:25:38.840>
    created_at = <Date 2009-04-29.16:50:03.981>
    labels = ['extension-modules', 'type-feature']
    title = 'Remove extraneous backwards-compatibility attributes from some modules'
    updated_at = <Date 2009-05-04.22:25:38.802>
    user = 'https://github.com/larryhastings'

    bugs.python.org fields:

    activity = <Date 2009-05-04.22:25:38.802>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-05-04.22:25:38.840>
    closer = 'benjamin.peterson'
    components = ['Extension Modules']
    creation = <Date 2009-04-29.16:50:03.981>
    creator = 'larry'
    dependencies = []
    files = ['13818']
    hgrepos = []
    issue_num = 5881
    keywords = ['patch']
    message_count = 2.0
    messages = ['86815', '87188']
    nosy_count = 2.0
    nosy_names = ['larry', 'benjamin.peterson']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5881'
    versions = ['Python 3.1']

    @larryhastings
    Copy link
    Contributor Author

    While hacking on CPython I noticed a couple of attributes that were
    there strictly for backwards compatibility with ancient modules or pure
    mistakes. They are:
    _hashlib.hash.digestsize
    pwd.struct_pwent
    _sha224.digestsize
    _sha256.digestsize
    _sha384.digestsize
    _sha512.digestsize

    None of these are part of the documented interface, and all of them are
    redundant with documented interfaces. I suggest that they can all go.

    The attached patch removes all of the above. With the patch applied
    Python passes all expected unit tests.

    @larryhastings larryhastings added extension-modules C modules in the Modules dir type-feature A feature request or enhancement labels Apr 29, 2009
    @benjaminp
    Copy link
    Contributor

    Applied in r72300.

    @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
    extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants