15
0

Accepting request 1205031 from devel:languages:python

- 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.

OBS-URL: https://build.opensuse.org/request/show/1205031
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy-Utils?expand=0&rev=40
This commit is contained in:
2024-10-02 19:33:41 +00:00
committed by Git OBS Bridge
5 changed files with 15 additions and 37 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2181bff01eeb84479e38571d2c0718eb52042f9afd8c194d0d02877e84b7d74
size 136579

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc599c8c3b3319e53ce6c5c3c471120bd325d0071fb6f38a10e924e3d07b9990
size 138017

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Oct 2 04:49:35 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <dmueller@suse.com>

View File

@@ -18,14 +18,12 @@
%{?sle15_python_module_pythons}
Name: python-SQLAlchemy-Utils
Version: 0.41.1
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
# 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}
@@ -107,8 +105,7 @@ rm tests/types/test_uuid.py
%files %{python_files}
%license LICENSE
%doc README.rst
%dir %{python_sitelib}/sqlalchemy_utils
%{python_sitelib}/sqlalchemy_utils/*
%{python_sitelib}/SQLAlchemy_Utils-%{version}*-info
%{python_sitelib}/sqlalchemy_utils
%{python_sitelib}/SQLAlchemy_Utils-%{version}.dist-info
%changelog

View File

@@ -1,28 +0,0 @@
From 712aabaefc5c8ca3680751c705cf5a5984c74af1 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
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]