Filter out deprecation warnings caused by Python 3.10.0b1 and disable one failing test
This commit is contained in:
parent
230e417dbd
commit
55621d11e2
33
0001-filter-out-DeprecationWarnings.patch
Normal file
33
0001-filter-out-DeprecationWarnings.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From a4b4548bb64789577aa87145acb66f41f2e55a40 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||||
|
Date: Wed, 26 May 2021 13:18:27 +0200
|
||||||
|
Subject: [PATCH] filter out DeprecationWarnings
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/sqlalchemy/testing/warnings.py | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/sqlalchemy/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py
|
||||||
|
index 3236ecf..37d0b81 100644
|
||||||
|
--- a/lib/sqlalchemy/testing/warnings.py
|
||||||
|
+++ b/lib/sqlalchemy/testing/warnings.py
|
||||||
|
@@ -35,6 +35,16 @@ def setup_filters():
|
||||||
|
category=DeprecationWarning,
|
||||||
|
message="The loop argument is deprecated",
|
||||||
|
)
|
||||||
|
+ warnings.filterwarnings(
|
||||||
|
+ "ignore",
|
||||||
|
+ category=DeprecationWarning,
|
||||||
|
+ message="There is no current event loop",
|
||||||
|
+ )
|
||||||
|
+ warnings.filterwarnings(
|
||||||
|
+ "ignore",
|
||||||
|
+ category=DeprecationWarning,
|
||||||
|
+ message="SelectableGroups dict interface is deprecated. Use select.",
|
||||||
|
+ )
|
||||||
|
|
||||||
|
# ignore things that are deprecated *as of* 2.0 :)
|
||||||
|
warnings.filterwarnings(
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -26,6 +26,15 @@ License: MIT
|
|||||||
URL: http://www.sqlalchemy.org/
|
URL: http://www.sqlalchemy.org/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{srcversion}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{srcversion}.tar.gz
|
||||||
|
|
||||||
|
# SQLAlchemy fails with Python 3.10.0b1 due to DeprecationWarnings treated as an error.
|
||||||
|
# There are two different warnings filtered out:
|
||||||
|
# DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
|
||||||
|
# Upstream report: https://github.com/sqlalchemy/sqlalchemy/issues/6540
|
||||||
|
# DeprecationWarning: There is no current event loop
|
||||||
|
# Upstream report: https://github.com/sqlalchemy/sqlalchemy/issues/6537
|
||||||
|
# Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1959305
|
||||||
|
Patch1: 0001-filter-out-DeprecationWarnings.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: python3-devel >= 3.6
|
BuildRequires: python3-devel >= 3.6
|
||||||
BuildRequires: python3-greenlet >= 1.0
|
BuildRequires: python3-greenlet >= 1.0
|
||||||
@ -71,11 +80,12 @@ domain.
|
|||||||
This package includes the python 3 version of the module.
|
This package includes the python 3 version of the module.
|
||||||
|
|
||||||
# Subpackages to ensure dependencies enabling extra functionality
|
# Subpackages to ensure dependencies enabling extra functionality
|
||||||
%{?python_extras_subpkg:%python_extras_subpkg -n python3-sqlalchemy -i %{python3_sitelib}/*.egg-info %python_pkg_extras}
|
%{?python_extras_subpkg:%python_extras_subpkg -n python3-sqlalchemy -i %{python3_sitearch}/*.egg-info %python_pkg_extras}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{srcversion}
|
%setup -q -n %{srcname}-%{srcversion}
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
# Remove flag for pytest-xdist. (python2-pytest-xdist is a removed dependency.)
|
# Remove flag for pytest-xdist. (python2-pytest-xdist is a removed dependency.)
|
||||||
# (--max-worker-restart=5 would end the test run after 5 crashing tests.)
|
# (--max-worker-restart=5 would end the test run after 5 crashing tests.)
|
||||||
@ -91,7 +101,11 @@ sed -i -e's/\(addopts = .*\) --max-worker-restart=5/\1/' setup.cfg
|
|||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=. %{__python3} -m pytest test \
|
# One test is disabled due to compatibility issue with Python 3.10, once it is fixed it
|
||||||
|
# can be enabled again.
|
||||||
|
# Upstream report: https://github.com/sqlalchemy/sqlalchemy/issues/6543
|
||||||
|
# Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1959305
|
||||||
|
PYTHONPATH=. %{__python3} -m pytest test -k "not test_error_other_loop" \
|
||||||
%if %{with xdist}
|
%if %{with xdist}
|
||||||
--numprocesses=auto
|
--numprocesses=auto
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user