Travis CI: Test Python 3.8#13347
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1fb5a0f to
c7f9e52
Compare
| if sys.version_info > (3, 1): | ||
| from html import escape | ||
| else: | ||
| from cgi import escape |
There was a problem hiding this comment.
According to https://docs.python.org/3.7/library/cgi.html, cgi.escape has been deprecated since Python 3.2, and html.escape should be used instead. These methods are identical, but cgi.escape defaults to quotes=False, while html.escape defaults to quotes=True. See https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals for the announcement of the cgi.escape removal.
|
The # '@when' decorated functions are exempt from redefinition errors
@when('@2.0') # noqa: F811
def install(self, spec, prefix):
pass EDIT: Okay, I'm now able to reproduce this, I needed to build EDIT: Looks like a change was made in flake8 or one of its dependencies. Previously, @when('@2.0') # noqa: F811
def install(self, spec, prefix): was required. Now, @when('@2.0')
def install(self, spec, prefix): # noqa: F811 is required. EDIT: Opened an issue: PyCQA/pyflakes#487 |
|
Okay, looks like the behavior of things changed in Python 3.8: https://gitlab.com/pycqa/flake8/issues/583 We'll have to figure out how to add the |
|
Okay, with the latest commit, we get: # '@when' decorated functions are exempt from redefinition errors
@when('@2.0') # noqa: F811
def install(self, spec, prefix): # noqa: F811
passI think this is as robust as we can get for now. |
|
Thoughts on switching all tests from Python 3.7 to 3.8 (including flake8, docs, and build tests)? Pros:
Cons:
EDIT: Let's see what happens 😄 |
| ignore_f811_on_previous_line = True | ||
| elif ignore_f811_on_previous_line: | ||
| line_errors.append('F811') | ||
| ignore_f811_on_previous_line = False |
There was a problem hiding this comment.
This might be equivalent to:
ignore_f811_on_previous_line = 'F811' in line_errors and line_errors.append('F811')but sometimes too much magic is a bad thing.
| language: python | ||
| env: [ TEST_SUITE=build, 'SPEC=mpich' ] | ||
| - python: '3.6' | ||
| - python: '3.8' |
There was a problem hiding this comment.
Is this docker test actually run?
There was a problem hiding this comment.
it might be that we still use this to push packages.spack.io - have to migrate this over to Dockerhub builds some time soonish
There was a problem hiding this comment.
As far as I understand the docker test is a CD step that is always run on push to develop and master:
Lines 113 to 114 in 4626c28
In fact at every commit we currently build many docker images on Dockerhub (each with a different base OS).
There was a problem hiding this comment.
If you check the Build History on Travis you should see the docker step run last.
There was a problem hiding this comment.
Yes, but we are in the process of migrating those builds to automatic builds on Dockerhub itself. For now, we still need it in Travis CI.
* Travis CI: Test Python 3.8 * Fix use of deprecated cgi.escape method * Fix version comparison * Fix flake8 F811 change in Python 3.8 * Make flake8 happy * Use Python 3.8 for all test categories
This PR adds Python 3.8 to our list of tested versions on Travis CI. It also fixes several bugs with our Python 3.8 support
spack flake8spack list --format=html