File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ jobs:
19
19
fail-fast : false
20
20
matrix :
21
21
os : [ubuntu-latest, windows-latest, macos-latest]
22
- python-version : ["3.7 ", "3.11"]
22
+ python-version : ["3.8 ", "3.11"]
23
23
include :
24
24
- os : windows-latest
25
25
python-version : " 3.9"
26
26
- os : ubuntu-latest
27
27
python-version : " pypy-3.8"
28
28
- os : ubuntu-latest
29
- python-version : " 3.10 "
29
+ python-version : " 3.12.0-beta.1 "
30
30
- os : macos-latest
31
- python-version : " 3.8 "
31
+ python-version : " 3.10 "
32
32
steps :
33
33
- uses : actions/checkout@v3
34
34
- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Original file line number Diff line number Diff line change 14
14
15
15
try :
16
16
import sqlite3
17
+
18
+ # Use adapters recommended by Python 3.12 stdlib docs.
19
+ # https://docs.python.org/3.12/library/sqlite3.html#default-adapters-and-converters-deprecated
20
+ def adapt_datetime_iso (val ):
21
+ """Adapt datetime.datetime to timezone-naive ISO 8601 date."""
22
+ return val .isoformat ()
23
+
24
+ def convert_datetime (val ):
25
+ """Convert ISO 8601 datetime to datetime.datetime object."""
26
+ return datetime .fromisoformat (val .decode ())
27
+
28
+ sqlite3 .register_adapter (datetime , adapt_datetime_iso )
29
+ sqlite3 .register_converter ("datetime" , convert_datetime )
17
30
except ImportError :
18
31
try :
19
32
from pysqlite2 import dbapi2 as sqlite3 # type:ignore[no-redef]
Original file line number Diff line number Diff line change @@ -15,19 +15,17 @@ classifiers = [
15
15
" License :: OSI Approved :: BSD License" ,
16
16
" Programming Language :: Python" ,
17
17
" Programming Language :: Python :: 3" ,
18
- " Programming Language :: Python :: 3.7" ,
19
18
" Programming Language :: Python :: 3.8" ,
20
19
" Programming Language :: Python :: 3.9" ,
21
20
" Programming Language :: Python :: 3.10" ,
22
21
" Programming Language :: Python :: 3.11"
23
22
]
24
- requires-python = " >=3.7 "
23
+ requires-python = " >=3.8 "
25
24
dependencies = [
26
25
" fastjsonschema" ,
27
26
" jsonschema>=2.6" ,
28
27
" jupyter_core" ,
29
- " traitlets>=5.1" ,
30
- " importlib-metadata>=3.6;python_version<\" 3.8\" " ,
28
+ " traitlets>=5.1"
31
29
]
32
30
33
31
[[project .authors ]]
@@ -110,6 +108,8 @@ filterwarnings = [
110
108
" error" ,
111
109
" ignore:Using or importing the ABCs from 'collections':DeprecationWarning:jsonschema" ,
112
110
" module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning" ,
111
+ # ignore pytest warnings.
112
+ " ignore:::_pytest" ,
113
113
]
114
114
115
115
[tool .coverage .report ]
You can’t perform that action at this time.
0 commit comments