瀏覽代碼

[libs] Upgrade pytz==2021.1

Instead of 2005.
Make some connector fail, like Clickhouse.
Romain Rigaux 4 年之前
父節點
當前提交
31970c9ef3

+ 10 - 11
desktop/conf.dist/hue.ini

@@ -1059,19 +1059,18 @@
     # # options='{"url": "presto://localhost:8080/catalog/default"}'
 
     # [[[clickhouse]]]
-    #   name=ClickHouse
-    #   interface=jdbc
-    #   ## Specific options for connecting to the ClickHouse server.
-    #   ## The JDBC driver clickhouse-jdbc.jar and its related jars need to be in the CLASSPATH environment variable.
-    #   options='{"url": "jdbc:clickhouse://localhost:8123", "driver": "ru.yandex.clickhouse.ClickHouseDriver", "user": "readonly", "password": ""}'
+    # name=ClickHouse
+    # interface=sqlalchemy
+    # e.g. clickhouse://user:password@example.com:8124/test?protocol=https
+    # options='{"url": "clickhouse://localhost:8123"}'
 
     # [[[vertica]]]
-    #   name=Vertica
-    #   interface=jdbc
-    #   ## Specific options for connecting to a Vertica server.
-    #   ## The JDBC driver vertica-jdbc-*.jar and its related jars need to be in the CLASSPATH environment variable.
-    #   ## If 'user' and 'password' are omitted, they will be prompted in the UI.
-    #   options='{"url": "jdbc:vertica://localhost:5434", "driver": "com.vertica.jdbc.Driver"}'
+    # name=Vertica
+    # interface=jdbc
+    # ## Specific options for connecting to a Vertica server.
+    # ## The JDBC driver vertica-jdbc-*.jar and its related jars need to be in the CLASSPATH environment variable.
+    # ## If 'user' and 'password' are omitted, they will be prompted in the UI.
+    # options='{"url": "jdbc:vertica://localhost:5434", "driver": "com.vertica.jdbc.Driver"}'
 
     ## Define which query and table examples can be automatically setup for the available dialects.
     # [[examples]]

+ 10 - 11
desktop/conf/pseudo-distributed.ini.tmpl

@@ -1043,19 +1043,18 @@
     # # options='{"url": "presto://localhost:8080/catalog/default"}'
 
     # [[[clickhouse]]]
-    #   name=ClickHouse
-    #   interface=jdbc
-    #   ## Specific options for connecting to the ClickHouse server.
-    #   ## The JDBC driver clickhouse-jdbc.jar and its related jars need to be in the CLASSPATH environment variable.
-    #   options='{"url": "jdbc:clickhouse://localhost:8123", "driver": "ru.yandex.clickhouse.ClickHouseDriver", "user": "readonly", "password": ""}'
+    # name=ClickHouse
+    # interface=sqlalchemy
+    # e.g. clickhouse://user:password@example.com:8124/test?protocol=https
+    # options='{"url": "clickhouse://localhost:8123"}'
 
     # [[[vertica]]]
-    #   name=Vertica
-    #   interface=jdbc
-    #   ## Specific options for connecting to a Vertica server.
-    #   ## The JDBC driver vertica-jdbc-*.jar and its related jars need to be in the CLASSPATH environment variable.
-    #   ## If 'user' and 'password' are omitted, they will be prompted in the UI.
-    #   options='{"url": "jdbc:vertica://localhost:5434", "driver": "com.vertica.jdbc.Driver"}'
+    # name=Vertica
+    # interface=jdbc
+    # ## Specific options for connecting to a Vertica server.
+    # ## The JDBC driver vertica-jdbc-*.jar and its related jars need to be in the CLASSPATH environment variable.
+    # ## If 'user' and 'password' are omitted, they will be prompted in the UI.
+    # options='{"url": "jdbc:vertica://localhost:5434", "driver": "com.vertica.jdbc.Driver"}'
 
     ## Define which query and table examples can be automatically setup for the available dialects.
     # [[examples]]

+ 1 - 1
desktop/core/requirements.txt

@@ -51,7 +51,7 @@ python-daemon==2.2.4
 python-ldap==3.1.0
 python-oauth2==1.1.0
 pytidylib==0.3.2
-pytz==2015.2
+pytz==2021.1
 pyyaml>=4.2b1
 requests>=2.20.0
 requests-kerberos==0.12.0

+ 11 - 0
docs/docs-site/content/administrator/configuration/connectors/_index.md

@@ -776,8 +776,19 @@ Then give Hue the information about the database source:
     [[[clickhouse]]]
     name = Clickhouse
     interface=sqlalchemy
+    # e.g. clickhouse://user:password@example.com:8124/test?protocol=https
     options='{"url": "clickhouse://localhost:8123"}'
 
+Note:
+
+If facing an error like:
+
+    ModuleNotFoundError: No module named 'connector'
+
+Update:
+
+    ./build/env/bin/pip install pytz==2021.1
+
 Alternative:
 
     [[[clickhouse]]]