From b32f682114a5b69de6a83ddb04d91780aad144cbe2b83cd2ea81874537793f5a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 20 Dec 2019 19:02:07 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20to=20version=201.3.12:=20=20=20*?= =?UTF-8?q?=20[orm]=20[bug]=20Fixed=20issue=20involving=20lazy=3D"raise"?= =?UTF-8?q?=20strategy=20where=20an=20ORM=20delete=20=20=20of=20an=20objec?= =?UTF-8?q?t=20would=20raise=20for=20a=20simple=20=E2=80=9Cuse-get?= =?UTF-8?q?=E2=80=9D=20style=20many-to-one=20relationship=20=20=20that=20h?= =?UTF-8?q?ad=20lazy=3D=E2=80=9Draise=E2=80=9D=20configured.=20This=20is?= =?UTF-8?q?=20inconsistent=20vs.=20the=20change=20=20=20introduced=20in=20?= =?UTF-8?q?1.3=20as=20part=20of=20#4353,=20where=20it=20was=20established?= =?UTF-8?q?=20that=20a=20history=20=20=20operation=20that=20does=20not=20e?= =?UTF-8?q?xpect=20emit=20SQL=20should=20bypass=20the=20lazy=3D"raise"=20c?= =?UTF-8?q?heck,=20=20=20and=20instead=20effectively=20treat=20it=20as=20l?= =?UTF-8?q?azy=3D"raise=5Fon=5Fsql"=20for=20this=20case.=20The=20fix=20=20?= =?UTF-8?q?=20adjusts=20the=20lazy=20loader=20strategy=20to=20not=20raise?= =?UTF-8?q?=20for=20the=20case=20where=20the=20lazy=20load=20=20=20was=20i?= =?UTF-8?q?nstructed=20that=20it=20should=20not=20emit=20SQL=20if=20the=20?= =?UTF-8?q?object=20were=20not=20present.=20=20=20*=20[orm]=20[bug]=20Fixe?= =?UTF-8?q?d=20regression=20introduced=20in=201.3.0=20related=20to=20the?= =?UTF-8?q?=20association=20=20=20proxy=20refactor=20in=20#4351=20that=20p?= =?UTF-8?q?revented=20composite()=20attributes=20from=20working=20in=20=20?= =?UTF-8?q?=20terms=20of=20an=20association=20proxy=20that=20references=20?= =?UTF-8?q?them.=20=20=20*=20[orm]=20[bug]=20Setting=20persistence-related?= =?UTF-8?q?=20flags=20on=20relationship()=20while=20also=20=20=20setting?= =?UTF-8?q?=20viewonly=3DTrue=20will=20now=20emit=20a=20regular=20warning,?= =?UTF-8?q?=20as=20these=20flags=20do=20not=20=20=20make=20sense=20for=20a?= =?UTF-8?q?=20viewonly=3DTrue=20relationship.=20In=20particular,=20the=20?= =?UTF-8?q?=E2=80=9Ccascade=E2=80=9D=20=20=20settings=20have=20their=20own?= =?UTF-8?q?=20warning=20that=20is=20generated=20based=20on=20the=20individ?= =?UTF-8?q?ual=20=20=20values,=20such=20as=20=E2=80=9Cdelete,=20delete-orp?= =?UTF-8?q?han=E2=80=9D,=20that=20should=20not=20apply=20to=20a=20viewonly?= =?UTF-8?q?=20=20=20relationship.=20Note=20however=20that=20in=20the=20cas?= =?UTF-8?q?e=20of=20=E2=80=9Ccascade=E2=80=9D,=20these=20settings=20are=20?= =?UTF-8?q?=20=20still=20erroneously=20taking=20effect=20even=20though=20t?= =?UTF-8?q?he=20relationship=20is=20set=20up=20as=20=20=20=E2=80=9Cviewonl?= =?UTF-8?q?y=E2=80=9D.=20In=201.4,=20all=20persistence-related=20cascade?= =?UTF-8?q?=20settings=20will=20be=20disallowed=20=20=20on=20a=20viewonly?= =?UTF-8?q?=3DTrue=20relationship=20in=20order=20to=20resolve=20this=20iss?= =?UTF-8?q?ue.=20=20=20*=20[orm]=20[bug]=20[py3k]=20Fixed=20issue=20where?= =?UTF-8?q?=20when=20assigning=20a=20collection=20to=20itself=20=20=20as?= =?UTF-8?q?=20a=20slice,=20the=20mutation=20operation=20would=20fail=20as?= =?UTF-8?q?=20it=20would=20first=20erase=20the=20=20=20assigned=20collecti?= =?UTF-8?q?on=20inadvertently.=20As=20an=20assignment=20that=20does=20not?= =?UTF-8?q?=20change=20the=20=20=20contents=20should=20not=20generate=20ev?= =?UTF-8?q?ents,=20the=20operation=20is=20now=20a=20no-op.=20Note=20that?= =?UTF-8?q?=20=20=20the=20fix=20only=20applies=20to=20Python=203;=20in=20P?= =?UTF-8?q?ython=202,=20the=20=5F=5Fsetitem=5F=5F=20hook=20isn=C3=A2?= =?UTF-8?q?=E2=82=AC=E2=84=A2t=20=20=20called=20in=20this=20case;=20=5F=5F?= =?UTF-8?q?setslice=5F=5F=20is=20used=20instead=20which=20recreates=20the?= =?UTF-8?q?=20list=20=20=20item-by-item=20in=20all=20cases.=20=20=20*=20[o?= =?UTF-8?q?rm]=20[bug]=20Fixed=20issue=20where=20by=20if=20the=20=E2=80=9C?= =?UTF-8?q?begin=E2=80=9D=20of=20a=20transaction=20failed=20at=20=20=20the?= =?UTF-8?q?=20Core=20engine/connection=20level,=20such=20as=20due=20to=20n?= =?UTF-8?q?etwork=20error=20or=20database=20is?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=158 --- SQLAlchemy-1.3.11.tar.gz | 3 --- SQLAlchemy-1.3.12.tar.gz | 3 +++ python-SQLAlchemy.changes | 55 +++++++++++++++++++++++++++++++++++++++ python-SQLAlchemy.spec | 4 +-- 4 files changed, 60 insertions(+), 5 deletions(-) delete mode 100644 SQLAlchemy-1.3.11.tar.gz create mode 100644 SQLAlchemy-1.3.12.tar.gz diff --git a/SQLAlchemy-1.3.11.tar.gz b/SQLAlchemy-1.3.11.tar.gz deleted file mode 100644 index eb755b3..0000000 --- a/SQLAlchemy-1.3.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:afa5541e9dea8ad0014251bc9d56171ca3d8b130c9627c6cb3681cff30be3f8a -size 6007784 diff --git a/SQLAlchemy-1.3.12.tar.gz b/SQLAlchemy-1.3.12.tar.gz new file mode 100644 index 0000000..9127ad2 --- /dev/null +++ b/SQLAlchemy-1.3.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfb8f464a5000b567ac1d350b9090cf081180ec1ab4aa87e7bca12dab25320ec +size 6020509 diff --git a/python-SQLAlchemy.changes b/python-SQLAlchemy.changes index 2b4af57..15aec55 100644 --- a/python-SQLAlchemy.changes +++ b/python-SQLAlchemy.changes @@ -1,3 +1,58 @@ +------------------------------------------------------------------- +Fri Dec 20 18:45:14 UTC 2019 - Dirk Mueller + +- update to version 1.3.12: + * [orm] [bug] Fixed issue involving lazy="raise" strategy where an ORM delete + of an object would raise for a simple “use-get” style many-to-one relationship + that had lazy=”raise” configured. This is inconsistent vs. the change + introduced in 1.3 as part of #4353, where it was established that a history + operation that does not expect emit SQL should bypass the lazy="raise" check, + and instead effectively treat it as lazy="raise_on_sql" for this case. The fix + adjusts the lazy loader strategy to not raise for the case where the lazy load + was instructed that it should not emit SQL if the object were not present. + + * [orm] [bug] Fixed regression introduced in 1.3.0 related to the association + proxy refactor in #4351 that prevented composite() attributes from working in + terms of an association proxy that references them. + + * [orm] [bug] Setting persistence-related flags on relationship() while also + setting viewonly=True will now emit a regular warning, as these flags do not + make sense for a viewonly=True relationship. In particular, the “cascade” + settings have their own warning that is generated based on the individual + values, such as “delete, delete-orphan”, that should not apply to a viewonly + relationship. Note however that in the case of “cascade”, these settings are + still erroneously taking effect even though the relationship is set up as + “viewonly”. In 1.4, all persistence-related cascade settings will be disallowed + on a viewonly=True relationship in order to resolve this issue. + + * [orm] [bug] [py3k] Fixed issue where when assigning a collection to itself + as a slice, the mutation operation would fail as it would first erase the + assigned collection inadvertently. As an assignment that does not change the + contents should not generate events, the operation is now a no-op. Note that + the fix only applies to Python 3; in Python 2, the __setitem__ hook isn’t + called in this case; __setslice__ is used instead which recreates the list + item-by-item in all cases. + + * [orm] [bug] Fixed issue where by if the “begin” of a transaction failed at + the Core engine/connection level, such as due to network error or database is + locked for some transactional recipes, within the context of the Session + procuring that connection from the conneciton pool and then immediately + returning it, the ORM Session would not close the connection despite this + connection not being stored within the state of that Session. This would lead + to the connection being cleaned out by the connection pool weakref handler + within garbage collection which is an unpreferred codepath that in some special + configurations can emit errors in standard error. + + * sql [sql] [bug] Fixed bug where “distinct” keyword passed to select() would + not treat a string value as a “label reference” in the same way that the + select.distinct() does; it would instead raise unconditionally. This keyword + argument and the others passed to select() will ultimately be deprecated for + SQLAlchemy 2.0. + + * [sql] [bug] Changed the text of the exception for “Can’t resolve label + reference” to include other kinds of label coercions, namely that “DISTINCT” is + also in this category under the PostgreSQL dialect. + ------------------------------------------------------------------- Sat Nov 16 16:33:38 UTC 2019 - Arun Persaud diff --git a/python-SQLAlchemy.spec b/python-SQLAlchemy.spec index 6c44596..0e9a60a 100644 --- a/python-SQLAlchemy.spec +++ b/python-SQLAlchemy.spec @@ -1,7 +1,7 @@ # # spec file for package python-SQLAlchemy # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-SQLAlchemy -Version: 1.3.11 +Version: 1.3.12 Release: 0 Summary: Database Abstraction Library License: MIT