From d73c6c7a2137291a5ecd3e0fa4d949ac0695f77841749122e8c85e16bb9b8930 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 21 May 2023 05:05:42 +0000 Subject: [PATCH] Accepting request 1088037 from home:bnavigator:branches:devel:languages:python OBS-URL: https://build.opensuse.org/request/show/1088037 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=236 --- SQLAlchemy-2.0.13.tar.gz | 3 -- SQLAlchemy-2.0.15.tar.gz | 3 ++ python-SQLAlchemy.changes | 98 +++++++++++++++++++++++++++++++++++++++ python-SQLAlchemy.spec | 17 +++---- 4 files changed, 110 insertions(+), 11 deletions(-) delete mode 100644 SQLAlchemy-2.0.13.tar.gz create mode 100644 SQLAlchemy-2.0.15.tar.gz diff --git a/SQLAlchemy-2.0.13.tar.gz b/SQLAlchemy-2.0.13.tar.gz deleted file mode 100644 index 0246219..0000000 --- a/SQLAlchemy-2.0.13.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d97b37b4e60073c38bcf94e289e3be09ef9be870de88d163f16e08f2b9ded1a -size 9286442 diff --git a/SQLAlchemy-2.0.15.tar.gz b/SQLAlchemy-2.0.15.tar.gz new file mode 100644 index 0000000..252ddaa --- /dev/null +++ b/SQLAlchemy-2.0.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e940a8659ef870ae10e0d9e2a6d5aaddf0ff6e91f7d0d7732afc9e8c4be9bbc +size 9296612 diff --git a/python-SQLAlchemy.changes b/python-SQLAlchemy.changes index 702c42b..2c77344 100644 --- a/python-SQLAlchemy.changes +++ b/python-SQLAlchemy.changes @@ -1,3 +1,101 @@ +------------------------------------------------------------------- +Sat May 20 10:32:50 UTC 2023 - Ben Greiner + +- Update to 2.0.15 + # orm + * As more projects are using new-style “2.0” ORM querying, it’s + becoming apparent that the conditional nature of “autoflush”, + being based on whether or not the given statement refers to ORM + entities, is becoming more of a key behavior. Up until now, the + “ORM” flag for a statement has been loosely based around + whether or not the statement returns rows that correspond to + ORM entities or columns; the original purpose of the “ORM” flag + was to enable ORM-entity fetching rules which apply + post-processing to Core result sets as well as ORM loader + strategies to the statement. For statements that don’t build on + rows that contain ORM entities, the “ORM” flag was considered + to be mostly unnecessary. + * It still may be the case that “autoflush” would be better + taking effect for all usage of Session.execute() and related + methods, even for purely Core SQL constructs. However, this + still could impact legacy cases where this is not expected and + may be more of a 2.1 thing. For now however, the rules for the + “ORM-flag” have been opened up so that a statement that + includes ORM entities or attributes anywhere within, including + in the WHERE / ORDER BY / GROUP BY clause alone, within scalar + subqueries, etc. will enable this flag. This will cause + “autoflush” to occur for such statements and also be visible + via the ORMExecuteState.is_orm_statement event-level attribute. + References: #9805 + # postgresql + * Repaired the base Uuid datatype for the PostgreSQL dialect to + make full use of the PG-specific UUID dialect-specific datatype + when “native_uuid” is selected, so that PG driver behaviors are + included. This issue became apparent due to the + insertmanyvalues improvement made as part of #9618, where in a + similar manner as that of #9739, the asyncpg driver is very + sensitive to datatype casts being present or not, and the + PostgreSQL driver-specific native UUID datatype must be invoked + when this generic type is used so that these casts take place. + References: #9808 +- Release 2.0.13 + # orm + * Modified the JoinedLoader implementation to use a simpler + approach in one particular area where it previously used a + cached structure that would be shared among threads. The + rationale is to avoid a potential race condition which is + suspected of being the cause of a particular crash that’s been + reported multiple times. The cached structure in question is + still ultimately “cached” via the compiled SQL cache, so a + performance degradation is not anticipated. + References: #9777 + * Fixed regression where use of update() or delete() within a CTE + construct, then used in a select(), would raise a CompileError + as a result of ORM related rules for performing ORM-level + update/delete statements. + References: #9767 + * Fixed issue in new ORM Annotated Declarative where using a + ForeignKey (or other column-level constraint) inside of + mapped_column() which is then copied out to models via pep-593 + Annotated would apply duplicates of each constraint to the + Column as produced in the target Table, leading to incorrect + CREATE TABLE DDL as well as migration directives under Alembic. + References: #9766 + * Fixed issue where using additional relationship criteria with + the joinedload() loader option, where the additional criteria + itself contained correlated subqueries that referred to the + joined entities and therefore also required “adaption” to + aliased entities, would be excluded from this adaption, + producing the wrong ON clause for the joinedload. + References: #9779 + # sql + * Generalized the MSSQL try_cast() function into the sqlalchemy. + import namespace so that it may be implemented by third party + dialects as well. Within SQLAlchemy, the try_cast() function + remains a SQL Server-only construct that will raise + CompileError if used with backends that don’t support it. + * try_cast() implements a CAST where un-castable conversions are + returned as NULL, instead of raising an error. Theoretically, + the construct could be implemented by third party dialects for + Google BigQuery, DuckDB, and Snowflake, and possibly others. + Pull request courtesy Nick Crews. + References: #9752 + * Fixed issue in values() construct where an internal compilation + error would occur if the construct were used inside of a scalar + subquery. + References: #9772 + # postgresql + * Fixed apparently very old issue where the ENUM.create_type + parameter, when set to its non-default of False, would not be + propagated when the Column which it’s a part of were copied, as + is common when using ORM Declarative mixins. References: #9773 + # tests + * Fixed test that relied on the sys.getsizeof() function to not + run on pypy, where this function appears to have different + behavior than it does on cpython. References: #9789 +- PEP517 +- Add missing runtime requirement + ------------------------------------------------------------------- Sun May 14 16:30:22 UTC 2023 - Dirk Müller diff --git a/python-SQLAlchemy.spec b/python-SQLAlchemy.spec index f87e9e8..8bf354e 100644 --- a/python-SQLAlchemy.spec +++ b/python-SQLAlchemy.spec @@ -16,11 +16,9 @@ # -%define skip_python2 1 -%define oldpython python %{?sle15_python_module_pythons} Name: python-SQLAlchemy -Version: 2.0.13 +Version: 2.0.15 Release: 0 Summary: Database Abstraction Library License: MIT @@ -29,13 +27,16 @@ Source: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLA Source1: SQLAlchemy.keyring # devel is needed for optional C extensions cprocessors.so, cresultproxy.so and cutils.so BuildRequires: %{python_module Cython3} -BuildRequires: %{python_module devel} +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python -Requires: python-greenlet +Requires: python-greenlet > 0.4.17 +Requires: python-typing_extensions >= 4.2.0 Provides: python-sqlalchemy = %{version} Obsoletes: python-sqlalchemy < %{version} Conflicts: python-SQLAlchemy1 @@ -77,10 +78,10 @@ sed -i 's/\r$//' examples/dynamic_dict/dynamic_dict.py %build export CFLAGS="%{optflags} -fno-strict-aliasing" -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check @@ -90,7 +91,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %license LICENSE %doc CHANGES.rst README.rst README.dialects.rst README.unittests.rst %{python_sitearch}/sqlalchemy/ -%{python_sitearch}/SQLAlchemy-%{version}-py*.egg-info +%{python_sitearch}/SQLAlchemy-%{version}.dist-info %files -n %{name}-doc %doc doc/