-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
9160080
commit 0a1678f
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/p/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/p/python-SQLAlchemy-Utils/sqlalchemy-2.0.22.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |