Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vdsql-] fix build from missing sqlalchemy #2402 #2406

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions visidata/apps/vdsql/_ibis.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ def __copy__(self):
@contextmanager
def get_conn(self):
if not self.pool:
import sqlalchemy
try:
import ibis
r = ibis.connect(str(self.source))
except sqlalchemy.exc.NoSuchModuleError as e:
dialect = str(e).split(':')[-1]
vd.warning(f'{dialect} not installed')
vd.fail(f'pip install ibis-framework[{dialect}]')
import ibis
r = ibis.connect(str(self.source))
else:
r = self.pool.pop(0)

Expand Down
2 changes: 1 addition & 1 deletion visidata/apps/vdsql/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ibis-framework[sqlite]>=8
ibis-framework[sqlite]>=9
ibis-substrait
sqlparse
pandas<2.0,>=1.5.0
Loading