Py2 SQLAlchemy: Move some TypeEngine functions from subclasses to TypeEngine (#724)

This commit is contained in:
Tom Manderson
2016-12-14 09:38:55 +10:00
committed by Guido van Rossum
parent 6887edebda
commit 5dbc7d1db6
2 changed files with 10 additions and 8 deletions

View File

@@ -8,12 +8,6 @@ class String(TypeEngine, Concatenable):
convert_unicode=False,
unicode_error=None,
_warn_on_bytestring=False): ...
def literal_processor(self, dialect): ...
def bind_processor(self, dialect): ...
def result_processor(self, dialect, coltype): ...
@property
def python_type(self): ...
def get_dbapi_type(self, dbapi): ...
class Text(String): ...
class Unicode(String): ...
@@ -23,7 +17,8 @@ class SmallInteger(Integer): ...
class BigInteger(Integer): ...
class Numeric(TypeEngine, _DateAffinity): ...
class Float(Numeric): ...
class DateTime(TypeEngine, _DateAffinity): ...
class DateTime(TypeEngine, _DateAffinity):
def __init__(self, timezone=None): ...
class Date(TypeEngine, _DateAffinity): ...
class Time(TypeEngine, _DateAffinity): ...
class _Binary(TypeEngine): ...

View File

@@ -1,7 +1,14 @@
from .. import util
from .visitors import Visitable, VisitableType
class TypeEngine(Visitable): ...
class TypeEngine(Visitable):
@property
def python_type(self): ...
def get_dbapi_type(self, dbapi): ...
def literal_processor(self, dialect): ...
def bind_processor(self, dialect): ...
def result_processor(self, dialect, coltype): ...
class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ...
# TODO: class UserDefinedType(util.with_metaclass(VisitableCheckKWArg, TypeEngine)):
class UserDefinedType(VisitableCheckKWArg, TypeEngine): ...