diff --git a/.gitmodules b/.gitmodules index c55c8e5e..74f48855 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "ext/spec"] path = ext/spec - url = http://github.com/mustache/spec.git + url = https://github.com/mustache/spec.git diff --git a/.travis.yml b/.travis.yml index 00227053..f0b40428 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,52 @@ +dist: xenial language: python # Travis CI has no plans to support Jython and no longer supports Python 2.5. python: - - 2.6 - - 2.7 - - 3.2 - - pypy + - "2.7" + - "3.5" + - "3.6" + - "3.7" + - "3.8" + - "3.9-dev" + - "nightly" + +matrix: + fast_finish: true + include: + - os: osx + # osx is goofy, ``python`` is always py2, images mutate fast + language: shell + before_install: + - pip3 install --upgrade pip wheel + install: + - python3 setup.py install + script: + - pystache-test . ext/spec/specs + - os: windows + # windows is even goofier, install path is different for python/python3 + # but either way you get python3 and the cmd is always ``python`` o.O + # (also versions mutuate like bacteria) + language: shell + before_install: + - choco install python3 --params "/InstallDir:C:\\Python" + - python -m pip install --upgrade pip wheel + env: PATH="/c/Python:/c/Python/Scripts:$PATH" + install: + - python setup.py install + script: + - pystache-test . ext/spec/specs + allow_failures: + - python: "nightly" + +# command to install dependencies +install: + - pip install --upgrade pip + - pip install codecov script: - python setup.py install # Include the spec tests directory for Mustache spec tests and the # project directory for doctests. - pystache-test . ext/spec/specs + #- tox diff --git a/pystache/tests/spectesting.py b/pystache/tests/spectesting.py index 40779639..5a011e67 100644 --- a/pystache/tests/spectesting.py +++ b/pystache/tests/spectesting.py @@ -237,8 +237,8 @@ def code_constructor(loader, node): value = loader.construct_mapping(node) return eval(value['python'], {}) - yaml.add_constructor('!code', code_constructor) - return yaml.load(u) + yaml.add_constructor(u'!code', code_constructor) + return yaml.full_load(u) class SpecTestBase(unittest.TestCase, AssertStringMixin): diff --git a/setup.py b/setup.py index 86539620..7a3b9f22 100644 --- a/setup.py +++ b/setup.py @@ -131,14 +131,13 @@ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.4', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: Implementation :: PyPy', ) @@ -382,7 +381,7 @@ def main(sys_argv): author_email='chris@ozmm.org', maintainer='Chris Jerdonek', maintainer_email='chris.jerdonek@gmail.com', - url='http://github.com/defunkt/pystache', + url='https://github.com/defunkt/pystache', install_requires=INSTALL_REQUIRES, packages=PACKAGES, package_data = { diff --git a/tox.ini b/tox.ini index d1eaebfb..2e725436 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,16 @@ [tox] # Tox 1.4 drops py24 and adds py33. In the current version, we want to # support 2.4, so we can't simultaneously support 3.3. -envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32,pypy +envlist = py27-yaml,py27-noargs,py3{5,6,7,8,9} +skip_missing_interpreters = true + +[tox:travis] +2.7 = py27-yaml +3.5 = py35 +3.6 = py36 +3.7 = py37 +3.8 = py38 +3.9 = py39 [testenv] # Change the working directory so that we don't import the pystache located