Skip to content

Commit 6706ab8

Browse files
authored
Merge pull request #119 from fyntex/feature/add-python-3.8-support
Add support for Python 3.8
2 parents 267c1a5 + f4b48d1 commit 6706ab8

File tree

5 files changed

+36
-11
lines changed

5 files changed

+36
-11
lines changed

.circleci/config.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99
# - https://circleci.com/docs/2.0/language-python/ for more details
1010
# - https://circleci.com/docs/2.0/configuration-reference/
1111
#
12-
version: 2
12+
version: "2.1"
13+
1314
jobs:
14-
test-py37:
15+
test:
16+
parameters:
17+
python_version:
18+
type: string
19+
1520
docker:
16-
- image: python:3.7.2
21+
- image: python:<< parameters.python_version >>
1722

1823
working_directory: ~/repo
1924

@@ -34,7 +39,14 @@ jobs:
3439
command: |
3540
. venv/bin/activate
3641
make lint
37-
tox -e py37
42+
43+
# Set Tox environment to the installed Python version.
44+
TOXENV=$(
45+
python -c 'import sys; v = sys.version_info; print("py{}{}".format(v.major, v.minor))'
46+
)
47+
48+
tox -e "$TOXENV"
49+
3850
codecov
3951
make test-coverage-report-console
4052
make test-coverage-report-html
@@ -75,5 +87,11 @@ workflows:
7587
version: 2
7688
ci:
7789
jobs:
78-
- test-py37
90+
- test:
91+
matrix:
92+
parameters:
93+
python_version:
94+
- "3.7.2"
95+
- "3.7.6"
96+
- "3.8.3"
7997
- dist

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Status
4343
Supported Python versions
4444
-------------------------
4545

46-
Only Python 3.7. Python 3.6 and below will not work because we use some features introduced in
47-
Python 3.7.
46+
Only Python 3.7 and 3.8. Python 3.6 and below will not work because we use some features introduced
47+
in Python 3.7.
4848

4949
Quickstart
5050
----------

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def get_version(*file_paths: Sequence[str]) -> str:
7575
'Natural Language :: English',
7676
'Programming Language :: Python :: 3',
7777
'Programming Language :: Python :: 3.7',
78+
'Programming Language :: Python :: 3.8',
7879
],
7980
description="""Python library for Servicio de Impuestos Internos (SII) of Chile.""",
8081
extras_require=extras_requirements,
@@ -86,7 +87,7 @@ def get_version(*file_paths: Sequence[str]) -> str:
8687
name='cl-sii',
8788
package_data=_package_data,
8889
packages=find_packages(exclude=['docs', 'tests*']),
89-
python_requires='>=3.7, <3.8',
90+
python_requires='>=3.7, <3.9',
9091
setup_requires=setup_requirements,
9192
test_suite='tests',
9293
tests_require=test_requirements,

tests/test_libs_io_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import io
22
import pathlib
3+
import sys
34
import tempfile
45
import unittest
56

@@ -69,8 +70,11 @@ def test_with_encoding_utf8(self):
6970

7071
with tempfile.SpooledTemporaryFile(mode='rt', encoding='utf-8') as f:
7172
self.assertTrue(isinstance(f, tempfile.SpooledTemporaryFile))
72-
# note: this is a strange case.
73-
self.assertFalse(with_encoding_utf8(f))
73+
if sys.version_info[:3] >= (3, 7, 6):
74+
self.assertTrue(with_encoding_utf8(f))
75+
else:
76+
# note: this is a strange case (Python 3.7).
77+
self.assertFalse(with_encoding_utf8(f))
7478

7579
# Text mode - encoding 'latin1'
7680

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[tox]
22
envlist =
3-
py37
3+
py37,
4+
py38,
45

56
[testenv]
67
setenv =
@@ -10,3 +11,4 @@ deps =
1011
-r{toxinidir}/requirements/test.txt
1112
basepython =
1213
py37: python3.7
14+
py38: python3.8

0 commit comments

Comments
 (0)