Require importlib_resources for testing on Python < 3.10 (#7016)

* importlib_resources 5.0 is python < 3.10

* Add python matrix to test workflow

* Ignore datetime.utcnow deprecation from Python 3.12

* lint: remove type ignore

* More datetime.utc deprecation
pull/7031/head
Ben Greiner 3 years ago committed by GitHub
parent 76db867671
commit e2eb8f2a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,11 @@ jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# used by the jupyterlab/maintainer-tools base-setup action
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v3

@ -31,7 +31,6 @@ classifiers = [
]
dependencies = [
"jupyter_server>=2.4.0,<3",
"importlib-resources>=5.0;python_version<\"3.9\"",
"jupyterlab>=4.0.2,<5",
"jupyterlab_server>=2.22.1,<3",
"notebook_shim>=0.2,<0.3",
@ -59,6 +58,7 @@ test = [
"ipykernel",
"jupyter_server[test]>=2.4.0,<3",
"jupyterlab_server[test]>=2.22.1,<3",
"importlib-resources>=5.0;python_version<\"3.10\"",
]
docs = [
"myst_parser",
@ -203,7 +203,8 @@ filterwarnings = [
"error",
"ignore:There is no current event loop:DeprecationWarning",
"ignore:make_current is deprecated; start the event loop first",
"ignore:clear_current is deprecated"
"ignore:clear_current is deprecated",
"ignore:datetime.utc.* is deprecated",
]
[tool.coverage.report]

@ -4,11 +4,12 @@ import os
import os.path as osp
import pathlib
import shutil
import sys
try:
if sys.version_info < (3, 10):
from importlib_resources import files
else:
from importlib.resources import files
except ImportError:
from importlib_resources import files # type:ignore
import pytest

Loading…
Cancel
Save