Skip to content

Commit 4731bf3

Browse files
authored
Merge pull request #88 from pytest-dev/drop-py35-support/1/dev
Drop Python 3.5 support
2 parents 28c8749 + 0f88e67 commit 4731bf3

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ jobs:
2121
# The forced pytest versions correspond with the lower bounds in tox.ini
2222
pytest-version: ['', '--force-dep pytest==4', '--force-dep pytest==6.2.4']
2323
include:
24-
- os: 'ubuntu-20.04'
25-
python-version: '3.5'
26-
pytest-version: ''
27-
- os: 'ubuntu-20.04'
28-
python-version: '3.5'
29-
pytest-version: '--force-dep pytest==4'
3024
- os: 'ubuntu-20.04'
3125
python-version: '3.6'
3226
exclude:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ build-backend = "setuptools.build_meta"
66
write_to = "pytest_localserver/_version.py"
77

88
[tool.black]
9-
target-version = ['py35']
9+
target-version = ['py36']
1010
line-length = 120

pytest_localserver/smtp.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@ def is_alive(self):
9595

9696
@property
9797
def accepting(self):
98-
try:
99-
return self.server.is_serving()
100-
except AttributeError:
101-
# asyncio.base_events.Server.is_serving() only exists in Python 3.6
102-
# and up. For Python 3.5, asyncio.base_events.BaseEventLoop.is_running()
103-
# is a close approximation; it should mostly return the same value
104-
# except for brief periods when the server is starting up or shutting
105-
# down. Once we drop support for Python 3.5, this branch becomes
106-
# unnecessary.
107-
return self.loop.is_running()
98+
return self.server.is_serving()
10899

109100
# for aiosmtpd <1.4
110101
if not hasattr(aiosmtpd.controller.Controller, "_trigger_server"):

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def run(self):
3838
long_description=read("README.rst"),
3939
url="https://github.com/pytest-dev/pytest-localserver",
4040
packages=["pytest_localserver"],
41-
python_requires=">=3.5",
41+
python_requires=">=3.6",
4242
install_requires=["werkzeug>=0.10"],
4343
extras_require={
4444
"smtp": [
@@ -59,7 +59,6 @@ def run(self):
5959
"License :: OSI Approved :: MIT License",
6060
"Programming Language :: Python :: 3",
6161
"Programming Language :: Python :: 3 :: Only",
62-
"Programming Language :: Python :: 3.5",
6362
"Programming Language :: Python :: 3.6",
6463
"Programming Language :: Python :: 3.7",
6564
"Programming Language :: Python :: 3.8",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{35,36,37,38,39,310,311,312,py3}{,-smtp},lint
2+
envlist = py{36,37,38,39,310,311,312,py3}{,-smtp},lint
33
recreate = True
44
isolated_build = True
55

0 commit comments

Comments
 (0)