From 34f82c127ada35274a4ed93ace745f6ea9ab09a5 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 25 Oct 2022 08:42:42 +0200 Subject: [PATCH 1/3] Bump to Python 3.11 on CI --- .github/workflows/build.yml | 6 +++--- binder/environment.yml | 2 +- pyproject.toml | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b3dc0a5d..0f652d4a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 with: - python_version: "3.10" + python_version: "3.11" - name: Install the package run: | @@ -89,11 +89,11 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: ['3.7', '3.10'] + python: ['3.7', '3.11'] include: - python: '3.7' dist: 'notebook*.tar.gz' - - python: '3.10' + - python: '3.11' dist: 'notebook*.whl' - os: windows-latest py_cmd: python diff --git a/binder/environment.yml b/binder/environment.yml index e6af5214f..a98d310f2 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -9,5 +9,5 @@ dependencies: - matplotlib - numpy - nodejs -- python >=3.9,<3.10 +- python >=3.10,<3.11 - xeus-python diff --git a/pyproject.toml b/pyproject.toml index f90112b8a..752e490d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] dependencies = [ "jupyter_server>=1.16.0,<2", From 0855cb77f7689dda4c72b317078d333bce558b18 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Thu, 27 Oct 2022 07:56:24 +0000 Subject: [PATCH 2/3] Use 3.11 on gitpod --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 86f6728f1..9dc5a05df 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -22,7 +22,7 @@ tasks: micromamba activate EOT source /workspace/bin/activate-env.sh - micromamba install -n base -y -c conda-forge python=3.10 nodejs=14 yarn + micromamba install -n base -y -c conda-forge python=3.11 nodejs=14 yarn python -m pip install -e ".[dev,test]" && jlpm && jlpm run build && jlpm develop gp sync-done setup command: | From 0ce4fe50cbb19cf532fc5f27922ddbac19e46a8d Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Wed, 16 Nov 2022 08:07:44 +0000 Subject: [PATCH 3/3] Update to using `files` --- tests/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3ba49862a..878e5d809 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ import json import os import os.path as osp import shutil -from importlib.resources import path +from importlib.resources import files from os.path import join as pjoin import pytest @@ -51,7 +51,7 @@ def make_notebook_app( ) # Copy the template files. - for html_path in glob.glob(f"{path('notebook', 'templates')}/*.html"): + for html_path in glob.glob(str(files("notebook.templates").joinpath("*.html"))): shutil.copy(html_path, jp_template_dir) # Create the index file. @@ -88,7 +88,7 @@ def make_notebook_app( ) # Copy the schema files. - test_data = str(path("jupyterlab_server", "test_data")) + test_data = str(files("jupyterlab_server.test_data").joinpath("")) src = pjoin(test_data, "schemas", "@jupyterlab") dst = pjoin(str(schemas_dir), "@jupyterlab") if os.path.exists(dst):