Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pytest-asyncio for 
openSUSE:Factory checked in at 2021-10-20 20:23:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-asyncio (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-asyncio.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-asyncio"

Wed Oct 20 20:23:06 2021 rev:8 rq:926285 version:0.16.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-asyncio/python-pytest-asyncio.changes  
    2021-07-10 22:54:11.807900104 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-asyncio.new.1890/python-pytest-asyncio.changes
    2021-10-20 20:23:39.365354808 +0200
@@ -1,0 +2,8 @@
+Sun Oct 17 13:20:44 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 0.16.0
+  * Add support for Python 3.10
+- Drop 0001-removed-support-for-python-3.5.patch not required by
+  fakeredis 1.6.0 anymore
+
+-------------------------------------------------------------------

Old:
----
  0001-removed-support-for-python-3.5.patch
  pytest-asyncio-0.15.1.tar.gz

New:
----
  pytest-asyncio-0.16.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-asyncio.spec ++++++
--- /var/tmp/diff_new_pack.Cym3rF/_old  2021-10-20 20:23:39.885355129 +0200
+++ /var/tmp/diff_new_pack.Cym3rF/_new  2021-10-20 20:23:39.885355129 +0200
@@ -19,13 +19,12 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python3-%{**}}
 Name:           python-pytest-asyncio
-Version:        0.15.1
+Version:        0.16.0
 Release:        0
 Summary:        Pytest support for asyncio
 License:        Apache-2.0
 URL:            https://github.com/pytest-dev/pytest-asyncio
 Source:         
https://github.com/pytest-dev/pytest-asyncio/archive/v%{version}.tar.gz#/pytest-asyncio-%{version}.tar.gz
-Patch0:         0001-removed-support-for-python-3.5.patch
 BuildRequires:  %{python_module async_generator >= 1.3}
 BuildRequires:  %{python_module base >= 3.6}
 BuildRequires:  %{python_module hypothesis >= 5.7.1}
@@ -46,8 +45,6 @@
 
 %prep
 %setup -q -n pytest-asyncio-%{version}
-sed -ie '1i# -*- coding: utf-8 -*-' setup.py
-%patch0 -p1 -R
 
 %build
 %python_build

++++++ pytest-asyncio-0.15.1.tar.gz -> pytest-asyncio-0.16.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/.github/workflows/main.yml 
new/pytest-asyncio-0.16.0/.github/workflows/main.yml
--- old/pytest-asyncio-0.15.1/.github/workflows/main.yml        2021-04-22 
01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/.github/workflows/main.yml        2021-10-16 
01:28:39.000000000 +0200
@@ -13,11 +13,11 @@
     name: "Python ${{ matrix.python-version }}"
     runs-on: "ubuntu-latest"
     env:
-      USING_COVERAGE: "3.6,3.7,3.8,3.9"
+      USING_COVERAGE: "3.6,3.7,3.8,3.9,3.10"
 
     strategy:
       matrix:
-        python-version: ["3.6", "3.7", "3.8", "3.9"]
+        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10-dev"]
 
     steps:
       - uses: "actions/checkout@v2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/Makefile 
new/pytest-asyncio-0.16.0/Makefile
--- old/pytest-asyncio-0.15.1/Makefile  2021-04-22 01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/Makefile  2021-10-16 01:28:39.000000000 +0200
@@ -1,4 +1,4 @@
-.PHONY: clean clean-build clean-pyc clean-test lint
+.PHONY: clean clean-build clean-pyc clean-test lint test
 
 clean: clean-build clean-pyc clean-test ## remove all build, test, coverage 
and Python artifacts
 
@@ -23,3 +23,6 @@
 lint: ## check style with flake8
        flake8 pytest_asyncio tests
        black --check --verbose pytest_asyncio tests
+
+test:
+       pytest tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/README.rst 
new/pytest-asyncio-0.16.0/README.rst
--- old/pytest-asyncio-0.15.1/README.rst        2021-04-22 01:04:04.000000000 
+0200
+++ new/pytest-asyncio-0.16.0/README.rst        2021-10-16 01:28:39.000000000 
+0200
@@ -164,6 +164,10 @@
 
 Changelog
 ---------
+0.16.0 (2021-10-16)
+~~~~~~~~~~~~~~~~~~~
+- Add support for Python 3.10
+
 0.15.1 (2021-04-22)
 ~~~~~~~~~~~~~~~~~~~
 - Hotfix for errors while closing event loops while replacing them.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/pytest_asyncio/__init__.py 
new/pytest-asyncio-0.16.0/pytest_asyncio/__init__.py
--- old/pytest-asyncio-0.15.1/pytest_asyncio/__init__.py        2021-04-22 
01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/pytest_asyncio/__init__.py        2021-10-16 
01:28:39.000000000 +0200
@@ -1,2 +1,2 @@
 """The main point for importing pytest-asyncio items."""
-__version__ = "0.15.1"
+__version__ = "0.16.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/setup.py 
new/pytest-asyncio-0.16.0/setup.py
--- old/pytest-asyncio-0.15.1/setup.py  2021-04-22 01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/setup.py  2021-10-16 01:28:39.000000000 +0200
@@ -37,6 +37,7 @@
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         "Topic :: Software Development :: Testing",
         "Framework :: Pytest",
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-asyncio-0.15.1/tests/async_fixtures/test_async_fixtures_with_finalizer.py
 
new/pytest-asyncio-0.16.0/tests/async_fixtures/test_async_fixtures_with_finalizer.py
--- 
old/pytest-asyncio-0.15.1/tests/async_fixtures/test_async_fixtures_with_finalizer.py
        2021-04-22 01:04:04.000000000 +0200
+++ 
new/pytest-asyncio-0.16.0/tests/async_fixtures/test_async_fixtures_with_finalizer.py
        2021-10-16 01:28:39.000000000 +0200
@@ -44,11 +44,14 @@
 async def port_with_get_event_loop_finalizer(request, event_loop):
     def port_finalizer(finalizer):
         async def port_afinalizer():
-            # await task using loop provided by asyncio.get_event_loop()
-            # RuntimeError is raised if task is created on a different loop
+            # await task using current loop retrieved from the event loop 
policy
+            # RuntimeError is raised if task is created on a different loop.
+            # This can happen when pytest_fixture_setup does not set up the 
loop correctly,
+            # for example when policy.set_event_loop() is called with a wrong 
argument
             await finalizer
 
-        asyncio.get_event_loop().run_until_complete(port_afinalizer())
+        current_loop = asyncio.get_event_loop_policy().get_event_loop()
+        current_loop.run_until_complete(port_afinalizer())
 
     worker = asyncio.ensure_future(asyncio.sleep(0.2))
     request.addfinalizer(functools.partial(port_finalizer, worker))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-asyncio-0.15.1/tests/async_fixtures/test_coroutine_fixtures.py 
new/pytest-asyncio-0.16.0/tests/async_fixtures/test_coroutine_fixtures.py
--- old/pytest-asyncio-0.15.1/tests/async_fixtures/test_coroutine_fixtures.py   
2021-04-22 01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/tests/async_fixtures/test_coroutine_fixtures.py   
1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-import asyncio
-import unittest.mock
-
-import pytest
-
-START = object()
-END = object()
-RETVAL = object()
-
-pytestmark = pytest.mark.skip(
-    reason="@asyncio.coroutine fixtures are not supported yet"
-)
-
-
-@pytest.fixture
-def mock():
-    return unittest.mock.Mock(return_value=RETVAL)
-
-
-@pytest.fixture
-async def coroutine_fixture(mock):
-    await asyncio.sleep(0.1, result=mock(START))
-
-
-@pytest.mark.asyncio
-async def test_coroutine_fixture(coroutine_fixture, mock):
-    assert mock.call_count == 1
-    assert mock.call_args_list[-1] == unittest.mock.call(START)
-    assert coroutine_fixture is RETVAL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/tests/test_event_loop_scope.py 
new/pytest-asyncio-0.16.0/tests/test_event_loop_scope.py
--- old/pytest-asyncio-0.15.1/tests/test_event_loop_scope.py    2021-04-22 
01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/tests/test_event_loop_scope.py    2021-10-16 
01:28:39.000000000 +0200
@@ -1,4 +1,4 @@
-"""Test the event loop fixture is properly disposed of.
+"""Test the event loop fixture provides a separate loop for each test.
 
 These tests need to be run together.
 """
@@ -6,17 +6,26 @@
 
 import pytest
 
+loop: asyncio.AbstractEventLoop
+
 
 def test_1():
-    loop = asyncio.get_event_loop()
-    assert not loop.is_closed()
+    global loop
+    # The main thread should have a default event loop.
+    loop = asyncio.get_event_loop_policy().get_event_loop()
 
 
 @pytest.mark.asyncio
 async def test_2():
-    pass
+    global loop
+    running_loop = asyncio.get_event_loop_policy().get_event_loop()
+    # Make sure this test case received a different loop
+    assert running_loop is not loop
+    loop = running_loop  # Store the loop reference for later
 
 
 def test_3():
-    loop = asyncio.get_event_loop()
-    assert not loop.is_closed()
+    global loop
+    current_loop = asyncio.get_event_loop_policy().get_event_loop()
+    # Now the event loop from test_2 should have been cleaned up
+    assert loop is not current_loop
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-asyncio-0.15.1/tests/test_hypothesis_integration.py 
new/pytest-asyncio-0.16.0/tests/test_hypothesis_integration.py
--- old/pytest-asyncio-0.15.1/tests/test_hypothesis_integration.py      
2021-04-22 01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/tests/test_hypothesis_integration.py      
2021-10-16 01:28:39.000000000 +0200
@@ -10,8 +10,9 @@
 
 @pytest.fixture(scope="module")
 def event_loop():
-    loop = asyncio.get_event_loop()
+    loop = asyncio.get_event_loop_policy().new_event_loop()
     yield loop
+    loop.close()
 
 
 @given(st.integers())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/tests/test_simple.py 
new/pytest-asyncio-0.16.0/tests/test_simple.py
--- old/pytest-asyncio-0.15.1/tests/test_simple.py      2021-04-22 
01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/tests/test_simple.py      2021-10-16 
01:28:39.000000000 +0200
@@ -99,27 +99,18 @@
     assert unused_tcp_port_factory() > 10000
 
 
-class Test:
-    """Test that asyncio marked functions work in test methods."""
+class TestMarkerInClassBasedTests:
+    """Test that asyncio marked functions work for methods of test classes."""
 
     @pytest.mark.asyncio
-    async def test_asyncio_marker_method(self, event_loop):
-        """Test the asyncio pytest marker in a Test class."""
+    async def test_asyncio_marker_with_explicit_loop_fixture(self, event_loop):
+        """Test the "asyncio" marker works on a method in a class-based test 
with explicit loop fixture."""
         ret = await async_coro()
         assert ret == "ok"
 
-
-class TestUnexistingLoop:
-    @pytest.fixture
-    def remove_loop(self):
-        old_loop = asyncio.get_event_loop()
-        asyncio.set_event_loop(None)
-        yield
-        asyncio.set_event_loop(old_loop)
-
     @pytest.mark.asyncio
-    async def test_asyncio_marker_without_loop(self, remove_loop):
-        """Test the asyncio pytest marker in a Test class."""
+    async def test_asyncio_marker_with_implicit_loop_fixture(self):
+        """Test the "asyncio" marker works on a method in a class-based test 
with implicit loop fixture."""
         ret = await async_coro()
         assert ret == "ok"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-asyncio-0.15.1/tox.ini 
new/pytest-asyncio-0.16.0/tox.ini
--- old/pytest-asyncio-0.15.1/tox.ini   2021-04-22 01:04:04.000000000 +0200
+++ new/pytest-asyncio-0.16.0/tox.ini   2021-10-16 01:28:39.000000000 +0200
@@ -1,6 +1,6 @@
 [tox]
 minversion = 3.14.0
-envlist = py36, py37, py38, py39, lint
+envlist = py36, py37, py38, py39, py310, lint
 skip_missing_interpreters = true
 
 [testenv]
@@ -30,4 +30,5 @@
     3.7: py37
     3.8: py38
     3.9: py39, lint
+    3.10: py310
     pypy3: pypy3

Reply via email to