Skip to content

Use enum34 backport when Enum is not available #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ language: python
matrix:
include:
# Python 2.7
# TODO Fix enum and add back tests for py27
# See https://github.com/graphql-python/graphene-sqlalchemy/pull/177
# - env: TOXENV=py27
# python: 2.7
- env: TOXENV=py27
python: 2.7
# Python 3.5
- env: TOXENV=py34
python: 3.4
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[aliases]
test=pytest

[flake8]
exclude = setup.py,docs/*,examples/*,tests
max-line-length = 120
Expand Down
22 changes: 14 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))
)

requirements = [
# To keep things simple, we only support newer versions of Graphene
"graphene>=2.1.3,<3",
# Tests fail with 1.0.19
"SQLAlchemy>=1.1,<2",
"six>=1.10.0,<2",
"singledispatch>=3.4.0.3,<4",
]
try:
import enum
except ImportError: # Python < 2.7 and Python 3.3
requirements.append("enum34 >= 1.1.6")

tests_require = [
"pytest==4.3.1",
"mock==2.0.0",
Expand Down Expand Up @@ -42,14 +55,7 @@
],
keywords="api graphql protocol rest relay graphene",
packages=find_packages(exclude=["tests"]),
install_requires=[
# To keep things simple, we only support newer versions of Graphene
"graphene>=2.1.3,<3",
# Tests fail with 1.0.19
"SQLAlchemy>=1.1,<2",
"six>=1.10.0,<2",
"singledispatch>=3.4.0.3,<4",
],
install_requires=requirements,
extras_require={
"dev": [
"tox==3.7.0", # Should be kept in sync with tox.ini
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = pre-commit,py{34,35,36,37}-sql{11,12,13}
envlist = pre-commit,py{27,34,35,36,37}-sql{11,12,13}
skipsdist = true
minversion = 3.7.0

Expand Down