diff options
author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2019-12-07 07:46:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-07 07:46:03 -0600 |
commit | a1351ed6bdbb4ed84f3272844ff7f18e02e0217a (patch) | |
tree | ce001c73cd7e162afc6c66ec9ee826c8a44bc88f | |
parent | 3df0ed11278b130548df24ea6be81caf894a162c (diff) | |
parent | b98d77c546835aeded413cd7048e503f0158f387 (diff) | |
download | uritemplates-a1351ed6bdbb4ed84f3272844ff7f18e02e0217a.tar.gz |
Merge pull request #45 from brettcannon/py-38
Update support for Python 3.7 & 3.8
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | setup.py | 13 | ||||
-rw-r--r-- | tests/fixtures/extended-tests.json | 6 | ||||
-rw-r--r-- | tests/test_from_fixtures.py | 3 | ||||
-rw-r--r-- | tox.ini | 4 |
5 files changed, 23 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index ea6648d..ec4291e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,10 @@ matrix: env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 + - python: 3.7 + env: TOXENV=py37 + - python: 3.8 + env: TOXENV=py38 - env: TOXENV=pep8 install: @@ -1,3 +1,5 @@ +from io import open + from setuptools import setup from uritemplate import __version__ @@ -6,12 +8,17 @@ packages = [ 'uritemplate' ] +with open("README.rst", encoding="utf-8") as file: + readme = file.read() + +with open("HISTORY.rst", encoding="utf-8") as file: + history = file.read() + setup( name="uritemplate", version=__version__, description='URI templates', - long_description="\n\n".join([open("README.rst").read(), - open("HISTORY.rst").read()]), + long_description="\n\n".join([readme, history]), license="BSD 3-Clause License or Apache License, Version 2.0", author="Ian Stapleton Cordasco", author_email="graffatcolmingov@gmail.com", @@ -34,6 +41,8 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', ], ) diff --git a/tests/fixtures/extended-tests.json b/tests/fixtures/extended-tests.json index fd69744..ad43ad6 100644 --- a/tests/fixtures/extended-tests.json +++ b/tests/fixtures/extended-tests.json @@ -11,7 +11,7 @@ "lang" : "en", "geocode" : ["37.76","-122.427"], "first_name" : "John", - "last.name" : "Doe", + "last.name" : "Doe", "Some%20Thing" : "foo", "number" : 6, "long" : 37.76, @@ -28,7 +28,7 @@ "testcases":[ [ "{/id*}" , "/person" ], - [ "{/id*}{?fields,first_name,last.name,token}" , [ + [ "{/id*}{?fields,first_name,last.name,token}" , [ "/person?fields=id,name,picture&first_name=John&last.name=Doe&token=12345", "/person?fields=id,picture,name&first_name=John&last.name=Doe&token=12345", "/person?fields=picture,name,id&first_name=John&last.name=Doe&token=12345", @@ -68,7 +68,7 @@ "testcases":[ [ "{/id*}" , ["/person/albums","/albums/person"] ], - [ "{/id*}{?fields,token}" , [ + [ "{/id*}{?fields,token}" , [ "/person/albums?fields=id,name,picture&token=12345", "/person/albums?fields=id,picture,name&token=12345", "/person/albums?fields=picture,name,id&token=12345", diff --git a/tests/test_from_fixtures.py b/tests/test_from_fixtures.py index c21d395..d6c9810 100644 --- a/tests/test_from_fixtures.py +++ b/tests/test_from_fixtures.py @@ -1,3 +1,4 @@ +import io import json import os.path @@ -12,7 +13,7 @@ def fixture_file_path(filename): def load_examples(filename): path = fixture_file_path(filename) - with open(path, 'r') as examples_file: + with io.open(path, 'r', encoding="utf-8") as examples_file: examples = json.load(examples_file) return examples @@ -4,12 +4,14 @@ envlist = py34, py35, py36, + py37, + py38, pep8, [testenv] deps = pytest -commands = py.test {posargs} +commands = pytest {posargs} [testenv:pep8] deps = |