Show More
@@ -9,6 +9,7 b' import datetime' | |||||
9 | from pathlib import Path |
|
9 | from pathlib import Path | |
10 | import re |
|
10 | import re | |
11 | import sqlite3 |
|
11 | import sqlite3 | |
|
12 | import sys | |||
12 | import threading |
|
13 | import threading | |
13 |
|
14 | |||
14 | from traitlets.config.configurable import LoggingConfigurable |
|
15 | from traitlets.config.configurable import LoggingConfigurable | |
@@ -29,6 +30,14 b' from traitlets import (' | |||||
29 | observe, |
|
30 | observe, | |
30 | ) |
|
31 | ) | |
31 |
|
32 | |||
|
33 | ||||
|
34 | if sys.version_info >= (3, 12): | |||
|
35 | ||||
|
36 | def _adapt_datetime(val): | |||
|
37 | return val.isoformat(" ") | |||
|
38 | ||||
|
39 | sqlite3.register_adapter(datetime.datetime, _adapt_datetime) | |||
|
40 | ||||
32 | #----------------------------------------------------------------------------- |
|
41 | #----------------------------------------------------------------------------- | |
33 | # Classes and functions |
|
42 | # Classes and functions | |
34 | #----------------------------------------------------------------------------- |
|
43 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now