Skip to content

Commit

Permalink
Update python-SQLAlchemy-Utils to version 0.41.1 / rev 38 via SR 1139684
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dgarcia authored and bmwiedemann committed Jan 18, 2024
1 parent 9160080 commit 0a1678f
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 5 deletions.
Binary file modified packages/p/python-SQLAlchemy-Utils/.files
Binary file not shown.
9 changes: 9 additions & 0 deletions packages/p/python-SQLAlchemy-Utils/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -344,4 +344,13 @@
beta (like &quot;2.0.0b3&quot;)</comment>
<requestid>1092729</requestid>
</revision>
<revision rev="38" vrev="2">
<srcmd5>2c3efe5db8f24ecd8c32663a8d4b52ee</srcmd5>
<version>0.41.1</version>
<time>1705611229</time>
<user>anag+factory</user>
<comment>- Add sqlalchemy-2.0.22.patch to make it compatible with
SQLAlchemy&gt;=2.0.22, gh#kvesteri/sqlalchemy-utils#725</comment>
<requestid>1139684</requestid>
</revision>
</revisionlist>
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 18 11:05:27 UTC 2024 - Daniel Garcia <[email protected]>

- 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 <[email protected]>

Expand Down
14 changes: 9 additions & 5 deletions packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.spec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Expand All @@ -38,13 +40,15 @@ 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}
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
Expand All @@ -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
Expand Down Expand Up @@ -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
28 changes: 28 additions & 0 deletions packages/p/python-SQLAlchemy-Utils/sqlalchemy-2.0.22.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 712aabaefc5c8ca3680751c705cf5a5984c74af1 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <[email protected]>
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]

0 comments on commit 0a1678f

Please sign in to comment.