Skip to content

certs_dir() creates self._cert_dir as a TemporaryDirectory, but cleanup() never cleans it up. This leaks temp directories over multiple runs. Extend cleanup() to also cleanup self._cert_dir (and optionally reset cached traces if they hold resources). #467

@marten-seemann

Description

@marten-seemann

certs_dir() creates self._cert_dir as a TemporaryDirectory, but cleanup() never cleans it up. This leaks temp directories over multiple runs. Extend cleanup() to also cleanup self._cert_dir (and optionally reset cached traces if they hold resources).

            self._server_download_dir = None
        if hasattr(self, "_cert_dir") and self._cert_dir:
            self._cert_dir.cleanup()
            self._cert_dir = None

Originally posted by @Copilot in #464 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions