summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES26
-rw-r--r--lib/sqlalchemy/databases/sqlite.py7
2 files changed, 22 insertions, 11 deletions
diff --git a/CHANGES b/CHANGES
index e2947f0f3..ba20c25a3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -38,17 +38,21 @@ CHANGES
query.join(Company.employees.of_type(Engineer)).
filter(Engineer.name=='foo')
- - Preventive code against a potential lost-reference bug in
- flush().
-
- - Expressions used in filter(), filter_by() and others, when
- they make usage of a clause generated from a relation
- using the identity of a child object
- (e.g. filter(Parent.child==<somechild>)), evaluate the
- actual primary key value of <somechild> at execution time
- so that the autoflush step of the Query can complete,
- thereby populating the PK value of <somechild> in the case
- that <somechild> was pending.
+ - Preventive code against a potential lost-reference bug in
+ flush().
+
+ - Expressions used in filter(), filter_by() and others, when
+ they make usage of a clause generated from a relation using
+ the identity of a child object (e.g.,
+ filter(Parent.child==<somechild>)), evaluate the actual
+ primary key value of <somechild> at execution time so that
+ the autoflush step of the Query can complete, thereby
+ populating the PK value of <somechild> in the case that
+ <somechild> was pending.
+
+- dialects
+ - Invalid SQLite connection URLs now raise an error.
+
0.4.3
------
diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py
index 984b356e0..88e4f74cf 100644
--- a/lib/sqlalchemy/databases/sqlite.py
+++ b/lib/sqlalchemy/databases/sqlite.py
@@ -225,6 +225,13 @@ class SQLiteDialect(default.DefaultDialect):
return self.dbapi.sqlite_version_info
def create_connect_args(self, url):
+ if url.username or url.password or url.host or url.port:
+ raise exceptions.ArgumentError(
+ "Invalid SQLite URL: %s\n"
+ "Valid SQLite URL forms are:\n"
+ " sqlite:///:memory: (or, sqlite://)\n"
+ " sqlite:///relative/path/to/file.db\n"
+ " sqlite:////absolute/path/to/file.db" % (url,))
filename = url.database or ':memory:'
opts = url.query.copy()