Skip to content

Commit

Permalink
Merge pull request #6057 from LMFDB/main
Browse files Browse the repository at this point in the history
main -> web
  • Loading branch information
AndrewVSutherland authored May 19, 2024
2 parents b3af078 + c11f48f commit baaeede
Show file tree
Hide file tree
Showing 47 changed files with 98 additions and 9,606 deletions.
4 changes: 2 additions & 2 deletions Postgres_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ Database Interface

If use `db._execute`, make sure to wrap your statements in the SQL
class from `psycopg2.sql` (you can also import it from
`lmfdb.backend`). You can see lots of examples of this
`psycodict`). You can see lots of examples of this
paradigm in `lmfdb/backend/`.

```python
sage: from lmfdb.backend import db, SQL
sage: from psycodict import db, SQL
sage: cur = db._execute(SQL("SELECT label, dim, cm_discs, rm_discs from mf_newforms WHERE projective_image = %s AND cm_discs @> %s LIMIT 2"), ['D2', [-19]])
sage: cur.rowcount
2
Expand Down
8 changes: 8 additions & 0 deletions lmfdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# -*- coding: utf-8 -*-

# psycodict was added as a dependency on May 10, 2024; we provide a useful error message for people upgrading
try:
import psycodict
assert psycodict
except ImportError:
print('Missing dependency; try running "sage -pip install -r requirements.txt" in the LMFDB home folder.')
raise

from .lmfdb_database import db
assert db
2 changes: 1 addition & 1 deletion lmfdb/abvar/fq/download.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from lmfdb import db
from lmfdb.utils import Downloader
from flask import abort
from lmfdb.backend.encoding import Json
from psycodict.encoding import Json
from .isog_class import AbvarFq_isoclass

class AbvarFq_download(Downloader):
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/abvar/fq/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from flask import url_for
from lmfdb import db
from lmfdb.utils import comma, display_knowl, StatsDisplay, proportioners, totaler
from lmfdb.backend.utils import range_formatter
from psycodict.utils import range_formatter
from lmfdb.logger import make_logger
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.cachefunc import cached_method
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from collections import defaultdict
from psycopg2.extensions import QueryCanceledError
from lmfdb import db
from lmfdb.backend.encoding import Json
from psycodict.encoding import Json
from lmfdb.utils import flash_error
from datetime import datetime
from flask import (render_template, request, url_for, current_app,
Expand Down
35 changes: 0 additions & 35 deletions lmfdb/backend/__init__.py

This file was deleted.

Loading

0 comments on commit baaeede

Please sign in to comment.