From b7284dd452d25ffbb23a390d742aaa2056bc9340 Mon Sep 17 00:00:00 2001 From: dgarcia <> Date: Thu, 18 Jan 2024 20:53:49 +0000 Subject: [PATCH] Update python-SQLAlchemy-Utils to version 0.41.1 / rev 38 via SR 1139684 https://build.opensuse.org/request/show/1139684 by user dgarcia + anag+factory - Add sqlalchemy-2.0.22.patch to make it compatible with SQLAlchemy>=2.0.22, gh#kvesteri/sqlalchemy-utils#725 --- packages/p/python-SQLAlchemy-Utils/.files | Bin 214 -> 275 bytes packages/p/python-SQLAlchemy-Utils/.rev | 9 ++++++ .../python-SQLAlchemy-Utils.changes | 6 ++++ .../python-SQLAlchemy-Utils.spec | 14 +++++---- .../sqlalchemy-2.0.22.patch | 28 ++++++++++++++++++ 5 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 packages/p/python-SQLAlchemy-Utils/sqlalchemy-2.0.22.patch diff --git a/packages/p/python-SQLAlchemy-Utils/.files b/packages/p/python-SQLAlchemy-Utils/.files index 05eea37ecd2e54111b17d05f812ac257e834c08d..c3e3df76beefc8dc50017ef814bf817099fdae31 100644 GIT binary patch delta 159 zcmWN}Jr2S!3_#)XxAX!qFfg#TN*p^$M~-5L_yLFkhRC=d|`LSqENwRzs1^wEnls&+XiL+7LCU_xdA%x$OZ>MxIZ sDq7!iFI>8e2|zoONWI(INk~+3G2HZdevdrrP+p$~TGs-!6E8aa0si$W>;M1& delta 98 zcmWN}xeb6Y3;@9JHB3N3K|vcSk8$L2;>4EdkYEwSZp;HWz&-8T*yFt1Fm}e6Zd@oP wsi?w~oCDreH3Z#+krE5n+wN-?EyXKnL_op_0u@s5l`^20@=x>ar~W*oeC^p8-2eap diff --git a/packages/p/python-SQLAlchemy-Utils/.rev b/packages/p/python-SQLAlchemy-Utils/.rev index 9ffd60c8380..5e7434d7b28 100644 --- a/packages/p/python-SQLAlchemy-Utils/.rev +++ b/packages/p/python-SQLAlchemy-Utils/.rev @@ -344,4 +344,13 @@ beta (like "2.0.0b3") 1092729 + + 2c3efe5db8f24ecd8c32663a8d4b52ee + 0.41.1 + + anag+factory + - Add sqlalchemy-2.0.22.patch to make it compatible with + SQLAlchemy>=2.0.22, gh#kvesteri/sqlalchemy-utils#725 + 1139684 + diff --git a/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes b/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes index 6a19a1d03a9..1a47221275e 100644 --- a/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes +++ b/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.spec b/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.spec index 45d5e74f2c4..07944824441 100644 --- a/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.spec +++ b/packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.spec @@ -1,7 +1,7 @@ # # spec file for package python-SQLAlchemy-Utils # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,6 +23,8 @@ 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 +# PATCH-FIX-OPENSUSE sqlalchemy-2.0.22.patch gh#kvesteri/sqlalchemy-utils#725 +Patch1: sqlalchemy-2.0.22.patch BuildRequires: %{python_module Babel >= 1.3} BuildRequires: %{python_module Jinja2 >= 2.3} BuildRequires: %{python_module Pygments >= 1.2} @@ -38,6 +40,7 @@ BuildRequires: %{python_module intervals >= 0.7.1} BuildRequires: %{python_module passlib >= 1.6} BuildRequires: %{python_module pendulum >= 2.0.5} 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} @@ -45,6 +48,7 @@ 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 @@ -68,13 +72,13 @@ Requires: python-backports.zoneinfo Various utility functions and custom data types for SQLAlchemy. %prep -%setup -q -n SQLAlchemy-Utils-%{version} +%autosetup -p1 -n SQLAlchemy-Utils-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -104,6 +108,6 @@ rm tests/types/test_uuid.py %doc README.rst %dir %{python_sitelib}/sqlalchemy_utils %{python_sitelib}/sqlalchemy_utils/* -%{python_sitelib}/SQLAlchemy_Utils-%{version}-py*.egg-info +%{python_sitelib}/SQLAlchemy_Utils-%{version}*-info %changelog diff --git a/packages/p/python-SQLAlchemy-Utils/sqlalchemy-2.0.22.patch b/packages/p/python-SQLAlchemy-Utils/sqlalchemy-2.0.22.patch new file mode 100644 index 00000000000..77f300cd16a --- /dev/null +++ b/packages/p/python-SQLAlchemy-Utils/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]