From 2e66d0256cc7b056c7b0a79263ffce66fd2e3e22a24cb1ce6b845104688923cf Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 19 Oct 2021 11:58:30 +0000 Subject: [PATCH] Accepting request 925838 from home:bnavigator:branches:devel:languages:python:pytest - 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.1 anymore OBS-URL: https://build.opensuse.org/request/show/925838 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-asyncio?expand=0&rev=16 --- 0001-removed-support-for-python-3.5.patch | 188 ---------------------- pytest-asyncio-0.15.1.tar.gz | 3 - pytest-asyncio-0.16.0.tar.gz | 3 + python-pytest-asyncio.changes | 8 + python-pytest-asyncio.spec | 5 +- 5 files changed, 12 insertions(+), 195 deletions(-) delete mode 100644 0001-removed-support-for-python-3.5.patch delete mode 100644 pytest-asyncio-0.15.1.tar.gz create mode 100644 pytest-asyncio-0.16.0.tar.gz diff --git a/0001-removed-support-for-python-3.5.patch b/0001-removed-support-for-python-3.5.patch deleted file mode 100644 index 77938a1..0000000 --- a/0001-removed-support-for-python-3.5.patch +++ /dev/null @@ -1,188 +0,0 @@ -From 057562f8aaf9f18d97326a86dbdb9587e866bfe0 Mon Sep 17 00:00:00 2001 -From: Michael Seifert -Date: Tue, 6 Oct 2020 11:00:21 +0200 -Subject: [PATCH] feat!: Removed support for Python 3.5. - -This commit: -- Removes Python 3.5 from the tested environments in CI and tox -- Removes instructions specific to Python 3.5 from the README -- Updates the Changelog -- Removes the dependency on async_generator -- Removes instructions in conftest that skip certain test cases if the Python version is smaller than 3.6 - -Signed-off-by: Michael Seifert ---- - .travis.yml | 2 - - README.rst | 14 +------ - pytest_asyncio/plugin.py | 5 +-- - setup.py | 5 +-- - .../test_async_gen_fixtures_35.py | 40 ------------------- - tests/conftest.py | 6 --- - tox.ini | 2 +- - 7 files changed, 4 insertions(+), 70 deletions(-) - delete mode 100644 tests/async_fixtures/test_async_gen_fixtures_35.py - -#diff --git a/.travis.yml b/.travis.yml -#index db43fef..a19d5d7 100644 -#--- a/.travis.yml -#+++ b/.travis.yml -#@@ -2,8 +2,6 @@ language: python -# -# matrix: -# include: -#- - python: 3.5 -#- env: TOX_ENV=py35 -# - python: 3.6 -# env: TOX_ENV=py36 -# - python: 3.7 -#diff --git a/README.rst b/README.rst -#index 64698c6..2f282b5 100644 -#--- a/README.rst -#+++ b/README.rst -#@@ -127,19 +127,6 @@ to redefine the ``event_loop`` fixture to have the same or broader scope. -# Async fixtures need the event loop, and so must have the same or narrower scope -# than the ``event_loop`` fixture. -# -#-If you want to do this with Python 3.5, the ``yield`` statement must be replaced with ``await yield_()`` and the coroutine -#-function must be decorated with ``@async_generator``, like so: -#- -#-.. code-block:: python3 -#- -#- from async_generator import yield_, async_generator -#- -#- @pytest.fixture -#- @async_generator -#- async def async_gen_fixture(): -#- await asyncio.sleep(0.1) -#- await yield_('a value') -#- -# -# Markers -# ------- -#@@ -178,6 +165,7 @@ Changelog -# 0.15.0 (UNRELEASED) -# ~~~~~~~~~~~~~~~~~~~ -# - Add support for Python 3.9 -#+- Abandon support for Python 3.5. If you still require support for Python 3.5, please use pytest-asyncio v0.14 or earlier. -# -# 0.14.0 (2020-06-24) -# ~~~~~~~~~~~~~~~~~~~ -diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py -index 2fdc5f4..4b7d6fd 100644 ---- a/pytest_asyncio/plugin.py -+++ b/pytest_asyncio/plugin.py -@@ -13,10 +13,7 @@ def transfer_markers(*args, **kwargs): # noqa - pass - - --try: -- from async_generator import isasyncgenfunction --except ImportError: -- from inspect import isasyncgenfunction -+from inspect import isasyncgenfunction - - - def _is_coroutine(obj): -diff --git a/setup.py b/setup.py -index ff3855c..2df6fae 100644 ---- a/setup.py -+++ b/setup.py -@@ -33,7 +33,6 @@ def find_version(): - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", -- "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", -@@ -41,13 +40,11 @@ def find_version(): - "Topic :: Software Development :: Testing", - "Framework :: Pytest", - ], -- python_requires=">= 3.5", -+ python_requires=">= 3.6", - install_requires=["pytest >= 5.4.0"], - extras_require={ -- ':python_version == "3.5"': "async_generator >= 1.3", - "testing": [ - "coverage", -- "async_generator >= 1.3", - "hypothesis >= 5.7.1", - ], - }, -#diff --git a/tests/async_fixtures/test_async_gen_fixtures_35.py b/tests/async_fixtures/test_async_gen_fixtures_35.py -#deleted file mode 100644 -#index 3b552fa..0000000 -#--- a/tests/async_fixtures/test_async_gen_fixtures_35.py -#+++ /dev/null -#@@ -1,40 +0,0 @@ -#-import unittest.mock -#- -#-import pytest -#-from async_generator import yield_, async_generator -#- -#-START = object() -#-END = object() -#-RETVAL = object() -#- -#- -#-@pytest.fixture(scope='module') -#-def mock(): -#- return unittest.mock.Mock(return_value=RETVAL) -#- -#- -#-@pytest.fixture -#-@async_generator -#-async def async_gen_fixture(mock): -#- try: -#- await yield_(mock(START)) -#- except Exception as e: -#- mock(e) -#- else: -#- mock(END) -#- -#- -#-@pytest.mark.asyncio -#-async def test_async_gen_fixture(async_gen_fixture, mock): -#- assert mock.called -#- assert mock.call_args_list[-1] == unittest.mock.call(START) -#- assert async_gen_fixture is RETVAL -#- -#- -#-@pytest.mark.asyncio -#-async def test_async_gen_fixture_finalized(mock): -#- try: -#- assert mock.called -#- assert mock.call_args_list[-1] == unittest.mock.call(END) -#- finally: -#- mock.reset_mock() -#diff --git a/tests/conftest.py b/tests/conftest.py -#index cc2ec16..1ca63fe 100644 -#--- a/tests/conftest.py -#+++ b/tests/conftest.py -#@@ -1,13 +1,7 @@ -# import asyncio -#-import sys -# -# import pytest -# -#-collect_ignore = [] -#-if sys.version_info[:2] < (3, 6): -#- collect_ignore.append("async_fixtures/test_async_gen_fixtures_36.py") -#- collect_ignore.append("async_fixtures/test_nested_36.py") -#- -# -# @pytest.fixture -# def dependent_fixture(event_loop): -#diff --git a/tox.ini b/tox.ini -#index 6cc4a82..f739cc5 100644 -#--- a/tox.ini -#+++ b/tox.ini -#@@ -1,6 +1,6 @@ -# [tox] -# minversion = 3.14.0 -#-envlist = py35, py36, py37, py38, py39 -#+envlist = py36, py37, py38, py39 -# skip_missing_interpreters = true -# -# [testenv] diff --git a/pytest-asyncio-0.15.1.tar.gz b/pytest-asyncio-0.15.1.tar.gz deleted file mode 100644 index 643e532..0000000 --- a/pytest-asyncio-0.15.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8c0f2bd36c3a0c03b9fbf707be03e8316019e32333a704d09309e8459ed7ffe -size 15653 diff --git a/pytest-asyncio-0.16.0.tar.gz b/pytest-asyncio-0.16.0.tar.gz new file mode 100644 index 0000000..d5dbeb9 --- /dev/null +++ b/pytest-asyncio-0.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cc3c93f340185a9128dc1f3fcf6c57ad0bfb704c5b6ce425a3ab0ddbb875bb9 +size 15819 diff --git a/python-pytest-asyncio.changes b/python-pytest-asyncio.changes index 0215fe9..c63edcb 100644 --- a/python-pytest-asyncio.changes +++ b/python-pytest-asyncio.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Oct 17 13:20:44 UTC 2021 - Ben Greiner + +- 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 + ------------------------------------------------------------------- Mon Jul 5 08:38:37 UTC 2021 - Antonio Larrosa diff --git a/python-pytest-asyncio.spec b/python-pytest-asyncio.spec index 87d78ac..f5117c0 100644 --- a/python-pytest-asyncio.spec +++ b/python-pytest-asyncio.spec @@ -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 @@ provides useful fixtures and markers to make testing easier. %prep %setup -q -n pytest-asyncio-%{version} -sed -ie '1i# -*- coding: utf-8 -*-' setup.py -%patch0 -p1 -R %build %python_build