Hello community,
here is the log from the commit of package python3-SQLAlchemy for
openSUSE:Factory checked in at 2016-02-17 10:26:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-SQLAlchemy (Old)
and /work/SRC/openSUSE:Factory/.python3-SQLAlchemy.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-SQLAlchemy"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-SQLAlchemy/python3-SQLAlchemy.changes
2016-01-08 15:23:48.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-SQLAlchemy.new/python3-SQLAlchemy.changes
2016-02-17 12:23:26.000000000 +0100
@@ -1,0 +2,91 @@
+Wed Feb 17 03:59:51 UTC 2016 - [email protected]
+
+- specfile:
+ * removed patch fix_joins_and_union_for_sqlite_3.10.0.patch, included
upstream
+
+- update to version 1.0.12:
+ * orm
+ + [orm] [bug] Fixed bug in Session.merge() where an object with a
+ composite primary key that has values for some but not all of the
+ PK fields would emit a SELECT statement leaking the internal
+ NEVER_SET symbol into the query, rather than detecting that this
+ object does not have a searchable primary key and no SELECT should
+ be emitted.
+ + [orm] [bug] Fixed regression since 0.9 where the 0.9 style
+ loader options system failed to accommodate for multiple
+ undefer_group() loader options in a single query. Multiple
+ undefer_group() options will now be taken into account even
+ against the same entity.
+ * engine
+ + [engine] [bug] [mysql] Revisiting #2696, first released in
+ 1.0.10, which attempts to work around Python 2’s lack of exception
+ context reporting by emitting a warning for an exception that was
+ interrupted by a second exception when attempting to roll back the
+ already-failed transaction; this issue continues to occur for
+ MySQL backends in conjunction with a savepoint that gets
+ unexpectedly lost, which then causes a “no such savepoint” error
+ when the rollback is attempted, obscuring what the original
+ condition was.
+ The approach has been generalized to the Core “safe reraise”
+ function which takes place across the ORM and Core in any place
+ that a transaction is being rolled back in response to an error
+ which occurred trying to commit, including the context managers
+ provided by Session and Connection, and taking place for
+ operations such as a failure on “RELEASE SAVEPOINT”. Previously,
+ the fix was only in place for a specific path within the ORM
+ flush/commit process; it now takes place for all transational
+ context managers as well.
+ * sql
+ + [sql] [bug] Fixed issue where the “literal_binds” flag was not
+ propagated for expression.insert(), expression.update() or
+ expression.delete() constructs when compiled to string SQL. Pull
+ request courtesy Tim Tate.
+ + [sql] [bug] Fixed issue where inadvertent use of the Python
+ __contains__ override with a column expression (e.g. by using 'x'
+ in col) would cause an endless loop in the case of an ARRAY type,
+ as Python defers this to __getitem__ access which never raises for
+ this type. Overall, all use of __contains__ now raises
+ NotImplementedError.
+ + [sql] [bug] Fixed bug in Table metadata construct which appeared
+ around the 0.9 series where adding columns to a Table that was
+ unpickled would fail to correctly establish the Column within the
+ ‘c’ collection, leading to issues in areas such as ORM
+ configuration. This could impact use cases such as extend_existing
+ and others.
+ * postgresql
+ + [postgresql] [bug] Fixed bug in expression.text() construct
+ where a double-colon expression would not escape properly,
+ e.g. some\:\:expr, as is most commonly required when rendering
+ Postgresql-style CAST expressions.
+ * mssql
+ + [mssql] [bug] Fixed the syntax of the extract() function when
+ used on MSSQL against a datetime value; the quotes around the
+ keyword are removed. Pull request courtesy Guillaume Doumenc.
+ + [mssql] [bug] [firebird] Fixed 1.0 regression where the eager
+ fetch of cursor.rowcount was no longer called for an UPDATE or
+ DELETE statement emitted via plain text or via the text()
+ construct, affecting those drivers that erase cursor.rowcount once
+ the cursor is closed such as SQL Server ODBC and Firebird drivers.
+ * oracle
+ + [oracle] [bug] [jython] Fixed a small issue in the Jython Oracle
+ compiler involving the rendering of “RETURNING” which allows this
+ currently unsupported/untested dialect to work rudimentally with
+ the 1.0 series. Pull request courtesy Carlos Rivas.
+ * misc
+ + [bug] [py3k] Fixed bug where some exception re-raise scenarios
+ would attach the exception to itself as the “cause”; while the
+ Python 3 interpreter is OK with this, it could cause endless loops
+ in iPython.
+
+-------------------------------------------------------------------
+Fri Feb 12 13:17:08 UTC 2016 - [email protected]
+
+- Add fix_joins_and_union_for_sqlite_3.10.0.patch to remove a
+ workaround for an earlier version of SQLite. The issue the
+ workaround was for was fixed in SQLite 3.10.0, which causes
+ problems for that version and later. This patch removes the
+ workaround when it is not needed.
+ This patch should be in the next release.
+ See: https://bitbucket.org/zzzeek/sqlalchemy/issues/3633/
+
+-------------------------------------------------------------------
Old:
----
SQLAlchemy-1.0.11.tar.gz
New:
----
SQLAlchemy-1.0.12.tar.gz
fix_joins_and_union_for_sqlite_3.10.0.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-SQLAlchemy.spec ++++++
--- /var/tmp/diff_new_pack.YxPF2I/_old 2016-02-17 12:23:28.000000000 +0100
+++ /var/tmp/diff_new_pack.YxPF2I/_new 2016-02-17 12:23:28.000000000 +0100
@@ -17,13 +17,15 @@
Name: python3-SQLAlchemy
-Version: 1.0.11
+Version: 1.0.12
Release: 0
Url: http://www.sqlalchemy.org
Summary: Database Abstraction Library
License: MIT
Group: Development/Languages/Python
Source:
http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM fix_joins_and_union_for_sqlite_3.10.0.patch - don't use
workaround for fixed SQLite 3.10.0 -
https://bitbucket.org/zzzeek/sqlalchemy/issues/3633/
+Patch0: fix_joins_and_union_for_sqlite_3.10.0.patch
BuildRequires: python3
BuildRequires: python3-2to3
BuildRequires: python3-devel
@@ -52,6 +54,7 @@
%prep
%setup -q -n SQLAlchemy-%{version}
+%patch0 -p1
rm -rf doc/build # Remove unnecessary scripts for building documentation
%build
++++++ SQLAlchemy-1.0.11.tar.gz -> SQLAlchemy-1.0.12.tar.gz ++++++
++++ 20599 lines of diff (skipped)
++++++ fix_joins_and_union_for_sqlite_3.10.0.patch ++++++
>From 9cc769ac40040986708a85567ca9a23eeb4ea051 Mon Sep 17 00:00:00 2001
From: Mike Bayer <[email protected]>
Date: Thu, 21 Jan 2016 15:21:33 -0500
Subject: [PATCH] - documenation updates to clarify specific SQLite versions
that have problems with right-nested joins and UNION column keys; references
#3633 references #3634. backport from 1.1 to 0.9 announcing 1.1 as where
these behaviors will be retired based on version-specific checks - fix
test_resultset so that it passes when SQLite 3.10.0 is present, references
#3633
(cherry picked from commit 89fa08792e98b9e31452aa3c949d9b909b10e7cd)
---
doc/build/changelog/migration_09.rst | 8 +++++++-
lib/sqlalchemy/dialects/sqlite/base.py | 16 ++++++++++++++--
test/sql/test_resultset.py | 30 ++++++++++++++++++++----------
3 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/doc/build/changelog/migration_09.rst
b/doc/build/changelog/migration_09.rst
index b07aed9..9138157 100644
--- a/doc/build/changelog/migration_09.rst
+++ b/doc/build/changelog/migration_09.rst
@@ -1125,7 +1125,7 @@ as INNER JOINs could always be flattened)::
SELECT a.*, b.*, c.* FROM a LEFT OUTER JOIN (b JOIN c ON b.id = c.id) ON
a.id
-This was due to the fact that SQLite, even today, cannot parse a statement of
the above format::
+This was due to the fact that SQLite up until version **3.7.16** cannot parse
a statement of the above format::
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
@@ -1248,6 +1248,12 @@ with the above queries rewritten as::
JOIN item ON item.id = order_item_1.item_id AND item.type IN (?)
) AS anon_1 ON "order".id = anon_1.order_item_1_order_id
+.. note::
+
+ As of SQLAlchemy 1.1, the workarounds present in this feature for SQLite
+ will automatically disable themselves when SQLite version **3.7.16**
+ or greater is detected, as SQLite has repaired support for right-nested
joins.
+
The :meth:`.Join.alias`, :func:`.aliased` and :func:`.with_polymorphic`
functions now
support a new argument, ``flat=True``, which is used to construct aliases of
joined-table
entities without embedding into a SELECT. This flag is not on by default, to
help with
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py
b/lib/sqlalchemy/dialects/sqlite/base.py
index e19047b..0774a76 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -358,8 +358,14 @@ Dotted Column Names
Using table or column names that explicitly have periods in them is
**not recommended**. While this is generally a bad idea for relational
databases in general, as the dot is a syntactically significant character,
-the SQLite driver has a bug which requires that SQLAlchemy filter out these
-dots in result sets.
+the SQLite driver up until version **3.10.0** of SQLite has a bug which
+requires that SQLAlchemy filter out these dots in result sets.
+
+.. note::
+
+ The following SQLite issue has been resolved as of version 3.10.0
+ of SQLite. SQLAlchemy as of **1.1** automatically disables its internal
+ workarounds based on detection of this version.
The bug, entirely outside of SQLAlchemy, can be illustrated thusly::
@@ -978,6 +984,9 @@ class
SQLiteExecutionContext(default.DefaultExecutionContext):
return self.execution_options.get("sqlite_raw_colnames", False)
def _translate_colname(self, colname):
+ # TODO: detect SQLite version 3.10.0 or greater;
+ # see [ticket:3633]
+
# adjust for dotted column names. SQLite
# in the case of UNION may store col names as
# "tablename.colname", or if using an attached database,
@@ -997,6 +1006,9 @@ class SQLiteDialect(default.DefaultDialect):
supports_empty_insert = False
supports_cast = True
supports_multivalues_insert = True
+
+ # TODO: detect version 3.7.16 or greater;
+ # see [ticket:3634]
supports_right_nested_joins = False
default_paramstyle = 'qmark'
diff --git a/test/sql/test_resultset.py b/test/sql/test_resultset.py
index 8461996..bd68c7f 100644
--- a/test/sql/test_resultset.py
+++ b/test/sql/test_resultset.py
@@ -317,7 +317,7 @@ class ResultProxyTest(fixtures.TablesTest):
dict(user_id=1, user_name='john'),
)
- # test a little sqlite weirdness - with the UNION,
+ # test a little sqlite < 3.10.0 weirdness - with the UNION,
# cols come back as "users.user_id" in cursor.description
r = testing.db.execute(
text(
@@ -331,7 +331,6 @@ class ResultProxyTest(fixtures.TablesTest):
eq_(r['user_name'], "john")
eq_(list(r.keys()), ["user_id", "user_name"])
- @testing.only_on("sqlite", "sqlite specific feature")
def test_column_accessor_sqlite_raw(self):
users = self.tables.users
@@ -346,13 +345,22 @@ class ResultProxyTest(fixtures.TablesTest):
"users.user_name from users",
bind=testing.db).execution_options(sqlite_raw_colnames=True). \
execute().first()
- not_in_('user_id', r)
- not_in_('user_name', r)
- eq_(r['users.user_id'], 1)
- eq_(r['users.user_name'], "john")
- eq_(list(r.keys()), ["users.user_id", "users.user_name"])
- @testing.only_on("sqlite", "sqlite specific feature")
+ if testing.against("sqlite < 3.10.0"):
+ not_in_('user_id', r)
+ not_in_('user_name', r)
+ eq_(r['users.user_id'], 1)
+ eq_(r['users.user_name'], "john")
+
+ eq_(list(r.keys()), ["users.user_id", "users.user_name"])
+ else:
+ not_in_('users.user_id', r)
+ not_in_('users.user_name', r)
+ eq_(r['user_id'], 1)
+ eq_(r['user_name'], "john")
+
+ eq_(list(r.keys()), ["user_id", "user_name"])
+
def test_column_accessor_sqlite_translated(self):
users = self.tables.users
@@ -368,8 +376,10 @@ class ResultProxyTest(fixtures.TablesTest):
bind=testing.db).execute().first()
eq_(r['user_id'], 1)
eq_(r['user_name'], "john")
- eq_(r['users.user_id'], 1)
- eq_(r['users.user_name'], "john")
+
+ if testing.against("sqlite < 3.10.0"):
+ eq_(r['users.user_id'], 1)
+ eq_(r['users.user_name'], "john")
eq_(list(r.keys()), ["user_id", "user_name"])
def test_column_accessor_labels_w_dots(self):
--
2.1.1.1.g1fb337f