Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-aiofiles for
openSUSE:Factory checked in at 2021-01-19 16:02:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-aiofiles (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-aiofiles.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-aiofiles"
Tue Jan 19 16:02:56 2021 rev:2 rq:864172 version:0.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-aiofiles/python-pytest-aiofiles.changes
2020-08-20 22:30:17.268022265 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-aiofiles.new.28504/python-pytest-aiofiles.changes
2021-01-19 16:03:52.567532019 +0100
@@ -1,0 +2,5 @@
+Mon Jan 18 21:52:58 UTC 2021 - Benjamin Greiner <[email protected]>
+
+- add patch remove-asynctest-py38.patch gh#buhman/pytest-aiofiles#4
+
+-------------------------------------------------------------------
New:
----
remove-asynctest-py38.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-aiofiles.spec ++++++
--- /var/tmp/diff_new_pack.K1DeJS/_old 2021-01-19 16:03:53.199532970 +0100
+++ /var/tmp/diff_new_pack.K1DeJS/_new 2021-01-19 16:03:53.203532976 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-aiofiles
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
Source:
https://files.pythonhosted.org/packages/source/p/pytest-aiofiles/pytest-aiofiles-%{version}.tar.gz
# https://github.com/buhman/pytest-aiofiles/pull/3
Source1: LICENSE
+# PATCH-FIX-UPSTREAM remove-asynctest-py38.patch gh#buhman/pytest-aiofiles#4
+Patch0: remove-asynctest-py38.patch
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -36,9 +38,10 @@
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module aiofiles >= 0.3.1}
-BuildRequires: %{python_module asynctest >= 0.10.0}
BuildRequires: %{python_module pyfakefs >= 3.1}
BuildRequires: %{python_module pytest-asyncio >= 0.5.0}
+BuildRequires: (python3-asynctest >= 0.10.0 if python3-base < 3.8)
+BuildRequires: (python36-asynctest >= 0.10.0 if python36)
# /SECTION
%python_subpackages
@@ -46,7 +49,7 @@
pytest fixtures for writing aiofiles tests with pyfakefs
%prep
-%setup -q -n pytest-aiofiles-%{version}
+%autosetup -p1 -n pytest-aiofiles-%{version}
cp %{SOURCE1} .
%build
@@ -62,6 +65,7 @@
%files %{python_files}
%doc AUTHORS ChangeLog README.rst
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/pytest_aiofiles
+%{python_sitelib}/pytest_aiofiles-%{version}*-info
%changelog
++++++ remove-asynctest-py38.patch ++++++
Index: pytest-aiofiles-0.2.0/tests/test_plugin.py
===================================================================
--- pytest-aiofiles-0.2.0.orig/tests/test_plugin.py
+++ pytest-aiofiles-0.2.0/tests/test_plugin.py
@@ -2,7 +2,13 @@ from io import BufferedReader
import aiofiles
from aiofiles import base, threadpool
-from asynctest import mock
+import sys
+if sys.version < "3.8":
+ # asynctest only supports older pythons
+ from asynctest import mock
+else:
+ # Python 3.8 and later can mock.patch async functions
+ from unittest import mock
from pyfakefs import fake_filesystem
import pytest