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 Python 3.8-3.12 #2008

Merged
merged 14 commits into from
Jul 15, 2023
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.10"]
python-version: ["3.8", "3.11"]
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand All @@ -24,7 +24,7 @@ jobs:
sudo apt-get install texlive-plain-generic inkscape texlive-xetex latexmk enchant-2

# pandoc is not up to date in the ubuntu repos, so we install directly
wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb

- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
strategy:
matrix:
os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.10"]
python-version: ["3.8", "3.11"]
include:
- os: "windows-latest"
python-version: "3.8"
- os: "ubuntu-20.04"
python-version: "3.9"
- os: "ubuntu-20.04"
python-version: "3.10"
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,6 +56,15 @@ jobs:

- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

python312:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "3.12"
- run: hatch run test:test

coverage:
runs-on: ubuntu-latest
needs:
Expand Down
3 changes: 3 additions & 0 deletions nbconvert/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ def copy_files_to(self, copy_filenames, dest="."):
files = glob.glob(os.path.join(files_path, pattern))
assert files
for match in files:
# Avoid copying the Julia file unless it is explicitly asked for.
if 'jl' in match and "jl" not in pattern:
continue
shutil.copyfile(match, os.path.join(dest, os.path.basename(match)))

def _get_files_path(self):
Expand Down
2 changes: 2 additions & 0 deletions nbconvert/tests/test_nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import nbformat
import pytest
from flaky import flaky # type:ignore
from traitlets.tests.utils import check_help_all_output

from nbconvert.exporters import HTMLExporter
Expand Down Expand Up @@ -148,6 +149,7 @@ def test_filename_spaces(self):
)
assert os.path.isfile("notebook with spaces.pdf")

@flaky
@pytest.mark.network
@pytest.mark.skipif(not PYPPETEER_INSTALLED, reason="Pyppeeter not installed")
def test_webpdf_with_chromium(self):
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling >=0.25"]
requires = ["hatchling >=1.5"]
build-backend = "hatchling.build"

[project]
Expand All @@ -18,7 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3",
]
urls = {Homepage = "https://jupyter.org"}
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
"beautifulsoup4",
"bleach!=5.0.0",
Expand Down Expand Up @@ -65,6 +65,7 @@ test = [
"ipykernel",
"ipywidgets>=7",
"pre-commit",
"flaky"
]
serve = ["tornado>=6.1"]
docs = [
Expand Down Expand Up @@ -163,6 +164,8 @@ filterwarnings = [
"ignore:unclosed event loop:ResourceWarning",
# From jupyter_core
"module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
# From dateutil
"ignore:.*Use timezone-aware objects to represent datetimes in UTC:DeprecationWarning",
]

[tool.coverage.report]
Expand Down