Ask Your Question
0

where is `sage.databases.db.Database-`

asked 2013-05-25 11:36:30 +0100

updated 2013-05-25 12:12:19 +0100

I am trying to port some older Sage code (I think for Sage 5.4 or so). It uses sage.databases.db.Database but that doesn't seem to exist anymore. Where is it?

The file I'm trying to update is euler_database.py.


Edit: Can I just use

from sage.databases.all import SQLDatabase as Database

?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-05-25 13:15:30 +0100

kcrisman gravatar image

updated 2013-05-25 13:16:06 +0100

See Trac 10353, where this was indeed removed to allow us to remove ZODB as a dependency. You may be able to use the Conway polynomial database rewrite or Cremona table rewrite to move to SQLite. I'm not sure it would be completely trivial to just use that backend, though of course you can try!


(On a related note (not for the OP), does anyone know whether psage stuff is ever tested as to whether it at least compiles or imports with a given version of Sage? This probably could have easily been avoided.

edit flag offensive delete link more

Comments

I tried so far as that I just did that (see my commits [here](https://github.com/martinra/psage/pull/1)) and it imports fine but I'm not sure if it really works. That was not important for me as other stuff from PSage works now (which failed before because of the failing import) with a more recent Sage (5.8 and 5.9).

Albert Zeyer gravatar imageAlbert Zeyer ( 2013-05-31 06:13:24 +0100 )edit
0

answered 2013-05-25 13:27:38 +0100

vdelecroix gravatar image

updated 2013-05-25 13:30:32 +0100

If I am not mistaken, your database looks more like a list of objects (rather than a list of objects with some of their invariants). The SQL framework is perhaps not the simplest way to achieve it. You may have a look at the Conway database in sage.databases.conway which is simply a dictionnary which is stored on hard drive using python pickling.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-05-25 11:36:30 +0100

Seen: 621 times

Last updated: May 25 '13