Skip to content

Commit

Permalink
Adding initial 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Oct 30, 2023
1 parent 9a47c59 commit 0ffc38d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
25 changes: 14 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tox]
skipsdist = true
envlist = py{37,38,39,310,311}, flake8, dist, manifest, docs, binder
envlist = py{38,39,310,311,312}, flake8, dist, manifest, docs, binder

[gh-actions]
python =
3.7: py37
3.8: py38, dist
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312, dist

# Linters
[testenv:flake8]
Expand Down Expand Up @@ -47,6 +47,7 @@ commands = python -c "import glob; import papermill as pm; [pm.execute_notebook(
[testenv:dist]
skip_install = true
# Have to use /bin/bash or the `*` will cause that argument to get quoted by the tox command line...
allowlist_externals = /bin/bash
commands =
python setup.py sdist --dist-dir={distdir} bdist_wheel --dist-dir={distdir}
/bin/bash -c 'python -m pip install -U --force-reinstall {distdir}/papermill*.whl'
Expand All @@ -55,7 +56,7 @@ commands =
# Black
[testenv:black]
description = apply black linter with desired rules
basepython = python3.8
basepython = python3.12
deps =
black
commands = black -S -l 100 .
Expand All @@ -68,16 +69,18 @@ setenv =
AWS_SECRET_ACCESS_KEY=foobar_secret
passenv = *
basepython =
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
flake8: python3.8
manifest: python3.8
dist: python3.8
docs: python3.8
binder: python3.8
black: python3.8
py312: python3.12
flake8: python3.12
manifest: python3.12
dist: python3.12
docs: python3.12
binder: python3.12
black: python3.12
deps = .[dev]
# Python 3.12 breaks default pip/setuptools versions ... force an upgrade of these before anything else
install_command = /bin/bash ./tox_py_installer {opts} {packages}
commands = pytest -v --maxfail=2 --cov=papermill -W always {posargs}
5 changes: 5 additions & 0 deletions tox_py_installer
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
python -m ensurepip --upgrade
python -m pip install --upgrade setuptools
# python -m pip install {opts} {packages}
python -m pip install $1 $2

0 comments on commit 0ffc38d

Please sign in to comment.