Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Makefile
  • Loading branch information
jdidion committed Jun 14, 2017
2 parents f629a50 + a831a49 commit 6f03696
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
v3.0.2 (dev)
------------

* Forcing use of backports.typing for python < 3.6.
* Added basic performance testing.

v3.0.1 (2017.04.29)
-------------------
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ test:
perftest:
py.test -m "perf" $(tests)

clean:
rm -Rf __pycache__
rm -Rf **/__pycache__/*
rm -Rf dist
rm -Rf build
rm -Rf *.egg-info

release:
# make sure required variables set via commandline
ifndef version
$(error version is not set)
endif
ifndef token
$(error token is not set)
endif
$(clean)
# tag
git tag $(version)
# build
Expand Down
14 changes: 9 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
if sys.version_info < (3, 3):
sys.stdout.write("At least Python 3.3 is required.\n")
sys.exit(1)
elif sys.version_info < (3, 5):
# typing was added in 3.5, but a backport is available for 3.3+
requirements.append('typing')
elif sys.version_info < (3, 6):
# typing was added in 3.5, and we rely on critical features that were
# introduced in 3.5.2+, so for versions older than 3.6 we rely on
# a backport
requirements.append('backports.typing')

import versioneer

Expand All @@ -31,11 +33,13 @@
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: MIT',
'License :: OSI Approved :: MIT License',
'License :: Public Domain',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.6',
],
)
15 changes: 11 additions & 4 deletions xphyle/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
import stat
import sys
from types import ModuleType
from typing import *
# ISSUE: Not sure why I have to import IO separately
from typing import IO
from typing.re import *
# HACK: critical features were introduced in python 3.5.2, so we force use
# of backports.typing even in 3.5
if sys.version_info < (3, 6):
from backports.typing import *
from backports.typing import IO
from backports.typing.re import *
else:
from typing import *
# ISSUE: Not sure why I have to import IO separately
from typing import IO
from typing.re import *

# ISSUE: there are several mypy errors due to incomplete enum support.
# enums should be fully suported in the next version of mypy (>0.501).
Expand Down

0 comments on commit 6f03696

Please sign in to comment.