Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Python 3.8 #270

Merged
merged 2 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: python
dist: xenial
matrix:
include:
- python: '3.5'
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 12 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down Expand Up @@ -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


Expand Down
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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(
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

long_description = open("README.rst", "r", encoding="utf-8").read()


setup(
name="nox",
version="2019.11.9",
Expand All @@ -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",
Expand Down