Skip to content

Commit 057562f

Browse files
seifertmTinche
authored andcommitted
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 <[email protected]>
1 parent 03eed51 commit 057562f

File tree

7 files changed

+4
-70
lines changed

7 files changed

+4
-70
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ language: python
22

33
matrix:
44
include:
5-
- python: 3.5
6-
env: TOX_ENV=py35
75
- python: 3.6
86
env: TOX_ENV=py36
97
- python: 3.7

README.rst

+1-13
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,6 @@ to redefine the ``event_loop`` fixture to have the same or broader scope.
127127
Async fixtures need the event loop, and so must have the same or narrower scope
128128
than the ``event_loop`` fixture.
129129

130-
If you want to do this with Python 3.5, the ``yield`` statement must be replaced with ``await yield_()`` and the coroutine
131-
function must be decorated with ``@async_generator``, like so:
132-
133-
.. code-block:: python3
134-
135-
from async_generator import yield_, async_generator
136-
137-
@pytest.fixture
138-
@async_generator
139-
async def async_gen_fixture():
140-
await asyncio.sleep(0.1)
141-
await yield_('a value')
142-
143130

144131
Markers
145132
-------
@@ -178,6 +165,7 @@ Changelog
178165
0.15.0 (UNRELEASED)
179166
~~~~~~~~~~~~~~~~~~~
180167
- Add support for Python 3.9
168+
- Abandon support for Python 3.5. If you still require support for Python 3.5, please use pytest-asyncio v0.14 or earlier.
181169

182170
0.14.0 (2020-06-24)
183171
~~~~~~~~~~~~~~~~~~~

pytest_asyncio/plugin.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ def transfer_markers(*args, **kwargs): # noqa
1313
"""Noop when over pytest 4.1.0"""
1414
pass
1515

16-
try:
17-
from async_generator import isasyncgenfunction
18-
except ImportError:
19-
from inspect import isasyncgenfunction
16+
from inspect import isasyncgenfunction
2017

2118

2219
def _is_coroutine(obj):

setup.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,18 @@ def find_version():
3333
"Development Status :: 4 - Beta",
3434
"Intended Audience :: Developers",
3535
"License :: OSI Approved :: Apache Software License",
36-
"Programming Language :: Python :: 3.5",
3736
"Programming Language :: Python :: 3.6",
3837
"Programming Language :: Python :: 3.7",
3938
"Programming Language :: Python :: 3.8",
4039
"Programming Language :: Python :: 3.9",
4140
"Topic :: Software Development :: Testing",
4241
"Framework :: Pytest",
4342
],
44-
python_requires=">= 3.5",
43+
python_requires=">= 3.6",
4544
install_requires=["pytest >= 5.4.0"],
4645
extras_require={
47-
':python_version == "3.5"': "async_generator >= 1.3",
4846
"testing": [
4947
"coverage",
50-
"async_generator >= 1.3",
5148
"hypothesis >= 5.7.1",
5249
],
5350
},

tests/async_fixtures/test_async_gen_fixtures_35.py

-40
This file was deleted.

tests/conftest.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import asyncio
2-
import sys
32

43
import pytest
54

6-
collect_ignore = []
7-
if sys.version_info[:2] < (3, 6):
8-
collect_ignore.append("async_fixtures/test_async_gen_fixtures_36.py")
9-
collect_ignore.append("async_fixtures/test_nested_36.py")
10-
115

126
@pytest.fixture
137
def dependent_fixture(event_loop):

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.14.0
3-
envlist = py35, py36, py37, py38, py39
3+
envlist = py36, py37, py38, py39
44
skip_missing_interpreters = true
55

66
[testenv]

0 commit comments

Comments
 (0)