]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Invalid SQLite connection URLs now raise an error.
authorJason Kirtland <jek@discorporate.us>
Sat, 23 Feb 2008 21:59:46 +0000 (21:59 +0000)
committerJason Kirtland <jek@discorporate.us>
Sat, 23 Feb 2008 21:59:46 +0000 (21:59 +0000)
CHANGES
lib/sqlalchemy/databases/sqlite.py

diff --git a/CHANGES b/CHANGES
index e2947f0f30eb6707f333102813d01b0f1f608ac9..ba20c25a363fd9ce5b0465eada38db1b3d767523 100644 (file)
--- 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
 ------
index 984b356e02b6f26e50847228bca7ac38b40199c2..88e4f74cf078330207d94c081d1988b656b467aa 100644 (file)
@@ -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()