diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 749aa6ba..9d0eb1fa 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.10.0 +current_version = 0.10.1 commit = True tag = True diff --git a/.circleci/config.yml b/.circleci/config.yml index de5284db..cde09f5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,11 +9,16 @@ # - https://circleci.com/docs/2.0/language-python/ for more details # - https://circleci.com/docs/2.0/configuration-reference/ # -version: 2 +version: "2.1" + jobs: - test-py37: + test: + parameters: + python_version: + type: string + docker: - - image: python:3.7.2 + - image: python:<< parameters.python_version >> working_directory: ~/repo @@ -34,7 +39,14 @@ jobs: command: | . venv/bin/activate make lint - tox -e py37 + + # Set Tox environment to the installed Python version. + TOXENV=$( + python -c 'import sys; v = sys.version_info; print("py{}{}".format(v.major, v.minor))' + ) + + tox -e "$TOXENV" + codecov make test-coverage-report-console make test-coverage-report-html @@ -75,5 +87,11 @@ workflows: version: 2 ci: jobs: - - test-py37 + - test: + matrix: + parameters: + python_version: + - "3.7.2" + - "3.7.6" + - "3.8.3" - dist diff --git a/HISTORY.rst b/HISTORY.rst index 78e0a1fb..17f11dfd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.10.1 (2020-06-08) ++++++++++++++++++++++++ + +* (PR #119, 2020-06-08) Add support for Python 3.8 + 0.10.0 (2020-04-14) +++++++++++++++++++++++ diff --git a/README.rst b/README.rst index 550c7bb4..73f69745 100644 --- a/README.rst +++ b/README.rst @@ -43,8 +43,8 @@ Status Supported Python versions ------------------------- -Only Python 3.7. Python 3.6 and below will not work because we use some features introduced in -Python 3.7. +Only Python 3.7 and 3.8. Python 3.6 and below will not work because we use some features introduced +in Python 3.7. Quickstart ---------- diff --git a/cl_sii/__init__.py b/cl_sii/__init__.py index f73bf4cf..147552f6 100644 --- a/cl_sii/__init__.py +++ b/cl_sii/__init__.py @@ -5,4 +5,4 @@ """ -__version__ = '0.10.0' +__version__ = '0.10.1' diff --git a/setup.py b/setup.py index d9707283..f5094afb 100755 --- a/setup.py +++ b/setup.py @@ -75,6 +75,7 @@ def get_version(*file_paths: Sequence[str]) -> str: 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], description="""Python library for Servicio de Impuestos Internos (SII) of Chile.""", extras_require=extras_requirements, @@ -86,7 +87,7 @@ def get_version(*file_paths: Sequence[str]) -> str: name='cl-sii', package_data=_package_data, packages=find_packages(exclude=['docs', 'tests*']), - python_requires='>=3.7, <3.8', + python_requires='>=3.7, <3.9', setup_requires=setup_requirements, test_suite='tests', tests_require=test_requirements, diff --git a/tests/test_libs_io_utils.py b/tests/test_libs_io_utils.py index 7a850b3e..2a35dbd4 100644 --- a/tests/test_libs_io_utils.py +++ b/tests/test_libs_io_utils.py @@ -1,5 +1,6 @@ import io import pathlib +import sys import tempfile import unittest @@ -69,8 +70,11 @@ def test_with_encoding_utf8(self): with tempfile.SpooledTemporaryFile(mode='rt', encoding='utf-8') as f: self.assertTrue(isinstance(f, tempfile.SpooledTemporaryFile)) - # note: this is a strange case. - self.assertFalse(with_encoding_utf8(f)) + if sys.version_info[:3] >= (3, 7, 6): + self.assertTrue(with_encoding_utf8(f)) + else: + # note: this is a strange case (Python 3.7). + self.assertFalse(with_encoding_utf8(f)) # Text mode - encoding 'latin1' diff --git a/tox.ini b/tox.ini index e2329362..27abbb3a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = - py37 + py37, + py38, [testenv] setenv = @@ -10,3 +11,4 @@ deps = -r{toxinidir}/requirements/test.txt basepython = py37: python3.7 + py38: python3.8