From fc71ef5d642a222e2c14c97b0728da69d140210e Mon Sep 17 00:00:00 2001 From: lewoudar Date: Tue, 31 Dec 2019 12:48:11 +0100 Subject: [PATCH 1/2] add support for python3.8 --- .travis.yml | 10 +++++----- appveyor.yml | 18 ++++++++++++------ noxfile.py | 10 +++++----- setup.py | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfdbc1f8..0a3b27af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: python +dist: xenial matrix: include: - python: '3.5' @@ -7,13 +8,12 @@ matrix: env: NOXSESSION="tests-3.6" - python: '3.7' env: NOXSESSION="tests-3.7" - dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) - - python: '3.7' + - python: '3.8' + env: NOXSESSION="tests-3.8" + - python: '3.8' env: NOXSESSION="lint" - dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) - - python: '3.7' + - python: '3.8' env: NOXSESSION="docs" - dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) before_install: - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - chmod +x miniconda.sh diff --git a/appveyor.yml b/appveyor.yml index 969d9fb0..90cdf763 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,16 +10,22 @@ environment: # a later point release. # See: http://www.appveyor.com/docs/installed-software#python + - PYTHON: "C:\\Python38" + # There is no miniconda for python3.8 at this time + CONDA: "C:\\Miniconda37" + NOX_SESSION: "tests-3.8" + + - PYTHON: "C:\\Python38-x64" + # There is no miniconda for python3.8 at this time + CONDA: "C:\\Miniconda37-x64" + NOX_SESSION: "tests-3.8" + - PYTHON: "C:\\Python37" - # Python 3.7 conda installation appears to be broken on Appveyor: - # TypeError: LoadLibrary() argument 1 must be str, not None - CONDA: "C:\\Miniconda36" + CONDA: "C:\\Miniconda37" NOX_SESSION: "tests-3.7" - PYTHON: "C:\\Python37-x64" - # Python 3.7 conda installation appears to be broken on Appveyor: - # TypeError: LoadLibrary() argument 1 must be str, not None - CONDA: "C:\\Miniconda36-x64" + CONDA: "C:\\Miniconda37-x64" NOX_SESSION: "tests-3.7" - PYTHON: "C:\\Python36" diff --git a/noxfile.py b/noxfile.py index b74c1987..6eda1e23 100644 --- a/noxfile.py +++ b/noxfile.py @@ -19,7 +19,7 @@ ON_APPVEYOR = os.environ.get("APPVEYOR") == "True" -@nox.session(python=["3.5", "3.6", "3.7"]) +@nox.session(python=["3.5", "3.6", "3.7", "3.8"]) def tests(session): """Run test suite with pytest.""" session.install("-r", "requirements-test.txt") @@ -31,7 +31,7 @@ def tests(session): session.notify("cover") -@nox.session(python=["3.5", "3.6", "3.7"], venv_backend="conda") +@nox.session(python=["3.5", "3.6", "3.7", "3.8"], venv_backend="conda") def conda_tests(session): """Run test suite with pytest.""" session.conda_install( @@ -55,7 +55,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.7") +@nox.session(python="3.8") def blacken(session): """Run black code formater.""" session.install("black==19.3b0", "isort==4.3.21") @@ -64,7 +64,7 @@ def blacken(session): session.run("isort", "--recursive", *files) -@nox.session(python="3.7") +@nox.session(python="3.8") def lint(session): session.install("flake8==3.7.8", "black==19.3b0", "mypy==0.720") session.run("mypy", "nox") @@ -73,7 +73,7 @@ def lint(session): session.run("flake8", "nox", *files) -@nox.session(python="3.7") +@nox.session(python="3.8") def docs(session): """Build the documentation.""" session.run("rm", "-rf", "docs/_build", external=True) diff --git a/setup.py b/setup.py index bcf233a6..abf508db 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,6 @@ long_description = open("README.rst", "r", encoding="utf-8").read() - setup( name="nox", version="2019.11.9", @@ -39,6 +38,7 @@ "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Operating System :: POSIX", "Operating System :: MacOS", "Operating System :: Unix", From 1009aa65e2f1c6376991a187fffdd4b5576f85e2 Mon Sep 17 00:00:00 2001 From: lewoudar Date: Tue, 31 Dec 2019 19:39:05 +0100 Subject: [PATCH 2/2] docs: fix typo and update CONTRIBUTING.md --- CONTRIBUTING.md | 1 + docs/config.rst | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c47ed3bf..46b79f0d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,7 @@ To run against a particular Python version: nox --session tests-3.5 nox --session tests-3.6 nox --session tests-3.7 + nox --session tests-3.8 When you send a pull request Travis will handle running everything, but it is recommended to test as much as possible locally before pushing. diff --git a/docs/config.rst b/docs/config.rst index de094706..0cdffb3f 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -112,11 +112,11 @@ When you provide a version number, Nox automatically prepends python to determin def tests(session): pass -When collecting your sessions, Nox will create a separate session for each interpreter. You can see these sesions when running ``nox --list``. For example this Noxfile: +When collecting your sessions, Nox will create a separate session for each interpreter. You can see these sessions when running ``nox --list``. For example this Noxfile: .. code-block:: python - @nox.session(python=['2.7', '3.5', '3.6', '3.7']) + @nox.session(python=['2.7', '3.5', '3.6', '3.7', '3.8']) def tests(session): pass @@ -128,6 +128,7 @@ Will produce these sessions: * tests-3.5 * tests-3.6 * tests-3.7 + * tests-3.8 Note that this expansion happens *before* parameterization occurs, so you can still parametrize sessions with multiple interpreters. @@ -222,7 +223,7 @@ When you run ``nox``, it will create a two distinct sessions: nox > Running session tests(django='1.9') nox > pip install django==1.9 ... - nox > Running session tests(djano='2.0') + nox > Running session tests(django='2.0') nox > pip install django==2.0