From: Mike Bayer Date: Tue, 16 Aug 2011 22:31:49 +0000 (-0400) Subject: - Extra keyword arguments to the base Float X-Git-Tag: rel_0_7_3~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f74264276baf3064901498c1b070df5e0c4db6fc;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Extra keyword arguments to the base Float type beyond "precision" and "asdecimal" are ignored; added a deprecation warning here and additional docs, related to [ticket:2258] --- diff --git a/CHANGES b/CHANGES index 5c1b2425cb..54e0a27fdd 100644 --- a/CHANGES +++ b/CHANGES @@ -49,6 +49,12 @@ CHANGES there's no usual need to subclass pools. [ticket:2254] +- types + - Extra keyword arguments to the base Float + type beyond "precision" and "asdecimal" are ignored; + added a deprecation warning here and additional + docs, related to [ticket:2258] + - sqlite - Ensured that the same ValueError is raised for illegal date/time/datetime string parsed from diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 5f059e1575..5c9ea99c3b 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -1395,9 +1395,17 @@ class Float(Numeric): defaults to ``False``. Note that setting this flag to ``True`` results in floating point conversion. + :param \**kwargs: deprecated. Additional arguments here are ignored + by the default :class:`.Float` type. For database specific + floats that support additional arguments, see that dialect's + documentation for details, such as :class:`sqlalchemy.dialects.mysql.FLOAT`. + """ self.precision = precision self.asdecimal = asdecimal + if kwargs: + util.warn_deprecated("Additional keyword arguments " + "passed to Float ignored.") def result_processor(self, dialect, coltype): if self.asdecimal: