Skip to content

Commit

Permalink
Fix ImportError due to lack of typing on python3.4
Browse files Browse the repository at this point in the history
Fix #4
  • Loading branch information
dahlia committed Sep 17, 2017
1 parent a11d16f commit da0bd00
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ python:
- 3.5
- 3.6
install: pip install tox-travis
script: tox
script:
- tox
- tox -e mypy
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Version 0.5.4

To be released.

- Fixed :exc:`ImportError` on Python 3.4 due to lack of :mod:`typing` module.
[:issue:`4`]


Version 0.5.3
'''''''''''''
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def readme():
packages=find_packages(exclude=['docs', 'tests']),
python_requires='>=3.4.0',
install_requires=['Babel >= 2.0'],
extras_require={':python_version<"3.5"': ['typing']},
keywords='wikidata ontology',
classifiers=[
'Development Status :: 4 - Beta',
Expand Down
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
[tox]
envlist = py34, py35, py36
envlist = py34, py35, py36, mypy

[testenv]
deps =
flake8 >= 3.3.0
flake8-import-order-spoqa
mypy >= 0.511
pytest >= 3.0.7, < 3.1.0
pytest-capturelog >= 0.7, < 1.0
pytest-catchlog >= 1.2.2, < 1.3.0
pytest-flake8 >= 0.8.1, < 0.9.0
commands =
pytest {posargs:}

[testenv:mypy]
basepython = python3
deps =
mypy >= 0.521
commands =
mypy -p wikidata
mypy -p tests

Expand Down

0 comments on commit da0bd00

Please sign in to comment.