You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The temporary directory which Oct2Py() creates when no temp_dir parameter is given is not removed when the object is deleted. Automatic cleanup could be achieved by replacing self.temp_dir = temp_dir or tempfile.mkdtemp()
with
if temp_dir is None:
self.temp_dir_obj = tempfile.TemporaryDirectory()
self.temp_dir = self.temp_dir_obj.name
else:
self.temp_dir = temp_dir
in core.py.
The text was updated successfully, but these errors were encountered:
Currently, using Python 3.8.5, a ResourceWarning is raised when the temporary directories are automatically deleted.
Could you please reopen this issue?
The exact warning is:
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpaxnmyi6v'>
_warnings.warn(warn_message, ResourceWarning)
This can be reproduced in Python 3.8.5 with a script only containing the line from oct2py import Oct2Py
The temporary directory which Oct2Py() creates when no temp_dir parameter is given is not removed when the object is deleted. Automatic cleanup could be achieved by replacing
self.temp_dir = temp_dir or tempfile.mkdtemp()
with
in core.py.
The text was updated successfully, but these errors were encountered: