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

Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser #78922

Closed
serhiy-storchaka opened this issue Sep 19, 2018 · 2 comments
Closed

Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser #78922

serhiy-storchaka opened this issue Sep 19, 2018 · 2 comments
Labels
3.8 only security fixes extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 34741
Nosy @scoder, @serhiy-storchaka
PRs
  • bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. #9422
  • 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 2018-10-19.15:01:12.350>
    created_at = <Date 2018-09-19.14:38:57.704>
    labels = ['extension-modules', 'type-feature', '3.8']
    title = 'Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser'
    updated_at = <Date 2018-10-19.15:01:12.349>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-10-19.15:01:12.349>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-10-19.15:01:12.350>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2018-09-19.14:38:57.704>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34741
    keywords = ['patch']
    message_count = 2.0
    messages = ['325769', '328045']
    nosy_count = 3.0
    nosy_names = ['scoder', 'eli.bendersky', 'serhiy.storchaka']
    pr_nums = ['9422']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34741'
    versions = ['Python 3.8']

    @serhiy-storchaka
    Copy link
    Member Author

    Currently pyexpat.xmlparser has the tp_getattro and tp_setattro slot for handling some attributes. The proposed PR replaces it with tp_members and tp_getset.

    Benefits: constant time access, names of these attributes are added to the result of help(), no need of the __dir__() method, better structured code.

    @serhiy-storchaka serhiy-storchaka added 3.8 only security fixes extension-modules C modules in the Modules dir type-feature A feature request or enhancement labels Sep 19, 2018
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 55f8249 by Serhiy Storchaka in branch 'master':
    bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422)
    55f8249

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

    No branches or pull requests

    1 participant