Merge remote-tracking branch 'upstream/main' into alex

This commit is contained in:
Alex Manning 2021-12-15 18:33:11 +00:00
commit 3c405430ea
2 changed files with 47 additions and 2 deletions

View file

@ -0,0 +1,42 @@
From 1b7558ed4060acd4ca34a88c7b14ce7da2baab13 Mon Sep 17 00:00:00 2001
From: "Kai A. Hiller" <V02460@gmail.com>
Date: Tue, 14 Dec 2021 18:16:37 +0100
Subject: [PATCH] Remove dependency on non-standard mock
---
setup.py | 4 +---
tests/storage/test_background_update.py | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/setup.py b/setup.py
index 2c6fb9aac..bfca16727 100755
--- a/setup.py
+++ b/setup.py
@@ -119,9 +119,7 @@ CONDITIONAL_REQUIREMENTS["mypy"] = [
# Tests assume that all optional dependencies are installed.
#
# parameterized_class decorator was introduced in parameterized 0.7.0
-#
-# We use `mock` library as that backports `AsyncMock` to Python 3.6
-CONDITIONAL_REQUIREMENTS["test"] = ["parameterized>=0.7.0", "mock>=4.0.0"]
+CONDITIONAL_REQUIREMENTS["test"] = ["parameterized>=0.7.0"]
CONDITIONAL_REQUIREMENTS["dev"] = (
CONDITIONAL_REQUIREMENTS["lint"]
diff --git a/tests/storage/test_background_update.py b/tests/storage/test_background_update.py
index d77c00150..542b70a1e 100644
--- a/tests/storage/test_background_update.py
+++ b/tests/storage/test_background_update.py
@@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Use backported mock for AsyncMock support on Python 3.6.
-from mock import Mock
+from unittest.mock import Mock
from twisted.internet.defer import Deferred, ensureDeferred
--
2.33.1

View file

@ -14,7 +14,7 @@
Name: matrix-%{srcname}
Version: %{ghversion}%{rcv}
Release: 2%{?dist}
Release: 1%{?dist}
Summary: A Matrix reference homeserver written in Python using Twisted
License: ASL 2.0
URL: https://github.com/matrix-org/%{srcname}
@ -26,13 +26,13 @@ Source4: synapse@.service
# non-upstreamable patch to accept any version of python-cryptography, see RHBZ#1978949
Patch1: 0001-relax-cryptography-dependency-version-requirement.patch
Patch2: 0002-Remove-dependency-on-non-standard-mock.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# Test dependencies
BuildRequires: python3-mock >= 2.0
BuildRequires: python3-parameterized >= 0.7.0
BuildRequires: /usr/bin/openssl
@ -155,6 +155,9 @@ exit 0
%changelog
* Tue Dec 14 2021 Kai A. Hiller <V02460@gmail.com> - 1.49.0-1
- Update to v1.49.0
* Tue Nov 30 2021 Kai A. Hiller <V02460@gmail.com> - 1.48.0-1
- Update to v1.48.0