From c7c76c6a993699691a057440718899b9dd3d30f8 Mon Sep 17 00:00:00 2001 From: Erik Ritter Date: Sun, 17 May 2020 14:49:51 -0700 Subject: [PATCH] build: Add python 3.8 to the build matrix (#9827) --- .github/workflows/superset-python.yml | 3 +-- docker/requirements-extra.txt | 2 +- helm/superset/values.yaml | 6 +++--- requirements-dev.txt | 2 +- setup.py | 2 +- tests/core_tests.py | 10 +++++++--- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/superset-python.yml b/.github/workflows/superset-python.yml index d3f61b158c..aef60f8ae3 100644 --- a/.github/workflows/superset-python.yml +++ b/.github/workflows/superset-python.yml @@ -76,8 +76,7 @@ jobs: strategy: matrix: # run unit tests in multiple version just for fun - # (3.8 is not supported yet, some dependencies need an update) - python-version: [3.6, 3.7] + python-version: [3.6, 3.7, 3.8] env: PYTHONPATH: ${{ github.workspace }} SUPERSET_CONFIG: tests.superset_test_config diff --git a/docker/requirements-extra.txt b/docker/requirements-extra.txt index 48998f957d..e7a1ffcbf3 100644 --- a/docker/requirements-extra.txt +++ b/docker/requirements-extra.txt @@ -15,5 +15,5 @@ # limitations under the License. # gevent==1.4.0 -psycopg2-binary==2.7.5 +psycopg2-binary==2.8.5 redis==3.2.1 diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index bfeaee1cc6..b1a12766ef 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -24,7 +24,7 @@ replicaCount: 1 ## These requirements are used to build a requirements file which is then applied on init ## of superset containers additionalRequirements: - - "psycopg2==2.8.3" + - "psycopg2==2.8.5" - "redis==3.2.1" ## The name of the secret which we will use to generate a superset_config.py file @@ -84,7 +84,7 @@ supersetNode: - "/bin/sh" - "-c" - ". {{ .Values.configMountPath }}/superset_bootstrap.sh; /usr/bin/docker-entrypoint.sh" - connections: + connections: redis_host: '{{ template "superset.fullname" . }}-redis-headless' redis_port: "6379" db_host: '{{ template "superset.fullname" . }}-postgresql' @@ -238,4 +238,4 @@ nodeSelector: {} tolerations: [] -affinity: {} \ No newline at end of file +affinity: {} diff --git a/requirements-dev.txt b/requirements-dev.txt index a8284018c0..58f95917ff 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -24,7 +24,7 @@ mypy==0.770 nose==1.3.7 pip-tools==5.1.2 pre-commit==1.17.0 -psycopg2-binary==2.7.5 +psycopg2-binary==2.8.5 pycodestyle==2.5.0 pydruid==0.5.9 pyhive==0.6.2 diff --git a/setup.py b/setup.py index acf67ed95b..ed8176cd00 100644 --- a/setup.py +++ b/setup.py @@ -116,7 +116,7 @@ setup( "gsheets": ["gsheetsdb>=0.1.9"], "hive": ["pyhive[hive]>=0.6.1", "tableschema", "thrift>=0.11.0, <1.0.0"], "mysql": ["mysqlclient==1.4.2.post1"], - "postgres": ["psycopg2-binary==2.7.5"], + "postgres": ["psycopg2-binary==2.8.5"], "presto": ["pyhive[presto]>=0.4.0"], "elasticsearch": ["elasticsearch-dbapi>=0.1.0, <0.2.0"], "druid": ["pydruid==0.5.7", "requests==2.22.0"], diff --git a/tests/core_tests.py b/tests/core_tests.py index 19005579e5..5c4f2b71a2 100644 --- a/tests/core_tests.py +++ b/tests/core_tests.py @@ -16,10 +16,10 @@ # under the License. # isort:skip_file """Unit tests for Superset""" -import cgi import csv import datetime import doctest +import html import io import json import logging @@ -1150,7 +1150,11 @@ class CoreTests(SupersetTestCase): {"FOO": lambda x: 1, "super": "set"}, default=utils.pessimistic_json_iso_dttm_ser, ) - html = cgi.escape(encoded).replace("'", "'").replace('"', """) + html_string = ( + html.escape(encoded, quote=False) + .replace("'", "'") + .replace('"', """) + ) urls = [ "/superset/sqllab", @@ -1161,7 +1165,7 @@ class CoreTests(SupersetTestCase): ] for url in urls: data = self.get_resp(url) - self.assertTrue(html in data) + self.assertTrue(html_string in data) @mock.patch.dict( "superset.extensions.feature_flag_manager._feature_flags",