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

Avoid keeping a strong reference to locale in the _io module #62808

Closed
pitrou opened this issue Jul 31, 2013 · 3 comments
Closed

Avoid keeping a strong reference to locale in the _io module #62808

pitrou opened this issue Jul 31, 2013 · 3 comments
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir

Comments

@pitrou
Copy link
Member

pitrou commented Jul 31, 2013

BPO 18608
Nosy @amauryfa, @pitrou, @tiran, @benjaminp
Files
  • io_locale_ref.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 2013-08-01.19:05:47.080>
    created_at = <Date 2013-07-31.21:20:31.641>
    labels = ['library', 'performance']
    title = 'Avoid keeping a strong reference to locale in the _io module'
    updated_at = <Date 2013-08-01.19:05:47.079>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2013-08-01.19:05:47.079>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-08-01.19:05:47.080>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2013-07-31.21:20:31.641>
    creator = 'pitrou'
    dependencies = []
    files = ['31103']
    hgrepos = []
    issue_num = 18608
    keywords = ['patch']
    message_count = 3.0
    messages = ['194023', '194103', '194105']
    nosy_count = 5.0
    nosy_names = ['amaury.forgeotdarc', 'pitrou', 'christian.heimes', 'benjamin.peterson', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue18608'
    versions = ['Python 3.4']

    @pitrou
    Copy link
    Member Author

    pitrou commented Jul 31, 2013

    Keeping a strong reference to locale in _io prevents several modules from being collected before being wiped at shutdown. Attached patch stores a weakref instead.

    @pitrou pitrou added stdlib Python modules in the Lib dir performance Performance or resource usage labels Jul 31, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 1, 2013

    New changeset 1c9aa4f68f2b by Antoine Pitrou in branch 'default':
    Issue bpo-18608: Avoid keeping a strong reference to the locale module inside the _io module.
    http://hg.python.org/cpython/rev/1c9aa4f68f2b

    @pitrou
    Copy link
    Member Author

    pitrou commented Aug 1, 2013

    Thanks Brett for reviewing. This is now pushed.

    @pitrou pitrou closed this as completed Aug 1, 2013
    @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
    performance Performance or resource usage stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant