Skip to content

Commit 1b65135

Browse files
authored
Merge pull request #20 from graphql-python/pin-deps
Pin dependencies
2 parents 0725058 + 107b0ca commit 1b65135

File tree

4 files changed

+45
-56
lines changed

4 files changed

+45
-56
lines changed

.travis.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
language: python
2-
sudo: false
2+
3+
python:
4+
- 3.6
5+
- 3.7
6+
- 3.8
7+
38
matrix:
49
include:
5-
- python: '3.5'
6-
env: TOX_ENV=py35,flake8
7-
- python: '3.6'
8-
env: TOX_ENV=py36
10+
- python: '3.7'
11+
env: TOXENV=flake8
12+
913
cache:
1014
directories:
1115
- $HOME/.cache/pip
1216
- $TRAVIS_BUILD_DIR/.tox
17+
1318
install:
14-
- pip install tox coveralls
19+
- pip install tox tox-travis coveralls
20+
1521
script:
16-
- tox -e $TOX_ENV
22+
- tox
23+
1724
after_success:
18-
- coveralls
25+
- coveralls

setup.py

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
from setuptools import setup, find_packages
22

33
required_packages = [
4-
'graphql-core>=2.1',
5-
'graphql-server-core>=1.1.1',
6-
'sanic>=0.5.1',
7-
'pytest-runner'
4+
"graphql-core>=2.1,<3",
5+
"graphql-server-core>=1.1.1,<2",
6+
"sanic>=0.5.1,<19",
87
]
98

9+
tests_require = ["pytest>=2.7.3", "aiohttp>=3.5.0,<4", "yarl>=1.0,<2.0", "jinja2==2.9.0"]
10+
1011
setup(
11-
name='Sanic-GraphQL',
12-
version='1.1.0',
13-
description='Adds GraphQL support to your Sanic application',
14-
long_description=open('README.rst').read(),
15-
url='https://github.com/graphql-python/sanic-graphql',
16-
download_url='https://github.com/graphql-python/sanic-graphql/releases',
17-
author='Sergey Porivaev',
18-
author_email='porivaevs@gmail.com',
19-
license='MIT',
12+
name="Sanic-GraphQL",
13+
version="1.1.0",
14+
description="Adds GraphQL support to your Sanic application",
15+
long_description=open("README.rst", encoding="utf-8").read(),
16+
url="https://github.com/graphql-python/sanic-graphql",
17+
download_url="https://github.com/graphql-python/sanic-graphql/releases",
18+
author="Sergey Porivaev",
19+
author_email="porivaevs@gmail.com",
20+
license="MIT",
2021
classifiers=[
21-
'Development Status :: 5 - Production/Stable',
22-
'Intended Audience :: Developers',
23-
'Topic :: Software Development :: Libraries',
24-
'Programming Language :: Python :: 3.5',
25-
'Programming Language :: Python :: 3.6',
26-
'License :: OSI Approved :: MIT License',
22+
"Development Status :: 5 - Production/Stable",
23+
"Intended Audience :: Developers",
24+
"Topic :: Software Development :: Libraries",
25+
"Programming Language :: Python :: 3.6",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"License :: OSI Approved :: MIT License",
2729
],
28-
keywords='api graphql protocol sanic',
29-
packages=find_packages(exclude=['tests']),
30+
keywords="api graphql protocol sanic",
31+
packages=find_packages(exclude=["tests"]),
3032
install_requires=required_packages,
31-
tests_require=['pytest>=2.7.3', 'aiohttp>=1.3.0', 'yarl>=0.9.6', 'jinja2>=2.9.0'],
33+
tests_require=tests_require,
34+
extras_require={"test": tests_require},
3235
include_package_data=True,
33-
platforms='any',
36+
platforms="any",
3437
)

tests/test_graphiqlview.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def pretty_response():
1919

2020
@parametrize_sync_async_app_test('app', graphiql=True)
2121
def test_graphiql_is_enabled(app):
22-
_, response = app.client.get( uri=url_string(), headers={'Accept': 'text/html'})
22+
_, response = app.client.get(uri=url_string(query="{test}"), headers={'Accept': 'text/html'})
2323
assert response.status == 200
2424

2525

@@ -50,14 +50,6 @@ def test_graphiql_html_is_not_accepted(app):
5050
assert response.status == 400
5151

5252

53-
@parametrize_sync_async_app_test('app', graphiql=True)
54-
def test_graphiql_get_mutation(app, pretty_response):
55-
query = 'mutation TestMutation { writeTest { test } }'
56-
_, response = app.client.get(uri=url_string(query=query), headers={'Accept': 'text/html'})
57-
assert response.status == 200
58-
assert 'response: null' in response.body.decode('utf-8')
59-
60-
6153
@pytest.mark.parametrize('app', [create_app(async_executor=True, graphiql=True, schema=AsyncSchema)])
6254
def test_graphiql_asyncio_schema(app):
6355
query = '{a,b,c}'

tox.ini

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
[tox]
2-
envlist = py35, py36, flake8
2+
envlist = flake8,py36,py37,py38
33
skipsdist = true
44

5-
[travis]
6-
python =
7-
3.5: py35, flake8
8-
3.6: py36, flake8
9-
105
[testenv]
116
deps =
12-
pytest>=2.7.2
13-
graphql-core>=1.0
14-
graphql-server-core>=1.0.dev
15-
sanic>=0.3.1
16-
aiohttp>=1.3.0
17-
jinja2>=2.9.0
18-
yarl>=0.9.6
19-
pytest-runner
20-
coverage
7+
.[test]
218

229
commands =
23-
coverage run --source=sanic_graphql setup.py test
10+
{posargs:py.test tests}
2411

2512
[testenv:flake8]
2613
deps = flake8

0 commit comments

Comments
 (0)