commit f67dd0311142301cd5883fb9772464242519fffac50d3738b62652dd03ad1c3a Author: Steve Kowalik Date: Tue Mar 25 08:21:36 2025 +0000 - Lowercase metadata directory name. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy-Utils?expand=0&rev=87 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/SQLAlchemy-Utils-0.41.1.tar.gz b/SQLAlchemy-Utils-0.41.1.tar.gz new file mode 100644 index 0000000..5ccfa7c --- /dev/null +++ b/SQLAlchemy-Utils-0.41.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2181bff01eeb84479e38571d2c0718eb52042f9afd8c194d0d02877e84b7d74 +size 136579 diff --git a/SQLAlchemy-Utils-0.41.2.tar.gz b/SQLAlchemy-Utils-0.41.2.tar.gz new file mode 100644 index 0000000..e89825e --- /dev/null +++ b/SQLAlchemy-Utils-0.41.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc599c8c3b3319e53ce6c5c3c471120bd325d0071fb6f38a10e924e3d07b9990 +size 138017 diff --git a/python-SQLAlchemy-Utils.changes b/python-SQLAlchemy-Utils.changes new file mode 100644 index 0000000..d700e5d --- /dev/null +++ b/python-SQLAlchemy-Utils.changes @@ -0,0 +1,486 @@ +------------------------------------------------------------------- +Tue Mar 25 08:21:22 UTC 2025 - Steve Kowalik + +- Lowercase metadata directory name. + +------------------------------------------------------------------- +Fri Jan 10 15:42:43 UTC 2025 - Ben Greiner + +- Demote pendulum extra: Upstream struggles to maintain it + gh#python-pendulum/pendulum#590 + +------------------------------------------------------------------- +Tue Nov 19 10:25:41 UTC 2024 - Dirk Müller + +- skip one more test for python 313 + (https://github.com/kvesteri/sqlalchemy-utils/issues/764) + +------------------------------------------------------------------- +Wed Oct 2 04:49:35 UTC 2024 - Steve Kowalik + +- Update to 0.41.2: + * Fix breaking change introduced on SQLAlchemy 2.0.22 changes to + attributes.AttributeImpl constructor +- Drop patch sqlalchemy-2.0.22.patch: + * Included upstream. + +------------------------------------------------------------------- +Thu Feb 22 11:23:32 UTC 2024 - Dirk Müller + +- build for modern python stack + +------------------------------------------------------------------- +Thu Jan 18 11:05:27 UTC 2024 - Daniel Garcia + +- Add sqlalchemy-2.0.22.patch to make it compatible with + SQLAlchemy>=2.0.22, gh#kvesteri/sqlalchemy-utils#725 + +------------------------------------------------------------------- +Tue Jun 13 05:17:03 UTC 2023 - Steve Kowalik + +- Update 0.41.1: + * Use a custom SQL construct for refreshing materialized views in + refresh_materialized_view + * Support psycopg3 for create_database() and delete_database() + * Remove Python 3.6 support + * Add SQLAlchemy 2 support + * Add comparison operator support for LTree type + * Support Python 3.11 + * Fix a crash that occurs if the colour-science package is installed, + which shares the same import name as the colour package that + sqlalchemy-utils supports + * Fix a crash that occurs if the installed sqlalchemy version is a + beta (like "2.0.0b3") + +------------------------------------------------------------------- +Mon Jul 11 13:57:21 UTC 2022 - Arun Persaud + +- specfile: + * remove six dependency + +- update to version 0.38.3: + * Fixed double-quoted UUID's in sqlalchemy >= 1.4.30 (#581, pull + request courtesy of kurtmckee) + * Fixed create_database() and drop_database() crashing with + CockroachDB (#586, pull request courtesy of kurtmckee) + * Added mixed case support for pg composite (#584, pull request + courtesy of bamartin125) + * Support Python 3.10. + * Remove the dependency on the six package. (#605) + * Introduce sqlalchemy 2.0 compatibility. (#513) + +------------------------------------------------------------------- +Wed Apr 20 08:53:17 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build + +------------------------------------------------------------------- +Tue Mar 1 08:30:19 UTC 2022 - Dirk Müller + +- skip uuid tests + +------------------------------------------------------------------- +Mon Jan 3 11:34:34 UTC 2022 - Dirk Müller + +- update to 0.38.2: + - Added inherit_cache=False in order to avoid SQLAlchemy warnings + in `cast_locale_expr` + - Added cache_ok=True for various different types + - Removed CompositeArray. Instead of CompositeArray one should use + ARRAY(dimensions=1) + - Made ChoicesType only convert lists to tuples internally. + +------------------------------------------------------------------- +Tue Oct 26 20:15:55 UTC 2021 - Dirk Müller + +- update to 0.37.9: + * Fixed base padding class abstract methods + * Optimized cast_locale function + * Allow for arbitrary Table keyword arguments in create_table_from_selectable + +------------------------------------------------------------------- +Tue Sep 7 06:43:25 UTC 2021 - Dirk Müller + +- update to 0.37.8: + * Added 'zoneinfo' backend to TimezoneType + * Added identifier quoting for view functions and constructs + * Added literal processor for UUIDType + +------------------------------------------------------------------- +Thu Jun 17 20:49:07 UTC 2021 - Dirk Müller + +- update to 0.37.6: + * Added `cache_ok=True` for TSVectorType + * Fixed instant_defaults_listener to respect constructor supplied kwargs + * Fixed incorrect Ltree.lca behaviour + * Added `cache_ok=True` for all custom types + * Added CockroachDB support for UUIDType + +------------------------------------------------------------------- +Fri May 14 01:15:35 UTC 2021 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 0.37.2: + * Added python_requires to setup.py + +- changes from version 0.37.1: + * Removed py27 from pypi wheel + +- changes from version 0.37.0: + * Added SQLAlchemy 1.4 support + * Fixed database_exists() on PostgreSQL (#462) + * Added create_database support pymssql (#486) + * Removed sort_query, get_query_entities and + get_query_entity_by_alias functions + +------------------------------------------------------------------- +Sat Jul 11 18:37:48 UTC 2020 - Arun Persaud + +- update to version 0.36.8: + * Don't connect to 'postgres' data base for database existence check + (#372, pull request courtesy of bernt-matthias) + +- changes from version 0.36.7: + * Fix dynamic relationships for observables (#455) + +------------------------------------------------------------------- +Tue Jun 9 12:14:36 UTC 2020 - Tomáš Chvátal + +- Add missing deps +- Reenable testsuite by skipping the tests needing pgsql + +------------------------------------------------------------------- +Mon Jun 8 13:33:49 UTC 2020 - Dirk Mueller + +- update to 0.36.6: + - Reverted #426 and added support for Legacy Encrypted Type (#450, pull request courtesy of rushilsrivastava) + - Added psycopg2cffi support for create_database and drop_database (#447, pull request courtesy of DominicBurkart) + +------------------------------------------------------------------- +Sat May 9 16:12:59 UTC 2020 - Arun Persaud + +- update to version 0.36.5: + * Added support for dictionary input in CompositeType (#435, pull + request courtesy of cozos) + * Added new EnrichedDateTime and EnrichedDate types (#403, pull + request courtesy of yk-lab) + * Using String instead of LargeBinary for impl of EncryptedType + (#426, pull request courtesy of aicioara) + * Added support for JSONType in EncryptedType (#439, pull request + courtesy of rushilsrivastava) + +- changes from version 0.36.4: + * Added jsonb_sql function (#377, pull request courtesy of getglad) + * Drop py27 support + +------------------------------------------------------------------- +Mon Apr 20 09:36:04 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + +------------------------------------------------------------------- +Fri Mar 27 11:02:54 UTC 2020 - Marketa Calabkova + +- update to version 0.36.3 + * Added hash method for PhoneNumberType (#428, pull request courtesy of hanc1208) + * Added repr for UUIDType (#424, pull request courtesy of ziima) + +------------------------------------------------------------------- +Sun Dec 29 21:12:16 UTC 2019 - Arun Persaud + +- update to version 0.36.1: + * Added support for CASCADE option when dropping views (#406, pull + request courtesy of amicks) + * Added aliases parameter to create_materialized_view function. + +------------------------------------------------------------------- +Fri Dec 13 00:19:27 UTC 2019 - Arun Persaud + +- update to version 0.36.0: + * Removed explain and explain_analyze due to the internal changes in + SQLAlchemy version 1.3. + +------------------------------------------------------------------- +Sat Nov 9 14:47:11 UTC 2019 - Arun Persaud + +- update to version 0.35.0: + * Removed some deprecation warnings + * Added Int8RangeType (#401, pull request courtesy of lpsinger) + +------------------------------------------------------------------- +Sun Aug 25 18:01:32 UTC 2019 - Arun Persaud + +- update to version 0.34.2: + * Remove ABC deprecation warnings (#386, pull request courtesy of + VizualAbstract) + +------------------------------------------------------------------- +Wed Jul 24 10:05:50 UTC 2019 - Tomáš Chvátal + +- Run fdupes +- Add missing deps and recommends + +------------------------------------------------------------------- +Sun Jul 21 17:08:23 UTC 2019 - Arun Persaud + +- update to version 0.34.1: + * Remove deprecation warnings (#379, pull request courtesy of + Le-Stagiaire) + * Drop py34 support + +------------------------------------------------------------------- +Sat Jun 15 15:51:10 UTC 2019 - Arun Persaud + +- update to version 0.34.0: + * Removed array_agg compilation which was never a good idea and + collided with the latest version of SA. (#374) + * Removed deprecation warnings (#373, pull request courtesy of + pbasista) + +------------------------------------------------------------------- +Sun Jan 20 04:34:11 UTC 2019 - Arun Persaud + +- update to version 0.33.11: + * Added support for creating and dropping a PostgreSQL database when + using pg8000 driver (#303, pull request courtesy of mohaseeb) + +------------------------------------------------------------------- +Sun Jan 6 22:26:08 UTC 2019 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 0.33.10: + * Removed optional dependency to Flask-Babel. Now using Babel + instead. (#333, pull request courtesy of aveuiller) + +------------------------------------------------------------------- +Sat Dec 8 19:34:43 UTC 2018 - Arun Persaud + +- update to version 0.33.9: + * Fixed SQLite database_exists to check for correct file format + (#306, pull request courtesy of jomasti) + +------------------------------------------------------------------- +Thu Nov 22 21:49:03 UTC 2018 - Arun Persaud + +- update to version 0.33.8: + * Added support of short-code in PhoneNumberType (#348, pull request + courtesy of anandtripathi5) + +- changes from version 0.33.7: + * Added MSSQL support for create_database and drop_database (#337, + pull request courtesy of jomasti) + +------------------------------------------------------------------- +Sun Oct 14 15:24:01 UTC 2018 - Arun Persaud + +- update to version 0.33.6: + * Fixed passlib compatibility issue (again) (#342) + * Added support for SQL VIEWs + +------------------------------------------------------------------- +Sat Sep 22 05:30:08 UTC 2018 - Arun Persaud + +- update to version 0.33.5: + * Added optional attr parameter for locale calleble in + TranslationHybrid + * Fixed an issue with PasswordType so that it is compatible with + older versions of passlib (#342) + +------------------------------------------------------------------- +Sun Sep 16 15:28:26 UTC 2018 - Arun Persaud + +- specfile: + * remove devel from noarch + * be more specific in %files section + +- update to version 0.33.4: + * Made PasswordType use `hash` function instead of deprecated + `encrypt` function (#341, pull request courtesy of libre-man) + +------------------------------------------------------------------- +Sun May 6 05:44:06 UTC 2018 - arun@gmx.de + +- update to version 0.33.3: + * Added new AesGcmEngine (#322, pull request courtesy of + manishahluwalia) + +- changes from version 0.33.2: + * Added support for universal wheels (#312, pull request courtesy of + nsoranzo) + * Fixed usage of template0 and template1 with postgres database + functions. (#286, pull request courtesy of funkybob) + +------------------------------------------------------------------- +Sat Mar 24 00:02:42 UTC 2018 - arun@gmx.de + +- update to version 0.33.1: + * Fixed EncryptedType for Oracle padding attack (#316, pull request + courtesy of manishahluwalia) + +------------------------------------------------------------------- +Mon Feb 19 17:16:09 UTC 2018 - arun@gmx.de + +- specfile: + * update copyright year + +- update to version 0.33.0: + * Added support for materialized views in PostgreSQL + * Added Ltree.descendant_of and Ltree.ancestor_of (#311, pull + request courtesy of kageurufu) + * Dropped Python 3.3 support + * Fixed EncryptedType padding (#301, pull request courtesy of + konstantinoskostis) + +------------------------------------------------------------------- +Mon Nov 13 04:55:56 UTC 2017 - arun@gmx.de + +- update to version 0.32.21: + * Close connections on exists, create and drop database functions + (#295, pull request courtesy of Terseus) + +- changes from version 0.32.20 : + * Added __hash__ method for choice objects (#294, pull request + courtesy of havelock) + +------------------------------------------------------------------- +Tue Oct 17 16:05:33 UTC 2017 - arun@gmx.de + +- update to version 0.32.19: + * Fixed select_correlated_expression order by for intermediate table + aliases + +------------------------------------------------------------------- +Sat Oct 7 14:41:15 UTC 2017 - arun@gmx.de + +- update to version 0.32.18: + * Made aggregated attributes to work with subclass objects (#287, + pull request courtesy of fayazkhan) + +------------------------------------------------------------------- +Sat Sep 30 16:30:16 UTC 2017 - arun@gmx.de + +- update to version 0.32.17: + * Added support for MSSQL uniqueidentifier type (#283, pull request + courtesy of nHurD) + +------------------------------------------------------------------- +Sun Sep 24 21:56:50 UTC 2017 - arun@gmx.de + +- update to version 0.32.16: + * Added more hints when decrypting AES with an invalid key (#275, + pull request courtesy of xrmx) + +- changes from version 0.32.15: + * Added better handling of date types for EncryptedType (#184, pull + request courtesy of konstantinoskostis) + +------------------------------------------------------------------- +Wed Aug 23 05:02:53 UTC 2017 - tbechtold@suse.com + +- update to 0.32.14: + - Fixed drop_database version comparison + - Fixed a DeprecationWarning by using LargeBinary instead of Binary + - Added generic_repr decorator + - TimeZoneType support for static timezones + - Added SQLite support for PasswordType + - Added PhoneNumber as the python_type for PhoneNumberType + - Made auto_delete_orphans support backref tuples + - Added support for multi-column observers +- convert to singlespec + +------------------------------------------------------------------- +Mon Nov 14 13:59:20 UTC 2016 - dmueller@suse.com + +- udpate to 0.32.9: + - Added support for multi-column observers (#231, pull request courtesy of quantus) + - Fixed EmailType to respect constructor args (#230, pull request courtesy of quantus) + +------------------------------------------------------------------- +Fri Jun 3 16:18:25 UTC 2016 - tbechtold@suse.com + +- update to 0.32.7: + - Made PhoneNumber exceptions inherit SQLAlchemy's DontWrapMixin + - Added support for timezones with ArrowType + - Fixed import issue with latest version of SQLAlchemy + - Added LtreeType for PostgreSQL ltree extension + - Added Ltree primitive data type + - Added support for PhoneNumber objects as composites + - Fixed PasswordType to not access LazyCryptContext on type init + - Fixed database helpers for sqlite + - Fixed TranslationHybrid aliased entities handling + - Dropped py26 support + - Made PasswordType to use LazyCryptContext by default + - Added literal parameter processing for ArrowType + - Fixed scalar parsing of LocaleType + - Fixed column alias handling with assert_* functions + - Fixed non-ascii string handling in composite types + - Fixed observes crashing when observable root_obj is ``None`` + - Column observers only notified when actual changes have been made + to underlying columns + - Made has_index allow fk constraint as parameter + - Made has_unique_index allow fk constraint as parameter + - Made the extra packages in setup.py to be returned in deterministic order + - Removed is_indexed_foreign_key (superceded by more versatile has_index) + - Fixed LocaleType territory parsing (courtesy of dahlia) + - Added correlate parameter to select_correlated_expression function + - Fixed sort_query handling of aliased classes with hybrid properties + - Added support for aliased classes in get_hybrid_properties utility function + - Added cast_if utility function + - Added support for InstrumentedAttributes, ColumnProperties and Columns in + get_columns function + - Added support for PhoneNumber extensions + - Fix None type handling of ChoiceType + - Make locale casting for translation hybrid expressions cast locales on + compilation phase. This extra lazy locale casting is needed in some + cases where translation hybrid expressions are used before get_locale + - Added better support for dynamic locales in translation_hybrid + - Make babel dependent primitive types to use Locale('en') for data validation + instead of current locale. Using current locale leads to infinite recursion + in cases where the loaded data has dependency to the loaded object's locale. + - Added get_type utility function + - Added default parameter for array_agg function + - Added Asterisk compiler + - Added row_to_json GenericFunction + - Added array_agg GenericFunction + - Made quote function accept dialect object as the first paremeter + - Made has_index work with tables without primary keys + - Fixed CompositeType null handling + - Made psycopg2 requirement optional + - Made CompositeArray work with tuples given as bind parameters + - Fixed CompositeType bind parameter processing when one of the fields is of + TypeDecorator type and + - Fixed CompositeType bind parameter processing when one of the fields is + of TypeDecorator type. + - Added length property to range types + - Added CompositeType for PostgreSQL + - Fixed ``assert_max_length``, ``assert_non_nullable``, ``assert_min_value`` + and ``assert_max_value`` not properly raising an ``AssertionError`` when + the assertion failed. + - Drop undocumented batch fetch feature. Let's wait until the inner workings + of SQLAlchemy loading API is well-documented. + - Fixed GenericRelationshipProperty comparator to work with SA 1.0.x + - Make all foreign key helpers SA 1.0 compliant + - Make translation_hybrid expression work the same way as SQLAlchemy-i18n + translation expressions + - Update SQLAlchemy dependency to 1.0 + - Added __hash__ method to Country class + - Made Country validate itself during object initialization + - Made Country string coercible + - Removed deprecated function generates + - Fixed observes function to work with simple column properties + - Added CurrencyType + +------------------------------------------------------------------- +Wed Feb 10 13:50:49 UTC 2016 - tbechtold@suse.com + +- Install LICENSE and README.rst + +------------------------------------------------------------------- +Fri Mar 27 15:28:20 UTC 2015 - prusnak@opensuse.org + +- created package (version 0.29.8) + diff --git a/python-SQLAlchemy-Utils.spec b/python-SQLAlchemy-Utils.spec new file mode 100644 index 0000000..6bb9599 --- /dev/null +++ b/python-SQLAlchemy-Utils.spec @@ -0,0 +1,109 @@ +# +# spec file for package python-SQLAlchemy-Utils +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-SQLAlchemy-Utils +Version: 0.41.2 +Release: 0 +Summary: Various utility functions for SQLAlchemy +License: BSD-3-Clause +URL: https://github.com/kvesteri/sqlalchemy-utils +Source: https://files.pythonhosted.org/packages/source/S/SQLAlchemy-Utils/SQLAlchemy-Utils-%{version}.tar.gz +BuildRequires: %{python_module Babel >= 1.3} +BuildRequires: %{python_module Jinja2 >= 2.3} +BuildRequires: %{python_module Pygments >= 1.2} +BuildRequires: %{python_module SQLAlchemy >= 1.0} +BuildRequires: %{python_module arrow >= 0.3.4} +BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9} +BuildRequires: %{python_module colour >= 0.0.4} +BuildRequires: %{python_module cryptography >= 0.6} +BuildRequires: %{python_module docutils >= 0.10} +BuildRequires: %{python_module flexmock >= 0.9.7} +BuildRequires: %{python_module furl >= 0.4.1} +BuildRequires: %{python_module intervals >= 0.7.1} +BuildRequires: %{python_module passlib >= 1.6} +BuildRequires: %{python_module pendulum >= 2.0.5 if %python-base < 3.13} +BuildRequires: %{python_module phonenumbers >= 5.9.2} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module psycopg2 >= 2.5.1} +BuildRequires: %{python_module psycopg2cffi >= 2.8.1} +BuildRequires: %{python_module pyodbc} +BuildRequires: %{python_module pytest >= 2.7.1} +BuildRequires: %{python_module python-dateutil >= 2.6} +BuildRequires: %{python_module pytz >= 2014.2} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-SQLAlchemy >= 1.0 +Recommends: python-Babel >= 1.3 +Recommends: python-arrow >= 0.3.4 +Recommends: python-colour >= 0.0.4 +Recommends: python-cryptography >= 0.6 +Recommends: python-dateutil +Recommends: python-furl >= 0.4.1 +Recommends: python-intervals >= 0.7.1 +Recommends: python-passlib >= 1.6 +Recommends: python-phonenumbers >= 5.9.2 +Suggests: python-pendulum >= 2.0.5 +BuildArch: noarch +%if 0%{?python_version_nodots} < 39 +Requires: python-backports.zoneinfo +%endif +%python_subpackages + +%description +Various utility functions and custom data types for SQLAlchemy. + +%prep +%autosetup -p1 -n SQLAlchemy-Utils-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# needs running pgsql / mssql / mysql +rm tests/test_asserts.py +rm tests/test_translation_hybrid.py +rm tests/aggregate/test_o2m_o2m_o2m.py +rm tests/aggregate/test_search_vectors.py +rm tests/aggregate/test_with_ondelete_cascade.py +rm tests/observes/test_column_property.py +rm tests/observes/test_m2m_m2m_m2m.py +rm tests/observes/test_o2m_o2o_o2m.py +rm tests/observes/test_o2m_o2m_o2m.py +rm tests/observes/test_o2o_o2o.py +rm tests/observes/test_o2o_o2o_o2o.py +rm tests/relationships/test_select_correlated_expression.py +rm tests/types/test_composite.py +rm tests/types/test_ltree.py +rm tests/types/test_tsvector.py +rm tests/types/test_uuid.py +%pytest -rs -k 'not (TestDatabasePostgres or TestDatabaseMssql or OnPostgres or OnMysql or TestPostgres or TestMysql or TestSortQueryRelationshipCounts or TestSortQueryWithPolymorphicInheritance or TestMaterializedViews or TestLazyEvaluatedSelectExpressionsForAggregates or TestAggregatesWithManyToManyRelationships or TestAggregateManyToManyAndManyToMany or TestAggregateOneToManyAndOneToMany or TestJSONSQL or TestJSONBSQL or TestSortQueryWithCustomPolymorphic or TestAggregateOneToManyAndManyToMany or test_timezone or test_add_observed_object or test_render_mock_ddl)' + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/sqlalchemy_utils +%{python_sitelib}/sqlalchemy_utils-%{version}.dist-info + +%changelog diff --git a/sqlalchemy-2.0.22.patch b/sqlalchemy-2.0.22.patch new file mode 100644 index 0000000..10156d3 --- /dev/null +++ b/sqlalchemy-2.0.22.patch @@ -0,0 +1,28 @@ +From 712aabaefc5c8ca3680751c705cf5a5984c74af1 Mon Sep 17 00:00:00 2001 +From: Daniel Garcia Moreno +Date: Thu, 18 Jan 2024 11:02:54 +0100 +Subject: [PATCH] Update GenericAttributeImpl to work with SqlAlchemy 2.0.22 + +Fix https://github.com/kvesteri/sqlalchemy-utils/issues/719 +--- + sqlalchemy_utils/generic.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: SQLAlchemy-Utils-0.41.1/sqlalchemy_utils/generic.py +=================================================================== +--- SQLAlchemy-Utils-0.41.1.orig/sqlalchemy_utils/generic.py ++++ SQLAlchemy-Utils-0.41.1/sqlalchemy_utils/generic.py +@@ -13,6 +13,13 @@ from .functions.orm import _get_class_re + + + class GenericAttributeImpl(attributes.ScalarAttributeImpl): ++ def __init__(self, *args, **kwargs): ++ # arguments received (class, key, dispatch) ++ # The attributes.AttributeImpl requires (class, key, default_function, dispatch) ++ # Setting None as default_function here ++ args = args[:2] + (None, ) + args[2:] ++ super().__init__(*args, **kwargs) ++ + def get(self, state, dict_, passive=attributes.PASSIVE_OFF): + if self.key in dict_: + return dict_[self.key]