Repository: falconry/falcon
Pull request #1601 (2019-10-31 19:00:46)

chore(ci): promote CPython 3.8.0 to the "default" Tox/CI interpreter
Here we promote CPython 3.8.0 to the "default" Tox/CI interpreter where applicable.
Still left out are our benchmark Docker images.

CPython 3.8.0 is still a bit fresh at the time of writing, however, I expect it to become more widespread in the wild by the time Falcon 3.0 [final] is released.

codecov[bot]: # [Codecov](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=h1) Report
> Merging [#1601](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=desc) into [master](https://codecov.io/gh/falconry/falcon/commit/a14a8e367497bd559773f70510c928da781a0f6f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/falconry/falcon/pull/1601/graphs/tree.svg?width=650&token=zOtkfNQ3h6&height=150&src=pr)](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=tree)

```diff
@@          Coverage Diff           @@
##           master   #1601   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          40      40           
  Lines        2595    2665   +70     
  Branches      394     394           
======================================
+ Hits         2595    2665   +70
```


| [Impacted Files](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [falcon/testing/client.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3Rlc3RpbmcvY2xpZW50LnB5) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/request\_helpers.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3JlcXVlc3RfaGVscGVycy5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/request.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3JlcXVlc3QucHk=) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/testing/srmock.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3Rlc3Rpbmcvc3Jtb2NrLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/media/validators/jsonschema.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL21lZGlhL3ZhbGlkYXRvcnMvanNvbnNjaGVtYS5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/routing/compiled.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3JvdXRpbmcvY29tcGlsZWQucHk=) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/response.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3Jlc3BvbnNlLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/util/structures.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3V0aWwvc3RydWN0dXJlcy5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/hooks.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL2hvb2tzLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [falcon/util/misc.py](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree#diff-ZmFsY29uL3V0aWwvbWlzYy5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/falconry/falcon/pull/1601/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=footer). Last update [a14a8e3...08c0248](https://codecov.io/gh/falconry/falcon/pull/1601?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.travis.yml b/.travis.yml
index c65a310..49d0d14 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,9 +11,9 @@ matrix:
     include:
         - python: pypy3.5-6.0
           env: TOXENV=pypy3
-        - python: 3.7
+        - python: 3.8
           env: TOXENV=pep8
-        - python: 3.7
+        - python: 3.8
           env: TOXENV=pep8-examples
         - python: 3.5
           env: TOXENV=py35
@@ -21,24 +21,22 @@ matrix:
           env: TOXENV=py36
         - python: 3.7
           env: TOXENV=py37
-        - python: 3.7
-          env: TOXENV=py37_cython
-        - python: 3.7
-          env: TOXENV=py37_smoke
-        - python: 3.7
-          env: TOXENV=py37_smoke_cython
-        - python: 3.7
+        - python: 3.8
+          env: TOXENV=py38
+        - python: 3.8
+          env: TOXENV=py38_cython
+        - python: 3.8
+          env: TOXENV=py38_smoke
+        - python: 3.8
+          env: TOXENV=py38_smoke_cython
+        - python: 3.8
           env: TOXENV=docs
         # TODO(kgriffs): Re-enable once hug has a chance to address
         #   breaking changes in Falcon 3.0
         # - python: 3.7
         #   env: TOXENV=hug
-        - python: 3.7
-          env: TOXENV=check_vendored
-        - python: 3.8
-          env: TOXENV=py38
         - python: 3.8
-          env: TOXENV=py38_cython
+          env: TOXENV=check_vendored
 
 script: tox
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e17a52e..484390c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,20 +27,20 @@ Please note that all contributors and maintainers of this project are subject to
 
 Before submitting a pull request, please ensure you have added or updated tests as appropriate, and that all existing tests still pass with your changes. Please also ensure that your coding style follows PEP 8.
 
-You can check all this by running the following from within the Falcon project directory (requires Python 3.7 to be installed on your system):
+You can check all this by running the following from within the Falcon project directory (requires Python 3.8 to be installed on your system):
 
 ```bash
 $ tools/mintest.sh
 
 ```
 
-You may also use Python 3.5 or 3.6 if you don't have 3.7 installed on your system. Substitute "py35" or "py36" as appropriate. For example:
+You may also use Python 3.5, 3.6 or 3.7 if you don't have 3.8 installed on your system. Substitute "py35", "py36" or "py37" as appropriate. For example:
 
 
 ```bash
 $ pip install -U tox coverage
 $ rm -f .coverage.*
-$ tox -e pep8 && tox -e py35 && tools/testing/combine_coverage.sh
+$ tox -e pep8 && tox -e py37 && tools/testing/combine_coverage.sh
 
 #### Reviews
 
@@ -90,21 +90,21 @@ If you wish, you can customize Falcon's `tox.ini` to install alternative debugge
 A few simple benchmarks are included with the source under ``falcon/bench``. These can be taken as a rough measure of the performance impact (if any) that your changes have on the framework. You can run these tests by invoking one of the tox environments included for this purpose (see also the ``tox.ini`` file). For example:
 
 ```bash
-$ tox -e py37_bench
+$ tox -e py38_bench
 ```
 
 Note that you may pass additional arguments via tox to the falcon-bench command:
 
 ```bash
-$ tox -e py37_bench -- -h
-$ tox -e py37_bench -- -b falcon -i 20000
+$ tox -e py38_bench -- -h
+$ tox -e py38_bench -- -b falcon -i 20000
 ```
 
 Alternatively, you may run falcon-bench directly by creating a new virtual environment and installing falcon directly in development mode. In this example we use pyenv with pyenv-virtualenv from within a falcon source directory:
 
 ```bash
-$ pyenv virtualenv 3.7.3 falcon-sandbox-37
-$ pyenv shell falcon-sandbox-37
+$ pyenv virtualenv 3.8.0 falcon-sandbox-38
+$ pyenv shell falcon-sandbox-38
 $ pip install -r requirements/bench
 $ pip install -e .
 $ falcon-bench
diff --git a/tox.ini b/tox.ini
index d621c2e..e7fc556 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,7 @@
 
 # --------------------------------------------------------------------
 #
-# NOTE(kgriffs): Python 3.7 is required when
+# NOTE(kgriffs): Python 3.8 is required when
 # checking combined coverage. To check coverage:
 #
 #   $ tools/mintest.sh
@@ -11,15 +11,14 @@
 #
 #   $ pip install -U tox coverage
 #   $ rm -f .coverage.*
-#   $ tox -e pep8 && tox -e py37 && tools/testing/combine_coverage.sh
+#   $ tox -e pep8 && tox -e py38 && tools/testing/combine_coverage.sh
 #
 # You can then drill down into coverage details by opening the HTML
 # report at ".coverage_html/index.html".
 #
 # --------------------------------------------------------------------
 
-envlist = py37,
-          py38,
+envlist = py38,
           pep8,
           docs
 
@@ -40,7 +39,7 @@ whitelist_externals = mkdir
 commands = "{toxinidir}/tools/clean.sh" "{toxinidir}/falcon"
            coverage run -m pytest tests []
 
-[testenv:py37]
+[testenv:py38]
 deps = {[testenv]deps}
        pytest-randomly
        jsonschema
@@ -66,7 +65,7 @@ deps = -r{toxinidir}/requirements/tests
        pdbpp
 
 [testenv:py3_debug]
-basepython = python3.7
+basepython = python3.8
 deps = {[with-debug-tools]deps}
 
 # --------------------------------------------------------------------
@@ -100,13 +99,13 @@ deps = {[with-cython]deps}
 [smoke-test]
 commands = falcon-bench -t 1 -b falcon-ext
 
-[testenv:py37_smoke]
-basepython = python3.7
+[testenv:py38_smoke]
+basepython = python3.8
 deps = -r{toxinidir}/requirements/bench
 commands = {[smoke-test]commands}
 
-[testenv:py37_smoke_cython]
-basepython = python3.7
+[testenv:py38_smoke_cython]
+basepython = python3.8
 deps = -r{toxinidir}/requirements/bench
        cython
 commands = {[smoke-test]commands}
@@ -120,7 +119,7 @@ deps = flake8
        flake8-quotes
        flake8-import-order
 
-basepython = python3.7
+basepython = python3.8
 
 commands = flake8 \
              --max-complexity=15 \
@@ -136,7 +135,7 @@ deps = flake8
        flake8-quotes
        flake8-import-order
 
-basepython = python3.7
+basepython = python3.8
 
 commands = flake8 examples \
              --max-complexity=12 \
@@ -150,18 +149,18 @@ commands = flake8 examples \
 # For viewing environ dicts generated by various WSGI servers
 # --------------------------------------------------------------------
 
-[testenv:py37_dump_gunicorn]
-basepython = python3.7
+[testenv:py38_dump_gunicorn]
+basepython = python3.8
 deps = gunicorn
 commands = gunicorn -b localhost:8000 tests.dump_wsgi
 
-[testenv:py37_dump_waitress]
-basepython = python3.7
+[testenv:py38_dump_waitress]
+basepython = python3.8
 deps = waitress
 commands = waitress-serve --listen=localhost:8000 tests.dump_wsgi:application
 
-[testenv:py37_dump_wsgiref]
-basepython = python3.7
+[testenv:py38_dump_wsgiref]
+basepython = python3.8
 commands = python tests/dump_wsgi.py
 
 # --------------------------------------------------------------------
@@ -201,6 +200,17 @@ deps = -r{toxinidir}/requirements/bench
        cython
 commands = falcon-bench []
 
+[testenv:py38_bench]
+basepython = python3.8
+deps = -r{toxinidir}/requirements/bench
+commands = falcon-bench []
+
+[testenv:py38_bench_cython]
+basepython = python3.8
+deps = -r{toxinidir}/requirements/bench
+       cython
+commands = falcon-bench []
+
 [testenv:pypy_bench]
 basepython = pypy
 deps = -r{toxinidir}/requirements/bench
@@ -216,7 +226,7 @@ commands = falcon-bench []
 # --------------------------------------------------------------------
 
 [testenv:check_vendored]
-basepython = python3.7
+basepython = python3.8
 deps =
 commands = {toxinidir}/tools/check-vendored.sh
 
@@ -225,7 +235,7 @@ commands = {toxinidir}/tools/check-vendored.sh
 # --------------------------------------------------------------------
 
 [testenv:docs]
-basepython = python3.7
+basepython = python3.8
 deps = -r{toxinidir}/requirements/docs
 commands =
     sphinx-build -j 4 -W -E -b html docs docs/_build/html []


Test patch:
diff --git a/tools/mintest.sh b/tools/mintest.sh
index 1c53f3f..bbc0bb3 100755
--- a/tools/mintest.sh
+++ b/tools/mintest.sh
@@ -3,4 +3,4 @@
 pip install -U tox coverage
 
 rm -f .coverage.*
-tox -e pep8 && tox -e py37 && tools/testing/combine_coverage.sh
+tox -e pep8 && tox -e py38 && tools/testing/combine_coverage.sh