RustPython / RustPython/RustPython
Module destruction is missing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.4k
- Forks
- 1.5k
- Avg merge
- 16h 33m
- Merged PRs (30d)
- 165
Description
Feature
https://github.com/python/cpython/blob/5442561c1a094b68900198bade616da9ed509ac8/Lib/test/test_sys.py#L963-L982
test_sys::SysModuleTest.test_is_finalizing
In TC, AtExit.__del__ is not invoked. Because ref = AtExit() is a module attribute, RustPython must implement module destruction to invoke it.
Found during work on #3776
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced CPython test, test_sys::SysModuleTest.test_is_finalizing, then trace RustPython's module teardown behavior. Confirm how module attributes are destroyed and verify that AtExit.del is invoked for the module attribute, with equivalent coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100