Skip to content

Commit 4e6c033

Browse files
authored
Merge pull request #113 from hugovk/rm-3.6
Drop support for EOL Python 3.6
2 parents 4e11593 + 06495a1 commit 4e6c033

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

.github/workflows/tests.yml

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
# The forced pytest versions correspond with the lower bounds in tox.ini
2222
pytest-version: ['', '--force-dep pytest==4.6', '--force-dep pytest==6.2.4']
2323
include:
24-
- os: 'ubuntu-20.04'
25-
python-version: '3.6'
2624
- os: 'ubuntu-22.04'
2725
python-version: '3.7'
2826
- os: 'ubuntu-22.04'

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ repos:
4040
rev: v3.19.1
4141
hooks:
4242
- id: pyupgrade
43-
args: [--py3-plus]
43+
args: [--py37-plus]
4444

4545
- repo: https://github.com/rhysd/actionlint
4646
rev: v1.7.7

pytest_localserver/http.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __bool__(self):
5656
def _encode_chunk(chunk, charset):
5757
if isinstance(chunk, str):
5858
chunk = chunk.encode(charset)
59-
return "{:x}".format(len(chunk)).encode(charset) + b"\r\n" + chunk + b"\r\n"
59+
return f"{len(chunk):x}".encode(charset) + b"\r\n" + chunk + b"\r\n"
6060

6161

6262
class ContentServer(WSGIServer):

setup.py

+1-2
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.6",
41+
python_requires=">=3.7",
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.6",
6362
"Programming Language :: Python :: 3.7",
6463
"Programming Language :: Python :: 3.8",
6564
"Programming Language :: Python :: 3.9",

tests/test_http.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _format_chunk(chunk):
241241
if len(r) <= 40:
242242
return r
243243
else:
244-
return r[:13] + "..." + r[-14:] + " (length {})".format(len(chunk))
244+
return r[:13] + "..." + r[-14:] + f" (length {len(chunk)})"
245245

246246

247247
def _compare_chunks(expected, actual):
@@ -252,7 +252,7 @@ def _compare_chunks(expected, actual):
252252
for i, (e, a) in enumerate(itertools.zip_longest(expected, actual, fillvalue="<end>")):
253253
if e != a:
254254
message += [
255-
" Chunks differ at index {}:".format(i),
255+
f" Chunks differ at index {i}:",
256256
" Expected: " + (repr(expected[i : i + 5]) + "..." if e != "<end>" else "<end>"),
257257
" Found: " + (repr(actual[i : i + 5]) + "..." if a != "<end>" else "<end>"),
258258
]

tox.ini

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

0 commit comments

Comments
 (0)