!40 Silence sqlalchemy-1.4 warning
From: @wk333 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
a8dc6a19df
@ -7,7 +7,7 @@
|
||||
|
||||
Name: mailman
|
||||
Version: 3.3.2
|
||||
Release: 6
|
||||
Release: 7
|
||||
Epoch: 3
|
||||
Summary: The GNU mailing list manager
|
||||
License: GPLv3
|
||||
@ -28,6 +28,8 @@ Patch15: mailman3-do-not-assume-sapce-in-banner.patch
|
||||
#Refer: https://gitlab.com/mailman/mailman/-/merge_requests/772
|
||||
Patch16: mailman3-test_as_string_python_bug_27321.patch
|
||||
Patch17: 0001-fix-tests-assertion-error.patch
|
||||
#Refer: https://gitlab.com/mailman/mailman/-/issues/964#note_1001855903
|
||||
Patch18: support-sqlalchemy-1-4.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: glibc-langpack-en
|
||||
BuildRequires: python%{python3_pkgversion}-devel >= 3.5 python%{python3_pkgversion}-setuptools
|
||||
@ -209,6 +211,9 @@ done
|
||||
%{_datadir}/selinux/*/mailman3.pp
|
||||
|
||||
%changelog
|
||||
* Thu Jul 07 2022 wangkai <wangkai385@h-partners.com> - 3:3.3.2-7
|
||||
- Silence sqlalchemy-1.4 warning
|
||||
|
||||
* Mon Jun 20 2022 baizhonggui <baizhonggui@h-partners.com> - 3:3.3.2-6
|
||||
- Fix tests assertion error
|
||||
|
||||
|
||||
47
support-sqlalchemy-1-4.patch
Normal file
47
support-sqlalchemy-1-4.patch
Normal file
@ -0,0 +1,47 @@
|
||||
diff --git a/src/mailman/database/types.py b/src/mailman/database/types.py
|
||||
index 1913a0a..4e97bf6 100644
|
||||
--- a/src/mailman/database/types.py
|
||||
+++ b/src/mailman/database/types.py
|
||||
@@ -34,6 +34,7 @@ class Enum(TypeDecorator):
|
||||
converts it on-the-fly.
|
||||
"""
|
||||
impl = Integer
|
||||
+ cache_ok = False
|
||||
|
||||
def __init__(self, enum, *args, **kw):
|
||||
super().__init__(*args, **kw)
|
||||
@@ -59,6 +60,7 @@ class UUID(TypeDecorator):
|
||||
|
||||
"""
|
||||
impl = CHAR
|
||||
+ cache_ok = False
|
||||
|
||||
def load_dialect_impl(self, dialect):
|
||||
if dialect.name == 'postgresql':
|
||||
@@ -93,6 +95,7 @@ class SAUnicode(TypeDecorator):
|
||||
type and it can still be used if needed in the codebase.
|
||||
"""
|
||||
impl = Unicode
|
||||
+ cache_ok = False
|
||||
|
||||
|
||||
@compiles(SAUnicode)
|
||||
@@ -113,6 +116,7 @@ class SAUnicodeLarge(TypeDecorator):
|
||||
This is double size of SAUnicode defined above.
|
||||
"""
|
||||
impl = Unicode
|
||||
+ cache_ok = False
|
||||
|
||||
|
||||
@compiles(SAUnicodeLarge, 'mysql')
|
||||
@@ -139,6 +143,7 @@ class SAUnicodeXL(TypeDecorator):
|
||||
See https://docs.sqlalchemy.org/en/latest/dialects/mysql.html#index-length
|
||||
"""
|
||||
impl = Unicode
|
||||
+ cache_ok = False
|
||||
|
||||
|
||||
@compiles(SAUnicodeXL, 'mysql')
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user