Skip to content

Commit 686462f

Browse files
committed
Remove SAGE_DB
1 parent 39ebbe4 commit 686462f

File tree

5 files changed

+3
-34
lines changed

5 files changed

+3
-34
lines changed

src/sage/graphs/isgci.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,7 @@ def update_db(self):
857857
Depending on the credentials of the user running Sage when this command
858858
is run, one attempt is made at saving the result in Sage's directory so
859859
that all users can benefit from it. If the credentials are not
860-
sufficient, the XML file are saved instead in the user's directory (in
861-
the SAGE_DB folder).
860+
sufficient, the XML file are saved instead in the user's directory.
862861
863862
EXAMPLES::
864863

src/sage/misc/all.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
exists, forall, is_iterator,
1010
random_sublist,
1111
pad_zeros,
12-
SAGE_DB,
13-
newton_method_sizes, compose,
12+
newton_method_sizes, compose,
1413
nest)
1514

1615
from sage.misc.banner import version

src/sage/misc/all__sagemath_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from sage.misc.flatten import flatten
2222

23-
from sage.misc.persist import save, load, dumps, loads, db, db_save
23+
from sage.misc.persist import save, load, dumps, loads
2424

2525
from sage.misc.constant_function import ConstantFunction
2626

src/sage/misc/misc.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,12 @@ def try_read(obj, splitlines=False):
168168

169169
return data
170170

171-
172-
SAGE_DB = os.path.join(DOT_SAGE, 'db')
173-
os.makedirs(SAGE_DB, exist_ok=True)
174-
175171
try:
176172
# Create the matplotlib config directory.
177173
os.makedirs(os.environ["MPLCONFIGDIR"], exist_ok=True)
178174
except KeyError:
179175
pass
180176

181-
182177
def exactly_one_is_true(iterable):
183178
r"""
184179
Return whether exactly one element of ``iterable`` evaluates ``True``.

src/sage/misc/persist.pyx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,27 +1222,3 @@ def load_sage_element(cls, parent, dic_pic):
12221222
X._set_parent(parent)
12231223
X.__dict__ = SageUnpickler.loads(dic_pic)
12241224
return X
1225-
1226-
1227-
def db(name):
1228-
r"""
1229-
Load object with given name from the Sage database. Use x.db(name)
1230-
or db_save(x, name) to save objects to the database.
1231-
1232-
The database directory is ``$HOME/.sage/db``.
1233-
"""
1234-
from sage.misc.misc import SAGE_DB
1235-
return load('%s/%s' % (SAGE_DB, name))
1236-
1237-
1238-
def db_save(x, name=None):
1239-
r"""
1240-
Save x to the Sage database.
1241-
1242-
The database directory is ``$HOME/.sage/db``.
1243-
"""
1244-
try:
1245-
x.db(name)
1246-
except AttributeError:
1247-
from sage.misc.misc import SAGE_DB
1248-
save(x, '%s/%s' % (SAGE_DB, name))

0 commit comments

Comments
 (0)