]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix engine connect example in migration guide (#10757)
authorIuri de Silvio <iurisilvio@gmail.com>
Sun, 17 Dec 2023 17:39:28 +0000 (18:39 +0100)
committerGitHub <noreply@github.com>
Sun, 17 Dec 2023 17:39:28 +0000 (18:39 +0100)
You can't fetchall after connection was closed.

doc/build/changelog/migration_20.rst

index fe86338ee21295446c67dbbce19b524dfbc68018..794d1d80fb1328f99a433b6ce39f211094bf8d43 100644 (file)
@@ -296,7 +296,7 @@ as a bonus our program is much clearer::
         # select() now accepts column / table expressions positionally
         result = connection.execute(select(foo.c.id))
 
-    print(result.fetchall())
+        print(result.fetchall())
 
 The goal of "2.0 deprecations mode" is that a program which runs with no
 :class:`_exc.RemovedIn20Warning` warnings with "2.0 deprecations mode" turned