Skip to content

PEP 3121, 384 Refactoring applied to xxsubtype module #60052

Closed

Description

@RobinSchreiber
BPO 15848
Nosy @abalkin, @vstinner
Files
  • xxsubtype_pep3121-384_v0.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 2020-12-18.00:47:20.540>
    created_at = <Date 2012-09-02.14:29:27.256>
    labels = ['extension-modules', 'performance']
    title = 'PEP 3121, 384 Refactoring applied to xxsubtype module'
    updated_at = <Date 2020-12-18.00:47:20.539>
    user = 'https://bugs.python.org/RobinSchreiber'

    bugs.python.org fields:

    activity = <Date 2020-12-18.00:47:20.539>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-12-18.00:47:20.540>
    closer = 'vstinner'
    components = ['Extension Modules']
    creation = <Date 2012-09-02.14:29:27.256>
    creator = 'Robin.Schreiber'
    dependencies = []
    files = ['27097']
    hgrepos = []
    issue_num = 15848
    keywords = ['pep3121']
    message_count = 4.0
    messages = ['169701', '170069', '372082', '383281']
    nosy_count = 3.0
    nosy_names = ['belopolsky', 'vstinner', 'Robin.Schreiber']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue15848'
    versions = ['Python 3.4']

    Activity

    1. RobinSchreiber commented on Sep 2, 2012

      RobinSchreibermannequin
      MannequinAuthor

      Changes proposed in PEP-3121 and PEP-384 have now been applied to the xxsubtype module!

    2. added
      extension-modules
      performance
      on Sep 2, 2012
    3. abalkin commented on Sep 9, 2012

      @abalkin
      Member

      It looks like your patch will result in reference leaks if type creation fails. I think you should add Py_DECREF(m) before error returns.

    4. vstinner commented on Jun 22, 2020

      @vstinner
      Member

      The PEP-3121 part is fixed by:

      commit d5cacbb
      Author: Nick Coghlan <ncoghlan@gmail.com>
      Date: Sat May 23 22:24:10 2015 +1000

      PEP-489: Multi-phase extension module initialization
      
      Known limitations of the current implementation:
      
      - documentation changes are incomplete
      - there's a reference leak I haven't tracked down yet
      
      The leak is most visible by running:
      
        ./python -m test -R3:3 test_importlib
      
      However, you can also see it by running:
      
        ./python -X showrefcount
      
      Importing the array or _testmultiphase modules, and
      then deleting them from both sys.modules and the local
      namespace shows significant increases in the total
      number of active references each cycle. By contrast,
      with _testcapi (which continues to use single-phase
      initialisation) the global refcounts stabilise after
      a couple of cycles.
      
    5. vstinner commented on Dec 18, 2020

      @vstinner
      Member

      See bpo-41111 "[C API] Convert a few stdlib extensions to the limited C API (PEP-384)" for the PEP-384 part.

    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

    No one assigned

      Labels

      extension-modulesperformance

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions