From 8dd825b413276025b0f27d2ed7e5b93ba81a5b9c Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Fri, 11 Jan 2008 01:28:43 +0000 Subject: - Warnings are now issued as SAWarning instead of RuntimeWarning; util.warn() wraps this up. - SADeprecationWarning has moved to exceptions. An alias remains in logging until 0.5. --- lib/sqlalchemy/sql/expression.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/sql/expression.py') diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index b2eaa4221..0bf9bea10 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -25,9 +25,7 @@ classes usually have few or no public methods and are less guaranteed to stay the same in future releases. """ -import re -import datetime -import warnings +import datetime, re from itertools import chain from sqlalchemy import util, exceptions from sqlalchemy.sql import operators, visitors @@ -1464,7 +1462,9 @@ class ColumnCollection(util.OrderedProperties): existing = self[key] if not existing.shares_lineage(value): table = getattr(existing, 'table', None) and existing.table.description - warnings.warn(RuntimeWarning("Column %r on table %r being replaced by another column with the same key. Consider use_labels for select() statements." % (key, table))) + util.warn(("Column %r on table %r being replaced by another " + "column with the same key. Consider use_labels " + "for select() statements.") % (key, table)) util.OrderedProperties.__setitem__(self, key, value) def remove(self, column): -- cgit v1.2.1