python / cpython

The Python programming language
https://www.python.org
Other
63.35k stars 30.34k forks source link

Add PyModule_AddType helper function #84205

Closed corona10 closed 4 years ago

corona10 commented 4 years ago
BPO 40024
Nosy @vstinner, @corona10, @shihai1991, @aeros
PRs
  • python/cpython#19088
  • python/cpython#19119
  • python/cpython#19205
  • 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: ```python assignee = 'https://github.com/corona10' closed_at = created_at = labels = ['expert-C-API', 'type-feature', '3.9'] title = 'Add PyModule_AddType helper function' updated_at = user = 'https://github.com/corona10' ``` bugs.python.org fields: ```python activity = actor = 'aeros' assignee = 'corona10' closed = True closed_date = closer = 'vstinner' components = ['C API'] creation = creator = 'corona10' dependencies = [] files = [] hgrepos = [] issue_num = 40024 keywords = ['patch'] message_count = 7.0 messages = ['364661', '364809', '364964', '365217', '365253', '365254', '365522'] nosy_count = 4.0 nosy_names = ['vstinner', 'corona10', 'shihai1991', 'aeros'] pr_nums = ['19088', '19119', '19205'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue40024' versions = ['Python 3.9'] ```

    corona10 commented 4 years ago

    See: https://github.com/python/cpython/pull/19084#discussion_r395486583

    vstinner commented 4 years ago

    New changeset 05e4a296ecc127641160a04f39cc02c0f66a8c27 by Dong-hee Na in branch 'master': bpo-40024: Add PyModule_AddType() helper function (GH-19088) https://github.com/python/cpython/commit/05e4a296ecc127641160a04f39cc02c0f66a8c27

    vstinner commented 4 years ago

    New changeset 37fcbb65d4589fbb5a72153e9338cf8e6495f64f by Dong-hee Na in branch 'master': bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119) https://github.com/python/cpython/commit/37fcbb65d4589fbb5a72153e9338cf8e6495f64f

    corona10 commented 4 years ago

    @vstinner

    IMHO, we can close this issue after PR 19205 is merged. Most of use cases are replaced to PyModule_AddType.

    vstinner commented 4 years ago

    New changeset 016bdd519d76c282bbe0220c67a49226b6262638 by Dong-hee Na in branch 'master': bpo-40024: Update _elementtree to use PyModule_AddType() (GH-19205) https://github.com/python/cpython/commit/016bdd519d76c282bbe0220c67a49226b6262638

    vstinner commented 4 years ago

    Thanks Dong-hee Na for fixing many reference leaks! I like the new PyModule_AddType() helper function.

    aeros commented 4 years ago

    (disregard the above, the PR was mistakenly linked from a GitHub bug)