RustPython / RustPython/RustPython

top level objects are not deleted before script finalized

Open
#4,527 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-vm C-compat
Dominant language
Rust
Stars
22.4k
Forks
1.5k
Avg merge
16h 33m
Merged PRs (30d)
165

Description

test code:

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

x = X()

CPython output:

deleted!

RustPython output:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided top-level class snippet under RustPython and compare its shutdown behavior with CPython. Trace the interpreter finalization path responsible for cleaning up top-level objects; done means the example invokes X.del and prints "deleted!" before the script exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.