From 1527ea36b122586f582a997da0a1f9fc68114e7e Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Sun, 20 Sep 2015 12:32:04 +0300 Subject: [PATCH] Remove import warnings from query runners --- redash/query_runner/big_query.py | 3 --- redash/query_runner/elasticsearch.py | 4 ---- redash/query_runner/google_spreadsheets.py | 3 --- redash/query_runner/hive_ds.py | 2 -- redash/query_runner/impala_ds.py | 2 -- redash/query_runner/influx_db.py | 2 -- redash/query_runner/mongodb.py | 3 --- redash/query_runner/presto.py | 2 -- redash/query_runner/python.py | 2 -- 9 files changed, 23 deletions(-) diff --git a/redash/query_runner/big_query.py b/redash/query_runner/big_query.py index 40a2853b..f465b359 100644 --- a/redash/query_runner/big_query.py +++ b/redash/query_runner/big_query.py @@ -22,9 +22,6 @@ try: enabled = True except ImportError: - logger.warning("Missing dependencies. Please install google-api-python-client and oauth2client.") - logger.warning("You can use pip: pip install google-api-python-client oauth2client") - enabled = False types_map = { diff --git a/redash/query_runner/elasticsearch.py b/redash/query_runner/elasticsearch.py index 27415852..76d39edb 100644 --- a/redash/query_runner/elasticsearch.py +++ b/redash/query_runner/elasticsearch.py @@ -1,15 +1,11 @@ -import datetime import json import logging import sys import urllib from redash.query_runner import * -from redash import models import requests -import dateutil -from dateutil.parser import parse try: import http.client as http_client diff --git a/redash/query_runner/google_spreadsheets.py b/redash/query_runner/google_spreadsheets.py index 038c6b06..bf699f34 100644 --- a/redash/query_runner/google_spreadsheets.py +++ b/redash/query_runner/google_spreadsheets.py @@ -13,9 +13,6 @@ try: from dateutil import parser enabled = True except ImportError: - logger.warning("Missing dependencies. Please install gspread, dateutil and oauth2client.") - logger.warning("You can use pip: pip install gspread dateutil oauth2client") - enabled = False diff --git a/redash/query_runner/hive_ds.py b/redash/query_runner/hive_ds.py index 2d7f59dc..0ab57dd3 100644 --- a/redash/query_runner/hive_ds.py +++ b/redash/query_runner/hive_ds.py @@ -11,8 +11,6 @@ try: from pyhive import hive enabled = True except ImportError, e: - logger.warning("Missing dependencies. Please install pyhive.") - logger.warning("You can use pip: pip install pyhive") enabled = False COLUMN_NAME = 0 diff --git a/redash/query_runner/impala_ds.py b/redash/query_runner/impala_ds.py index a7e5925b..e506f4f6 100644 --- a/redash/query_runner/impala_ds.py +++ b/redash/query_runner/impala_ds.py @@ -12,8 +12,6 @@ try: from impala.error import DatabaseError, RPCError enabled = True except ImportError, e: - logger.warning("Missing dependencies. Please install impyla.") - logger.warning("You can use pip: pip install impyla") enabled = False COLUMN_NAME = 0 diff --git a/redash/query_runner/influx_db.py b/redash/query_runner/influx_db.py index 46d8f8ba..28d21e7f 100644 --- a/redash/query_runner/influx_db.py +++ b/redash/query_runner/influx_db.py @@ -11,8 +11,6 @@ try: enabled = True except ImportError: - logger.warning("Missing dependencies. Please install influxdb.") - logger.warning("You can use pip: pip install influxdb") enabled = False def _transform_result(results): diff --git a/redash/query_runner/mongodb.py b/redash/query_runner/mongodb.py index f0966777..dda28880 100644 --- a/redash/query_runner/mongodb.py +++ b/redash/query_runner/mongodb.py @@ -2,7 +2,6 @@ import json import datetime import logging import re -import time from dateutil.parser import parse from redash.utils import JSONEncoder @@ -17,8 +16,6 @@ try: enabled = True except ImportError: - logger.warning("Missing dependencies. Please install pymongo.") - logger.warning("You can use pip: pip install pymongo") enabled = False diff --git a/redash/query_runner/presto.py b/redash/query_runner/presto.py index f37fb254..d5d50cb9 100644 --- a/redash/query_runner/presto.py +++ b/redash/query_runner/presto.py @@ -11,8 +11,6 @@ try: enabled = True except ImportError: - logger.warning("Missing dependencies. Please install PyHive.") - logger.warning("You can use pip: pip install pyhive") enabled = False PRESTO_TYPES_MAPPING = { diff --git a/redash/query_runner/python.py b/redash/query_runner/python.py index 58322497..c8bd92bb 100644 --- a/redash/query_runner/python.py +++ b/redash/query_runner/python.py @@ -1,8 +1,6 @@ -import sys import datetime import json import logging -import weakref from redash.query_runner import * from redash import models