diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-01-11 01:28:43 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-01-11 01:28:43 +0000 |
commit | 8dd825b413276025b0f27d2ed7e5b93ba81a5b9c (patch) | |
tree | 4a13aec5f61d1a934a3b4a527e9bdaf7f5cfc9ce /lib/sqlalchemy/databases/oracle.py | |
parent | 3e9df22546cb4c7af0ece290f4f57a377516f142 (diff) | |
download | sqlalchemy-8dd825b413276025b0f27d2ed7e5b93ba81a5b9c.tar.gz |
- 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.
Diffstat (limited to 'lib/sqlalchemy/databases/oracle.py')
-rw-r--r-- | lib/sqlalchemy/databases/oracle.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/sqlalchemy/databases/oracle.py b/lib/sqlalchemy/databases/oracle.py index 394aba178..c7ab13441 100644 --- a/lib/sqlalchemy/databases/oracle.py +++ b/lib/sqlalchemy/databases/oracle.py @@ -5,7 +5,7 @@ # the MIT License: http://www.opensource.org/licenses/mit-license.php -import re, warnings, random +import datetime, random, re from sqlalchemy import util, sql, schema, exceptions, logging from sqlalchemy.engine import default, base @@ -13,8 +13,6 @@ from sqlalchemy.sql import compiler, visitors from sqlalchemy.sql import operators as sql_operators from sqlalchemy import types as sqltypes -import datetime - class OracleNumeric(sqltypes.Numeric): def get_col_spec(self): @@ -501,7 +499,8 @@ class OracleDialect(default.DefaultDialect): try: coltype = ischema_names[coltype] except KeyError: - warnings.warn(RuntimeWarning("Did not recognize type '%s' of column '%s'" % (coltype, colname))) + util.warn("Did not recognize type '%s' of column '%s'" % + (coltype, colname)) coltype = sqltypes.NULLTYPE colargs = [] @@ -551,7 +550,10 @@ class OracleDialect(default.DefaultDialect): fks[cons_name] = fk if remote_table is None: # ticket 363 - warnings.warn("Got 'None' querying 'table_name' from all_cons_columns%(dblink)s - does the user have proper rights to the table?" % {'dblink':dblink}) + util.warn( + ("Got 'None' querying 'table_name' from " + "all_cons_columns%(dblink)s - does the user have " + "proper rights to the table?") % {'dblink':dblink}) continue refspec = ".".join([remote_table, remote_column]) schema.Table(remote_table, table.metadata, autoload=True, autoload_with=connection, owner=remote_owner) |