mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
* Bump cherrypy from 18.8.0 to 18.9.0 Bumps [cherrypy](https://github.com/cherrypy/cherrypy) from 18.8.0 to 18.9.0. - [Changelog](https://github.com/cherrypy/cherrypy/blob/main/CHANGES.rst) - [Commits](https://github.com/cherrypy/cherrypy/compare/v18.8.0...v18.9.0) --- updated-dependencies: - dependency-name: cherrypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update cherrypy==18.9.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
74 lines
2.1 KiB
Python
74 lines
2.1 KiB
Python
"""adodbapi - A python DB API 2.0 (PEP 249) interface to Microsoft ADO
|
|
|
|
Copyright (C) 2002 Henrik Ekelund, version 2.1 by Vernon Cole
|
|
* http://sourceforge.net/projects/adodbapi
|
|
"""
|
|
import sys
|
|
import time
|
|
|
|
from .adodbapi import Connection, Cursor, __version__, connect, dateconverter
|
|
from .apibase import (
|
|
BINARY,
|
|
DATETIME,
|
|
NUMBER,
|
|
ROWID,
|
|
STRING,
|
|
DatabaseError,
|
|
DataError,
|
|
Error,
|
|
FetchFailedError,
|
|
IntegrityError,
|
|
InterfaceError,
|
|
InternalError,
|
|
NotSupportedError,
|
|
OperationalError,
|
|
ProgrammingError,
|
|
Warning,
|
|
apilevel,
|
|
paramstyle,
|
|
threadsafety,
|
|
)
|
|
|
|
|
|
def Binary(aString):
|
|
"""This function constructs an object capable of holding a binary (long) string value."""
|
|
return bytes(aString)
|
|
|
|
|
|
def Date(year, month, day):
|
|
"This function constructs an object holding a date value."
|
|
return dateconverter.Date(year, month, day)
|
|
|
|
|
|
def Time(hour, minute, second):
|
|
"This function constructs an object holding a time value."
|
|
return dateconverter.Time(hour, minute, second)
|
|
|
|
|
|
def Timestamp(year, month, day, hour, minute, second):
|
|
"This function constructs an object holding a time stamp value."
|
|
return dateconverter.Timestamp(year, month, day, hour, minute, second)
|
|
|
|
|
|
def DateFromTicks(ticks):
|
|
"""This function constructs an object holding a date value from the given ticks value
|
|
(number of seconds since the epoch; see the documentation of the standard Python time module for details).
|
|
"""
|
|
return Date(*time.gmtime(ticks)[:3])
|
|
|
|
|
|
def TimeFromTicks(ticks):
|
|
"""This function constructs an object holding a time value from the given ticks value
|
|
(number of seconds since the epoch; see the documentation of the standard Python time module for details).
|
|
"""
|
|
return Time(*time.gmtime(ticks)[3:6])
|
|
|
|
|
|
def TimestampFromTicks(ticks):
|
|
"""This function constructs an object holding a time stamp value from the given
|
|
ticks value (number of seconds since the epoch;
|
|
see the documentation of the standard Python time module for details)."""
|
|
return Timestamp(*time.gmtime(ticks)[:6])
|
|
|
|
|
|
version = "adodbapi v" + __version__
|