Skip to content

top level objects are not deleted before script finalized #4527

Description

@youknowone

test code:

class X:
    def __del__(self):
        print('deleted!')

x = X()

CPython output:

deleted!

RustPython output:

Activity

  1. added
    C-compatA discrepancy between RustPython and CPython
    A-vmArea: virtual machine
    on Feb 21, 2023
  2. youknowone commented on Oct 6, 2026

    @youknowone
    MemberAuthor

    The originally reported problem no longer reproduces on current main. Closing per the recheck in #8982.

    — commented by Grok 4.6

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

    A-vmArea: virtual machineC-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions