diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-03-21 11:49:43 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-03-21 11:49:43 -0400 |
commit | 39c465ecf3f45bbebb37c5d5ed7e1a0fccf5641c (patch) | |
tree | e4fd4678b3b8bd7866248614300a7ee04dff4562 /lib/sqlalchemy | |
parent | d4a95ba974ac16cc3281782ffaf7f276525c3268 (diff) | |
download | sqlalchemy-39c465ecf3f45bbebb37c5d5ed7e1a0fccf5641c.tar.gz |
- Restored the "catchall" constructor on the base
TypeEngine class, with a deprecation warning.
This so that code which does something like
Integer(11) still succeeds.
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/__init__.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/types.py | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index 2b4cfde0f..0cab28da1 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -116,6 +116,6 @@ from sqlalchemy.engine import create_engine, engine_from_config __all__ = sorted(name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj))) -__version__ = '0.7b3' +__version__ = '0.7b4' del inspect, sys diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 100a20c6e..de74b2031 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -241,10 +241,11 @@ class TypeEngine(AbstractType): encode('ascii', 'backslashreplace') # end Py2K - def __init__(self): - # supports getargspec of the __init__ method - # used by generic __repr__ - pass + def __init__(self, *args, **kwargs): + """Support implementations that were passing arguments""" + if args or kwargs: + util.warn_deprecated("Passing arguments to type object " + "constructor %s is deprecated" % self.__class__) def __repr__(self): return "%s(%s)" % ( |