forked from pool/python-celery
- Add sqlalchemy-2.0.patch to support latest version of sqlalchemy.
gh#celery/celery#8271 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-celery?expand=0&rev=151
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 29 15:38:50 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add sqlalchemy-2.0.patch to support latest version of sqlalchemy.
|
||||
gh#celery/celery#8271
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 28 09:19:04 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
@@ -39,6 +38,8 @@ Patch1: tests.patch
|
||||
# PATCH-FIX-UPSTREAM compatibility with newer billiard
|
||||
Patch2: https://github.com/celery/celery/commit/b260860988469ef8ad74f2d4225839c2fa91d590.patch
|
||||
Patch3: https://github.com/celery/celery/commit/879af6341974c3778077d8212d78f093b2d77a4f.patch
|
||||
# PATCH-FIX-UPSTREAM sqlalchemy-2.0.patch -- gh#celery/celery#8271
|
||||
Patch4: sqlalchemy-2.0.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: netcfg
|
||||
@@ -122,7 +123,8 @@ scheduling as well.
|
||||
%python_uninstall_alternative celery
|
||||
|
||||
%files %{python_files}
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/celery
|
||||
%{python_sitelib}/celery-%{version}*-info
|
||||
%license LICENSE
|
||||
%doc README.rst TODO
|
||||
%python_alternative %{_bindir}/celery
|
||||
|
||||
19
sqlalchemy-2.0.patch
Normal file
19
sqlalchemy-2.0.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
Index: celery-5.2.7/t/unit/backends/test_database.py
|
||||
===================================================================
|
||||
--- celery-5.2.7.orig/t/unit/backends/test_database.py
|
||||
+++ celery-5.2.7/t/unit/backends/test_database.py
|
||||
@@ -410,7 +410,13 @@ class test_SessionManager:
|
||||
from sqlalchemy.dialects.sqlite import dialect
|
||||
from sqlalchemy.exc import DatabaseError
|
||||
|
||||
- sqlite = dialect.dbapi()
|
||||
+ if hasattr(dialect, 'dbapi'):
|
||||
+ # Method name in SQLAlchemy < 2.0
|
||||
+ sqlite = dialect.dbapi()
|
||||
+ else:
|
||||
+ # Newer method name in SQLAlchemy 2.0
|
||||
+ sqlite = dialect.import_dbapi()
|
||||
+
|
||||
manager = SessionManager()
|
||||
engine = manager.get_engine('dburi')
|
||||
|
||||
Reference in New Issue
Block a user