From 0b393b4469045ff4b9763767ce2203f927291715 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 13 Mar 2012 21:14:39 -0700 Subject: [PATCH] revert this, the instrumentation here is conditional --- doc/build/core/types.rst | 2 +- lib/sqlalchemy/sql/visitors.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/build/core/types.rst b/doc/build/core/types.rst index 064489c9fd..b6144a4384 100644 --- a/doc/build/core/types.rst +++ b/doc/build/core/types.rst @@ -284,7 +284,7 @@ Augmenting Existing Types The :class:`.TypeDecorator` allows the creation of custom types which add bind-parameter and result-processing behavior to an existing -type object. It is used when additional in-Python marshalling of data +type object. It is used when additional in-Python marshaling of data to and from the database is required. .. autoclass:: TypeDecorator diff --git a/lib/sqlalchemy/sql/visitors.py b/lib/sqlalchemy/sql/visitors.py index 59ad290770..5354fbcbb4 100644 --- a/lib/sqlalchemy/sql/visitors.py +++ b/lib/sqlalchemy/sql/visitors.py @@ -52,7 +52,7 @@ class VisitableType(type): super(VisitableType, cls).__init__(clsname, bases, clsdict) return - cls._compiler_dispatch = _generate_dispatch(cls) + _generate_dispatch(cls) super(VisitableType, cls).__init__(clsname, bases, clsdict) @@ -81,7 +81,7 @@ def _generate_dispatch(cls): """Look for an attribute named "visit_" + self.__visit_name__ on the visitor, and call it with the same kw params. """ - return _compiler_dispatch + cls._compiler_dispatch = _compiler_dispatch class Visitable(object): """Base class for visitable objects, applies the -- 2.47.2