Skip to content

Commit 88ac444

Browse files
committed
Run nox sessions and ci in 3.11
This is the default version used. Tests still assert prior and later versions are supported by default.
1 parent ba0b37a commit 88ac444

4 files changed

Lines changed: 34 additions & 35 deletions

File tree

.github/workflows/python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: "Set up Python"
6868
uses: "actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1"
6969
with:
70-
python-version: "3.10"
70+
python-version: "3.11"
7171

7272
- name: "Install nox"
7373
run: |
@@ -95,7 +95,7 @@ jobs:
9595
- name: "Set up Python"
9696
uses: "actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1"
9797
with:
98-
python-version: "3.10"
98+
python-version: "3.11"
9999

100100
- name: "Install nox"
101101
run: |

noxfile.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
MODULE_NAME = "module_name"
1212
TESTS_PATH = "tests"
1313
COVERAGE_FAIL_UNDER = 50
14+
DEFAULT_PYTHON_VERSION = "3.11"
1415
VENV_PATH = "venv"
15-
WINDOWS_PYTHON = "py"
16-
LINUX_PYTHON = "python3"
1716
REQUIREMENT_IN_FILES = [
1817
pathlib.Path("requirements/requirements.in"),
1918
pathlib.Path("requirements/requirements-dev.in"),
@@ -55,7 +54,7 @@ def tests_with_coverage(session: nox.Session) -> None:
5554
session.run("coverage", "run", "-p", "-m", "pytest", TESTS_PATH)
5655

5756

58-
@nox.session()
57+
@nox.session(python=DEFAULT_PYTHON_VERSION)
5958
def coverage_combine_and_report(session: nox.Session) -> None:
6059
"""Combine all coverage partial files and generate JSON report."""
6160
print_standard_logs(session)
@@ -68,7 +67,7 @@ def coverage_combine_and_report(session: nox.Session) -> None:
6867
session.run("python", "-m", "coverage", "json")
6968

7069

71-
@nox.session()
70+
@nox.session(python=DEFAULT_PYTHON_VERSION)
7271
def mypy_check(session: nox.Session) -> None:
7372
"""Run mypy against package and all required dependencies."""
7473
print_standard_logs(session)
@@ -93,7 +92,7 @@ def docker(session: nox.Session) -> None:
9392
session.run("docker", "run", "-it", "--rm", "pydocker-test")
9493

9594

96-
@nox.session()
95+
@nox.session(python=DEFAULT_PYTHON_VERSION)
9796
def build(session: nox.Session) -> None:
9897
"""Build distrobution files."""
9998
print_standard_logs(session)
@@ -113,7 +112,7 @@ def install(session: nox.Session) -> None:
113112
venv_path = f"{venv_path}/Scripts"
114113
activate_command = f"{venv_path}/activate"
115114
else:
116-
py_command = "python3"
115+
py_command = f"python{DEFAULT_PYTHON_VERSION}"
117116
venv_path = f"{venv_path}/bin"
118117
activate_command = f"source {venv_path}/activate"
119118

@@ -128,7 +127,7 @@ def install(session: nox.Session) -> None:
128127
session.log(f"\n\nRun '{activate_command}' to enter the virtual environment.\n")
129128

130129

131-
@nox.session()
130+
@nox.session(python=DEFAULT_PYTHON_VERSION)
132131
def update(session: nox.Session) -> None:
133132
"""Process requirement*.in files, updating only additions/removals."""
134133
print_standard_logs(session)
@@ -138,7 +137,7 @@ def update(session: nox.Session) -> None:
138137
session.run("pip-compile", "--no-emit-index-url", str(filename))
139138

140139

141-
@nox.session()
140+
@nox.session(python=DEFAULT_PYTHON_VERSION)
142141
def upgrade(session: nox.Session) -> None:
143142
"""Process requirement*.in files and upgrade all libraries as possible."""
144143
print_standard_logs(session)

requirements/requirements-dev.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,55 @@
44
#
55
# pip-compile --no-emit-index-url requirements/requirements-dev.in
66
#
7-
black==23.10.1
7+
black==24.2.0
88
# via -r requirements/requirements-dev.in
99
cfgv==3.4.0
1010
# via pre-commit
1111
click==8.1.7
1212
# via black
13-
distlib==0.3.7
13+
distlib==0.3.8
1414
# via virtualenv
15-
filelock==3.13.0
15+
filelock==3.13.1
1616
# via virtualenv
17-
flake8==6.1.0
17+
flake8==7.0.0
1818
# via
1919
# -r requirements/requirements-dev.in
2020
# flake8-builtins
21-
flake8-builtins==2.1.0
21+
flake8-builtins==2.2.0
2222
# via -r requirements/requirements-dev.in
2323
flake8-pep585==0.1.7
2424
# via -r requirements/requirements-dev.in
25-
identify==2.5.31
25+
identify==2.5.35
2626
# via pre-commit
2727
mccabe==0.7.0
2828
# via flake8
29-
mypy==1.6.1
29+
mypy==1.9.0
3030
# via -r requirements/requirements-dev.in
3131
mypy-extensions==1.0.0
3232
# via
3333
# black
3434
# mypy
3535
nodeenv==1.8.0
3636
# via pre-commit
37-
packaging==23.2
37+
packaging==24.0
3838
# via black
39-
pathspec==0.11.2
39+
pathspec==0.12.1
4040
# via black
41-
platformdirs==3.11.0
41+
platformdirs==4.2.0
4242
# via
4343
# black
4444
# virtualenv
45-
pre-commit==3.5.0
45+
pre-commit==3.6.2
4646
# via -r requirements/requirements-dev.in
4747
pycodestyle==2.11.1
4848
# via flake8
49-
pyflakes==3.1.0
49+
pyflakes==3.2.0
5050
# via flake8
5151
pyyaml==6.0.1
5252
# via pre-commit
53-
typing-extensions==4.8.0
53+
typing-extensions==4.10.0
5454
# via mypy
55-
virtualenv==20.24.6
55+
virtualenv==20.25.1
5656
# via pre-commit
5757

5858
# The following packages are considered to be unsafe in a requirements file:

requirements/requirements-test.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@
44
#
55
# pip-compile --no-emit-index-url requirements/requirements-test.in
66
#
7-
argcomplete==3.1.2
7+
argcomplete==3.2.3
88
# via nox
9-
colorlog==6.7.0
9+
colorlog==6.8.2
1010
# via nox
11-
coverage==7.3.2
11+
coverage==7.4.3
1212
# via -r requirements/requirements-test.in
13-
distlib==0.3.7
13+
distlib==0.3.8
1414
# via virtualenv
15-
filelock==3.13.0
15+
filelock==3.13.1
1616
# via virtualenv
1717
iniconfig==2.0.0
1818
# via pytest
19-
nox==2023.4.22
19+
nox==2024.3.2
2020
# via -r requirements/requirements-test.in
21-
packaging==23.2
21+
packaging==24.0
2222
# via
2323
# nox
2424
# pytest
25-
platformdirs==3.11.0
25+
platformdirs==4.2.0
2626
# via virtualenv
27-
pluggy==1.3.0
27+
pluggy==1.4.0
2828
# via pytest
29-
pytest==7.4.3
29+
pytest==8.1.1
3030
# via
3131
# -r requirements/requirements-test.in
3232
# pytest-randomly
3333
pytest-randomly==3.15.0
3434
# via -r requirements/requirements-test.in
35-
virtualenv==20.24.6
35+
virtualenv==20.25.1
3636
# via nox

0 commit comments

Comments
 (0)