Drop sage-cleaner interface#40185
Conversation
This doesn't work with meson, since sage-cleaner is not available, which breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism
| d = os.path.join(DOT_SAGE, "temp", HOSTNAME, str(os.getpid())) | ||
| os.makedirs(d, exist_ok=True) | ||
| return os.path.join(d, "spawned_processes") | ||
| from sage.misc.temporary_file import tmp_dir |
There was a problem hiding this comment.
Is it much work to migrate this to the built-in python tempdir?
(Triggered by the fact the last PR that touched the cleaner interface #33213 notes "Afterward, the custom functions tmp_dir() and tmp_filename() can be deprecated in favor of tempfile.TemporaryDirectory() and tempfile.NamedTemporaryFile().")
There was a problem hiding this comment.
I haven't been able to make it work. If I use TemporaryDirectory then the directory seems to be deleted immediately, unless I use delete=False, in which case it is not removed on sage exit.
This seems to be similar to the parallel doctesting issues we found on Python 3.13 upgrade, see #39201 (cc @tornaria)
There was a problem hiding this comment.
Okay, thanks for checking!
|
cc @orlitzky for input since I just noticed his previous Note that this doesn't actually remove the |
tobiasdiez
left a comment
There was a problem hiding this comment.
Looks good from my side.
A lot of these can be "fixed" by #36322. The sage I also do not think there are any major problems with leaving processes behind. It depends on the program, but e.g. GAP and maxima are well-behaved, and it isn't really a sage problem if some optional package doesn't handle |
|
Documentation preview for this PR (built with commit 18c2dfd; changes) is ready! 🎉 |
sagemathgh-40185: Drop sage-cleaner interface This doesn't work with meson, since `sage-cleaner` is not available, and breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism Fixes sagemath#39873 URL: sagemath#40185 Reported by: Antonio Rojas Reviewer(s): Antonio Rojas, Tobias Diez
sagemathgh-40185: Drop sage-cleaner interface This doesn't work with meson, since `sage-cleaner` is not available, and breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism Fixes sagemath#39873 URL: sagemath#40185 Reported by: Antonio Rojas Reviewer(s): Antonio Rojas, Tobias Diez
sagemathgh-40185: Drop sage-cleaner interface This doesn't work with meson, since `sage-cleaner` is not available, and breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism Fixes sagemath#39873 URL: sagemath#40185 Reported by: Antonio Rojas Reviewer(s): Antonio Rojas, Tobias Diez
sagemathgh-40185: Drop sage-cleaner interface This doesn't work with meson, since `sage-cleaner` is not available, and breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism Fixes sagemath#39873 URL: sagemath#40185 Reported by: Antonio Rojas Reviewer(s): Antonio Rojas, Tobias Diez
sagemathgh-40185: Drop sage-cleaner interface This doesn't work with meson, since `sage-cleaner` is not available, and breaks parallel doctesting It is only used in `interfaces/quit.py`, where we can replace it by the existing temporary dir mechanism Fixes sagemath#39873 URL: sagemath#40185 Reported by: Antonio Rojas Reviewer(s): Antonio Rojas, Tobias Diez
This doesn't work with meson, since
sage-cleaneris not available, and breaks parallel doctestingIt is only used in
interfaces/quit.py, where we can replace it by the existing temporary dir mechanismFixes #39873