summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2012-11-03 12:45:52 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2012-11-03 12:45:52 +0100
commitc67a742e01ee7084ffd6ec0d531b96e343e6a5a5 (patch)
tree6b03ac07bb5aa47af1d6c3bbf521561c7b591828 /sqlparse
parent0a877102119d4738369c1464107123f3f9e6978d (diff)
downloadsqlparse-c67a742e01ee7084ffd6ec0d531b96e343e6a5a5.tar.gz
Move SQLParseError to proper location and start deprecation of sqlparse.SQLParseError.
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/__init__.py7
-rw-r--r--sqlparse/exceptions.py11
-rw-r--r--sqlparse/formatter.py2
3 files changed, 15 insertions, 5 deletions
diff --git a/sqlparse/__init__.py b/sqlparse/__init__.py
index a380e33..230fd0d 100644
--- a/sqlparse/__init__.py
+++ b/sqlparse/__init__.py
@@ -9,15 +9,14 @@
__version__ = '0.1.4'
-class SQLParseError(Exception):
- """Base class for exceptions in this module."""
-
-
# Setup namespace
from sqlparse import engine
from sqlparse import filters
from sqlparse import formatter
+# Deprecated in 0.1.5. Will be removed in 0.2.0
+from sqlparse.exceptions import SQLParseError
+
def parse(sql):
"""Parse sql and return a list of statements.
diff --git a/sqlparse/exceptions.py b/sqlparse/exceptions.py
new file mode 100644
index 0000000..2a8e571
--- /dev/null
+++ b/sqlparse/exceptions.py
@@ -0,0 +1,11 @@
+# Copyright (C) 2012 Andi Albrecht, albrecht.andi@gmail.com
+#
+# This module is part of python-sqlparse and is released under
+# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
+
+"""Exceptions used in this package."""
+
+class SQLParseError(Exception):
+ """Base class for exceptions in this module."""
+
+
diff --git a/sqlparse/formatter.py b/sqlparse/formatter.py
index 5be6652..8761c16 100644
--- a/sqlparse/formatter.py
+++ b/sqlparse/formatter.py
@@ -5,8 +5,8 @@
"""SQL formatter"""
-from sqlparse import SQLParseError
from sqlparse import filters
+from sqlparse.exceptions import SQLParseError
def validate_options(options):