File tree Expand file tree Collapse file tree 5 files changed +36
-11
lines changed Expand file tree Collapse file tree 5 files changed +36
-11
lines changed Original file line number Diff line number Diff line change 9
9
# - https://circleci.com/docs/2.0/language-python/ for more details
10
10
# - https://circleci.com/docs/2.0/configuration-reference/
11
11
#
12
- version : 2
12
+ version : " 2.1"
13
+
13
14
jobs :
14
- test-py37 :
15
+ test :
16
+ parameters :
17
+ python_version :
18
+ type : string
19
+
15
20
docker :
16
- - image : python:3.7.2
21
+ - image : python:<< parameters.python_version >>
17
22
18
23
working_directory : ~/repo
19
24
34
39
command : |
35
40
. venv/bin/activate
36
41
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
+
38
50
codecov
39
51
make test-coverage-report-console
40
52
make test-coverage-report-html
@@ -75,5 +87,11 @@ workflows:
75
87
version : 2
76
88
ci :
77
89
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"
79
97
- dist
Original file line number Diff line number Diff line change 43
43
Supported Python versions
44
44
-------------------------
45
45
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.
48
48
49
49
Quickstart
50
50
----------
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def get_version(*file_paths: Sequence[str]) -> str:
75
75
'Natural Language :: English' ,
76
76
'Programming Language :: Python :: 3' ,
77
77
'Programming Language :: Python :: 3.7' ,
78
+ 'Programming Language :: Python :: 3.8' ,
78
79
],
79
80
description = """Python library for Servicio de Impuestos Internos (SII) of Chile.""" ,
80
81
extras_require = extras_requirements ,
@@ -86,7 +87,7 @@ def get_version(*file_paths: Sequence[str]) -> str:
86
87
name = 'cl-sii' ,
87
88
package_data = _package_data ,
88
89
packages = find_packages (exclude = ['docs' , 'tests*' ]),
89
- python_requires = '>=3.7, <3.8 ' ,
90
+ python_requires = '>=3.7, <3.9 ' ,
90
91
setup_requires = setup_requirements ,
91
92
test_suite = 'tests' ,
92
93
tests_require = test_requirements ,
Original file line number Diff line number Diff line change 1
1
import io
2
2
import pathlib
3
+ import sys
3
4
import tempfile
4
5
import unittest
5
6
@@ -69,8 +70,11 @@ def test_with_encoding_utf8(self):
69
70
70
71
with tempfile .SpooledTemporaryFile (mode = 'rt' , encoding = 'utf-8' ) as f :
71
72
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 ))
74
78
75
79
# Text mode - encoding 'latin1'
76
80
Original file line number Diff line number Diff line change 1
1
[tox]
2
2
envlist =
3
- py37
3
+ py37,
4
+ py38,
4
5
5
6
[testenv]
6
7
setenv =
10
11
-r{toxinidir}/requirements/test.txt
11
12
basepython =
12
13
py37: python3.7
14
+ py38: python3.8
You can’t perform that action at this time.
0 commit comments