diff --git a/.travis.yml b/.travis.yml index 00a4d54..2f0d289 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,6 @@ language: python matrix: include: - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - - python: 3.5 - env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 - python: 3.7 @@ -15,7 +9,7 @@ matrix: env: TOXENV=py38 - python: 3.9 env: TOXENV=py39 - - python: pypy + - python: pypy3 env: TOXENV=pypy install: - pip install tox diff --git a/README.md b/README.md index dae2330..e8aa918 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,6 @@ urlpatterns = [ ### Flask Integration: -Note that `flask-graphql` version `<2.0` is not supported. At the time of -writing this README, you must install `flask-graphql` with -`pip install --pre flask-graphql` - Simply import the modified view and create a new url rule on your app: ```python diff --git a/examples/flask/app.py b/examples/flask/app.py index b4ba28f..2f1f02e 100644 --- a/examples/flask/app.py +++ b/examples/flask/app.py @@ -37,6 +37,6 @@ class Mutation(graphene.ObjectType): view_func=FileUploadGraphQLView.as_view( 'graphql', graphiql=True, - schema=schema, + schema=schema.graphql_schema, ) ) diff --git a/graphene_file_upload/flask/__init__.py b/graphene_file_upload/flask/__init__.py index 4cf769f..11b4284 100644 --- a/graphene_file_upload/flask/__init__.py +++ b/graphene_file_upload/flask/__init__.py @@ -1,7 +1,7 @@ """Apply multipart request spec to flask""" from flask import request -from flask_graphql import GraphQLView from graphql_server import load_json_body +from graphql_server.flask import GraphQLView from ..utils import place_files_in_operations diff --git a/setup.py b/setup.py index e15f40d..052d5f5 100644 --- a/setup.py +++ b/setup.py @@ -17,12 +17,12 @@ flask_requires = [ 'Flask>=1.0.2', - 'graphene>=2.1.2', - 'Flask-Graphql>=2.0.0', + 'graphene>=3.0b7', + 'graphql-server[flask]>=3.0.0b3', ] django_requires = [ - 'graphene-django>=2.0.0', + 'graphene-django>=3.0.0b6', ] all_requires = flask_requires + django_requires @@ -56,9 +56,6 @@ "Natural Language :: English", "Topic :: Internet :: WWW/HTTP", "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", diff --git a/tests/flask_app.py b/tests/flask_app.py index de928a5..78e2c22 100644 --- a/tests/flask_app.py +++ b/tests/flask_app.py @@ -2,7 +2,6 @@ from graphene_file_upload.flask import FileUploadGraphQLView - def create_app(schema, path='/graphql'): app = Flask(__name__) app.debug = True @@ -10,7 +9,7 @@ def create_app(schema, path='/graphql'): path, view_func=FileUploadGraphQLView.as_view( 'graphql', - schema=schema, + schema=schema.graphql_schema, ), ) return app diff --git a/tox.ini b/tox.ini index 7891e20..1c84206 100644 --- a/tox.ini +++ b/tox.ini @@ -4,14 +4,14 @@ # and then run "tox" from this directory. [tox] -envlist = py27, py34, py35, py36, py37, py38, py39 +envlist = py36, py37, py38, py39 skip_missing_interpreters = true [testenv] deps = .[all,tests] - py3{4,5,6,7,8,9}: pylint + py3{6,7,8,9}: pylint commands = -coverage erase - py3{4,5,6,7,8,9}: pylint graphene_file_upload + py3{6,7,8,9}: pylint graphene_file_upload py.test --cov=graphene_file_upload -v tests/