From bb662499126250307f9e1165ce8b18eb41c1ed69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Mon, 15 Oct 2018 23:52:03 +0200 Subject: [PATCH] Update requirements and update Elasticsearch to version 6 --- openlobby/core/documents.py | 2 +- openlobby/settings.py | 2 +- requirements.in | 2 +- requirements.txt | 53 +++++++++---------- .../snapshots/snap_test_create_report.py | 1 + .../snapshots/snap_test_update_report.py | 4 ++ tests/schema/snapshots/snap_test_authors.py | 1 + .../snapshots/snap_test_search_reports.py | 1 + 8 files changed, 36 insertions(+), 30 deletions(-) diff --git a/openlobby/core/documents.py b/openlobby/core/documents.py index 3923f6e..a5ef151 100644 --- a/openlobby/core/documents.py +++ b/openlobby/core/documents.py @@ -5,7 +5,7 @@ import json from .models import Report -report = Index("{}-reports".format(settings.ES_INDEX)) +report = Index(f"{settings.ES_INDEX}-reports") @report.doc_type diff --git a/openlobby/settings.py b/openlobby/settings.py index 7fcb0b2..1b08799 100644 --- a/openlobby/settings.py +++ b/openlobby/settings.py @@ -130,7 +130,7 @@ GRAPHENE = {"SCHEMA": "openlobby.schema.schema"} ############################################################################### # Custom settings -# Elasticsearch index with reports +# Elasticsearch index prefix ES_INDEX = os.environ.get("ES_INDEX", "openlobby") # default analyzer for text fields diff --git a/requirements.in b/requirements.in index 14d5b51..01e78a0 100644 --- a/requirements.in +++ b/requirements.in @@ -1,7 +1,7 @@ Django graphene graphene-django -elasticsearch-dsl>=5.3.0,<6.0.0 +elasticsearch-dsl==6.1.0 django-elasticsearch-dsl django-extensions pytest diff --git a/requirements.txt b/requirements.txt index 2dbe94a..09775d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,56 +4,55 @@ # # pip-compile --output-file requirements.txt requirements.in # -alabaster==0.7.11 # via oic +alabaster==0.7.12 # via oic aniso8601==3.0.2 # via graphene arrow==0.12.1 asn1crypto==0.24.0 # via cryptography -atomicwrites==1.1.5 # via pytest -attrs==18.1.0 # via pytest +atomicwrites==1.2.1 # via pytest +attrs==18.2.0 # via pytest beaker==1.10.0 # via oic -bleach==2.1.3 -certifi==2018.4.16 # via requests +bleach==3.0.2 +certifi==2018.10.15 # via requests cffi==1.11.5 # via cryptography chardet==3.0.4 # via requests -cryptography==2.2.2 # via pyopenssl +cryptography==2.3.1 # via pyopenssl django-elasticsearch-dsl==0.5.0 -django-extensions==2.0.7 -django==2.0.6 -dsnparse==0.1.11 -elasticsearch-dsl==5.4.0 -elasticsearch==5.5.3 # via elasticsearch-dsl +django-extensions==2.1.3 +django==2.1.2 +dsnparse==0.1.12 +elasticsearch-dsl==6.1.0 +elasticsearch==6.3.1 # via elasticsearch-dsl future==0.16.0 # via oic, pyjwkest -graphene-django==2.0.0 -graphene==2.1.2 -graphql-core==2.0 # via graphene, graphql-relay +graphene-django==2.2.0 +graphene==2.1.3 +graphql-core==2.1 # via graphene, graphene-django, graphql-relay graphql-relay==0.4.5 # via graphene -html5lib==1.0.1 # via bleach idna==2.7 # via cryptography, requests +ipaddress==1.0.22 # via elasticsearch-dsl iso8601==0.1.12 mako==1.0.7 # via oic markupsafe==1.0 # via mako -more-itertools==4.2.0 # via pytest +more-itertools==4.3.0 # via pytest oic==0.14.0 -pluggy==0.6.0 # via pytest -promise==2.1 # via graphene, graphene-django, graphql-core, graphql-relay +pluggy==0.7.1 # via pytest +promise==2.2.1 # via graphene, graphene-django, graphql-core, graphql-relay psycopg2==2.7.5 -py==1.5.3 # via pytest -pycparser==2.18 # via cffi -pycryptodomex==3.6.3 # via oic, pyjwkest +py==1.7.0 # via pytest +pycparser==2.19 # via cffi +pycryptodomex==3.6.6 # via oic, pyjwkest pyjwkest==1.4.0 # via oic pyjwt==1.6.4 pyopenssl==18.0.0 # via oic -pytest-django==3.3.2 +pytest-django==3.4.3 pytest-env==0.6.2 -pytest==3.6.2 +pytest==3.8.2 python-dateutil==2.7.3 # via arrow, elasticsearch-dsl -pytz==2018.4 # via django +pytz==2018.5 # via django requests==2.19.1 # via oic, pyjwkest rx==1.6.1 # via graphql-core singledispatch==3.4.0.3 # via graphene-django -six==1.11.0 # via bleach, cryptography, django-extensions, elasticsearch-dsl, graphene, graphene-django, graphql-core, graphql-relay, html5lib, more-itertools, oic, promise, pyjwkest, pyopenssl, pytest, python-dateutil, singledispatch, snapshottest +six==1.11.0 # via bleach, cryptography, django-extensions, elasticsearch-dsl, graphene, graphene-django, graphql-core, graphql-relay, more-itertools, oic, promise, pyjwkest, pyopenssl, pytest, python-dateutil, singledispatch, snapshottest snapshottest==0.5.0 termcolor==1.1.0 # via snapshottest -typing==3.6.4 # via promise urllib3==1.23 # via elasticsearch, requests -webencodings==0.5.1 # via html5lib +webencodings==0.5.1 # via bleach diff --git a/tests/mutations/snapshots/snap_test_create_report.py b/tests/mutations/snapshots/snap_test_create_report.py index b4abeb0..312d5c1 100644 --- a/tests/mutations/snapshots/snap_test_create_report.py +++ b/tests/mutations/snapshots/snap_test_create_report.py @@ -13,6 +13,7 @@ snapshots["test_unauthorized 1"] = { { "locations": [{"column": 5, "line": 3}], "message": "User must be logged in to perform this mutation.", + "path": ["createReport"], } ], } diff --git a/tests/mutations/snapshots/snap_test_update_report.py b/tests/mutations/snapshots/snap_test_update_report.py index 64eab57..cbc6339 100644 --- a/tests/mutations/snapshots/snap_test_update_report.py +++ b/tests/mutations/snapshots/snap_test_update_report.py @@ -13,6 +13,7 @@ snapshots["test_unauthorized 1"] = { { "locations": [{"column": 5, "line": 3}], "message": "User must be logged in to perform this mutation.", + "path": ["updateReport"], } ], } @@ -23,6 +24,7 @@ snapshots["test_not_author 1"] = { { "locations": [{"column": 5, "line": 3}], "message": "Viewer is not the Author of this Report or Report does not exist.", + "path": ["updateReport"], } ], } @@ -33,6 +35,7 @@ snapshots["test_report_does_not_exist 1"] = { { "locations": [{"column": 5, "line": 3}], "message": "Viewer is not the Author of this Report or Report does not exist.", + "path": ["updateReport"], } ], } @@ -43,6 +46,7 @@ snapshots["test_update_published_with_draft 1"] = { { "locations": [{"column": 5, "line": 3}], "message": "You cannot update published Report with draft.", + "path": ["updateReport"], } ], } diff --git a/tests/schema/snapshots/snap_test_authors.py b/tests/schema/snapshots/snap_test_authors.py index fee760e..02bf97d 100644 --- a/tests/schema/snapshots/snap_test_authors.py +++ b/tests/schema/snapshots/snap_test_authors.py @@ -127,6 +127,7 @@ snapshots["test_last 1"] = { { "locations": [{"column": 9, "line": 3}], "message": 'Pagination "last" works only in combination with "before" argument.', + "path": ["authors"], } ], } diff --git a/tests/schema/snapshots/snap_test_search_reports.py b/tests/schema/snapshots/snap_test_search_reports.py index b0c0e30..694fc55 100644 --- a/tests/schema/snapshots/snap_test_search_reports.py +++ b/tests/schema/snapshots/snap_test_search_reports.py @@ -233,6 +233,7 @@ snapshots["test_last 1"] = { { "locations": [{"column": 9, "line": 3}], "message": 'Pagination "last" works only in combination with "before" argument.', + "path": ["searchReports"], } ], } -- GitLab