Skip to content

CachingFileManager should not use __del__ #4267

@shoyer

Description

@shoyer
Member

__del__ is sometimes called after modules have been deallocated, which results in errors printed to stderr when Python exits. This manifests itself in the following bug:
h5netcdf/h5netcdf#50

Per h5netcdf/h5netcdf#50 (comment), the right solution is probably to use weakref.finalize.

Activity

stale

stale commented on Apr 17, 2022

@stale

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

shoyer

shoyer commented on Apr 17, 2022

@shoyer
MemberAuthor

This is still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shoyer

        Issue actions

          CachingFileManager should not use __del__ · Issue #4267 · pydata/xarray