]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Extra keyword arguments to the base Float
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 16 Aug 2011 22:31:49 +0000 (18:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 16 Aug 2011 22:31:49 +0000 (18:31 -0400)
    type beyond "precision" and "asdecimal" are ignored;
    added a deprecation warning here and additional
    docs, related to [ticket:2258]

CHANGES
lib/sqlalchemy/types.py

diff --git a/CHANGES b/CHANGES
index 5c1b2425cbb17fd83224e276b074c5a5fb51aae8..54e0a27fdde46f915bb32333fa93863e28d17e75 100644 (file)
--- 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
index 5f059e15750f8075dc5180dc5256c856ae725892..5c9ea99c3b98ea8c85bb391578b488d2153b5de4 100644 (file)
@@ -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: