Skip to content

Commit

Permalink
build: Add python 3.8 to the build matrix (apache#9827)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored May 17, 2020
1 parent 53b58ed commit c7c76c6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/superset-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/requirements-extra.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -238,4 +238,4 @@ nodeSelector: {}

tolerations: []

affinity: {}
affinity: {}
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_git_sha():
"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"],
Expand Down
10 changes: 7 additions & 3 deletions tests/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1150,7 +1150,11 @@ def test_feature_flag_serialization(self):
{"FOO": lambda x: 1, "super": "set"},
default=utils.pessimistic_json_iso_dttm_ser,
)
html = cgi.escape(encoded).replace("'", "&#39;").replace('"', "&#34;")
html_string = (
html.escape(encoded, quote=False)
.replace("'", "&#39;")
.replace('"', "&#34;")
)

urls = [
"/superset/sqllab",
Expand All @@ -1161,7 +1165,7 @@ def test_feature_flag_serialization(self):
]
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",
Expand Down

0 comments on commit c7c76c6

Please sign in to comment.