From 9919489ea1a787841ad311991fa8b0fbd1a2ede3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 24 Nov 2019 04:06:30 +0100 Subject: [PATCH 1/5] Travis CI: Matrix -> jobs and Python 3.6 to 3.8 --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04ae39222d..69d37bcd64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_cache: fi - rm -rf ~/.cargo/registry/src -matrix: +jobs: fast_finish: true include: - name: Run Rust tests(linux) @@ -42,7 +42,7 @@ matrix: # installing rust ourselves is a lot easier than installing Python) - name: Python test snippets language: python - python: 3.6 + python: 3.8 cache: - pip - cargo @@ -76,7 +76,7 @@ matrix: - name: Lint Python code with flake8 language: python - python: 3.6 + python: 3.8 cache: pip env: JOBCACHE=9 install: pip install flake8 @@ -134,7 +134,7 @@ matrix: - name: Code Coverage language: python - python: 3.6 + python: 3.8 cache: - pip - cargo @@ -149,7 +149,7 @@ matrix: - name: Test WASM language: python - python: 3.6 + python: 3.8 cache: - pip - cargo From d3b61ad49e09a316add5b79651e59a1837685e21 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 24 Nov 2019 04:29:51 +0100 Subject: [PATCH 2/5] Pipfile: python_version = "3.8" --- tests/Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Pipfile b/tests/Pipfile index 4bbae44ef9..3ac5abf869 100644 --- a/tests/Pipfile +++ b/tests/Pipfile @@ -10,4 +10,4 @@ pytest = "*" [dev-packages] [requires] -python_version = "3.6" +python_version = "3.8" From 59098988240abf4f743f907501bccc147ab88e95 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 24 Nov 2019 10:11:41 +0100 Subject: [PATCH 3/5] pow(2, -1, 5) == 3 on Python >= 3.8 --- tests/snippets/math_basics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/snippets/math_basics.py b/tests/snippets/math_basics.py index 31f47c9fb7..9db00327e5 100644 --- a/tests/snippets/math_basics.py +++ b/tests/snippets/math_basics.py @@ -49,7 +49,11 @@ assert_raises(TypeError, pow, 2, 4, 5.0) assert_raises(TypeError, pow, 2, 4.0, 5) assert_raises(TypeError, pow, 2.0, 4, 5) -assert_raises(ValueError, pow, 2, -1, 5) +from sys import version_info +if version_info < (3, 8): + assert_raises(ValueError, pow, 2, -1, 5) +else: # https://docs.python.org/3/whatsnew/3.8.html#other-language-changes + assert pow(2, -1, 5) == 3 assert_raises(ValueError, pow, 2, 2, 0) # bitwise From 64ff948a1ab70b5e3bc8d010749b5e0036479ecf Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 24 Nov 2019 14:03:15 +0100 Subject: [PATCH 4/5] Travis CI: Test WASM on Python 3.6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 69d37bcd64..dfa6812cd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -149,7 +149,7 @@ jobs: - name: Test WASM language: python - python: 3.8 + python: 3.6 cache: - pip - cargo From 7a48ff5235e3e7d96339d2fbff4ffd74f83446c4 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 24 Nov 2019 15:37:32 +0100 Subject: [PATCH 5/5] Update Pipfile --- tests/Pipfile | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Pipfile b/tests/Pipfile index 3ac5abf869..6f71ad25d6 100644 --- a/tests/Pipfile +++ b/tests/Pipfile @@ -10,4 +10,3 @@ pytest = "*" [dev-packages] [requires] -python_version = "3.8"