Skip to content

Clear _PyRuntime at exit #80905

Description

@vstinner
BPO 36724
Nosy @vstinner, @ericsnowcurrently
PRs
  • bpo-36724: Add _PyWarnings_Fini() #12963
  • 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-06-05.01:13:10.085>
    created_at = <Date 2019-04-25.20:13:49.450>
    labels = ['expert-subinterpreters', 'interpreter-core', '3.8']
    title = 'Clear _PyRuntime at exit'
    updated_at = <Date 2020-06-05.01:13:10.083>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-06-05.01:13:10.083>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-06-05.01:13:10.085>
    closer = 'vstinner'
    components = ['Interpreter Core', 'Subinterpreters']
    creation = <Date 2019-04-25.20:13:49.450>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36724
    keywords = ['patch']
    message_count = 4.0
    messages = ['340859', '340881', '344564', '370743']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'eric.snow']
    pr_nums = ['12963']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36724'
    versions = ['Python 3.8']

    Activity

    1. vstinner commented on Apr 25, 2019

      @vstinner
      MemberAuthor

      _PyRuntime.warnings is not cleared at Python exit: 3 objects are kept alive even after Py_Finalize().

      See bpo-36356 which cleared some other variables.

      PR 12453 "bpo-36356: Destroy the GIL at exit" is still open.

    2. vstinner commented on Apr 26, 2019

      @vstinner
      MemberAuthor

      New changeset 87d23a0 by Victor Stinner in branch 'master':
      bpo-36724: Add _PyWarnings_Fini() (bpo-12963)
      87d23a0

    3. vstinner commented on Jun 4, 2019

      @vstinner
      MemberAuthor

      bpo-36818 caused a regression: https://bugs.python.org/issue37135#msg344511

      We should be careful when we modify Python finalization, especially with daemon threads.

    4. vstinner commented on Jun 5, 2020

      @vstinner
      MemberAuthor

      _PyRuntime.warnings is not cleared at Python exit: 3 objects are kept alive even after Py_Finalize().

      This issue has been fixed. Moreover, the GC state is now per-interpreter.

    5. 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

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions