We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3796884 commit 4b04bdfCopy full SHA for 4b04bdf
2 files changed
Lib/sqlite3/dbapi2.py
@@ -20,9 +20,9 @@
20
# misrepresented as being the original software.
21
# 3. This notice may not be removed or altered from any source distribution.
22
23
-import datetime
24
import time
25
import collections.abc
+import datetime
26
27
from _sqlite3 import *
28
@@ -37,12 +37,15 @@
37
Timestamp = datetime.datetime
38
39
def DateFromTicks(ticks):
40
+ import time # Lazy, to improve import time
41
return Date(*time.localtime(ticks)[:3])
42
43
def TimeFromTicks(ticks):
44
45
return Time(*time.localtime(ticks)[3:6])
46
47
def TimestampFromTicks(ticks):
48
49
return Timestamp(*time.localtime(ticks)[:6])
50
51
Misc/NEWS.d/next/Library/2025-01-21-14-51-44.gh-issue-118761.Z0F-d5.rst
@@ -0,0 +1 @@
1
+Halve the import time of :mod:`sqlite3`.
0 commit comments