Skip to content

PEP 3121, 384 Refactoring applied to array module #59880

Closed

Description

@RobinSchreiber
BPO 15675
Nosy @vstinner, @asvetlov, @meadori
Superseder
  • bpo-1635741: Py_Finalize() doesn't clear all Python objects at exit
  • Files
  • array_pep3121-385_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-11-19.14:02:17.082>
    created_at = <Date 2012-08-15.15:13:46.390>
    labels = ['extension-modules', 'performance']
    title = 'PEP 3121, 384 Refactoring applied to array module'
    updated_at = <Date 2020-11-19.14:02:17.081>
    user = 'https://bugs.python.org/RobinSchreiber'

    bugs.python.org fields:

    activity = <Date 2020-11-19.14:02:17.081>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-19.14:02:17.082>
    closer = 'vstinner'
    components = ['Extension Modules']
    creation = <Date 2012-08-15.15:13:46.390>
    creator = 'Robin.Schreiber'
    dependencies = []
    files = ['26836']
    hgrepos = []
    issue_num = 15675
    keywords = ['pep3121']
    message_count = 3.0
    messages = ['168307', '372081', '381417']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'asvetlov', 'meador.inge', 'Robin.Schreiber']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '1635741'
    type = 'resource usage'
    url = 'https://bugs.python.org/issue15675'
    versions = ['Python 3.4']

    Activity

    1. RobinSchreiber commented on Aug 15, 2012

      RobinSchreibermannequin
      MannequinAuthor

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

    2. vstinner commented on Jun 22, 2020

      @vstinner
      Member

      The PEP-384 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.
      
    3. vstinner commented on Nov 19, 2020

      @vstinner
      Member

      See bpo-41111 "Convert a few stdlib extensions to the limited C API".

    4. 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-modulesC modules in the Modules dirperformancePerformance or resource usage

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions