Skip to content

Replace SAGE_TMP by the system location in the sage library #33213

@orlitzky

Description

@orlitzky

Re: https://groups.google.com/g/sage-devel/c/zhjl_j6j_Qc

These days, using a SAGE_TMP that by default lives under $HOME is overly complex and often inefficient. In this ticket we implement the first phase of its removal, to be replaced by python's tempfile module. Specifically,

  1. We replace all direct uses of SAGE_TMP within the sage library and doctests.
  2. We update tmp_dir() and tmp_filename() to use the tempfile defaults.
  3. We remove SAGE_TMP.

Afterward, the custom functions tmp_dir() and tmp_filename() can be deprecated in favor of tempfile.TemporaryDirectory() and tempfile.NamedTemporaryFile().

Moreover when #8784 is done, we'll be able to remove sage-cleaner entirely.

Depends on #33829
Depends on #33790

CC: @slel @tscrim @kiwifb

Component: misc

Author: Michael Orlitzky

Branch: d94a1e6

Reviewer: Matthias Koeppe, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/33213

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions