From 7fc08fe89af9760750899346cf81bd74e0d9150f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 13 Aug 2014 19:45:34 -0400 Subject: - The ``info`` parameter has been added to the constructor for :class:`.SynonymProperty` and :class:`.ComparableProperty`. - The ``info`` parameter has been added as a constructor argument to all schema constructs including :class:`.MetaData`, :class:`.Index`, :class:`.ForeignKey`, :class:`.ForeignKeyConstraint`, :class:`.UniqueConstraint`, :class:`.PrimaryKeyConstraint`, :class:`.CheckConstraint`. fixes #2963 --- lib/sqlalchemy/util/langhelpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/util') diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 8d6fe5a28..828e8f1f3 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -435,7 +435,7 @@ def unbound_method_to_callable(func_or_cls): return func_or_cls -def generic_repr(obj, additional_kw=(), to_inspect=None): +def generic_repr(obj, additional_kw=(), to_inspect=None, omit_kwarg=()): """Produce a __repr__() based on direct association of the __init__() specification vs. same-named attributes present. @@ -484,6 +484,8 @@ def generic_repr(obj, additional_kw=(), to_inspect=None): output.extend([repr(val) for val in getattr(obj, vargs)]) for arg, defval in kw_args.items(): + if arg in omit_kwarg: + continue try: val = getattr(obj, arg, missing) if val is not missing and val != defval: -- cgit v1.2.1