Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
# The forced pytest versions correspond with the lower bounds in tox.ini
pytest-version: ['', '--force-dep pytest==4.6', '--force-dep pytest==6.2.4']
include:
- os: 'ubuntu-20.04'
python-version: '3.6'
- os: 'ubuntu-22.04'
python-version: '3.7'
- os: 'ubuntu-22.04'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py3-plus]
args: [--py37-plus]

- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
Expand Down
2 changes: 1 addition & 1 deletion pytest_localserver/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __bool__(self):
def _encode_chunk(chunk, charset):
if isinstance(chunk, str):
chunk = chunk.encode(charset)
return "{:x}".format(len(chunk)).encode(charset) + b"\r\n" + chunk + b"\r\n"
return f"{len(chunk):x}".encode(charset) + b"\r\n" + chunk + b"\r\n"


class ContentServer(WSGIServer):
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run(self):
long_description=read("README.rst"),
url="https://github.com/pytest-dev/pytest-localserver",
packages=["pytest_localserver"],
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=["werkzeug>=0.10"],
extras_require={
"smtp": [
Expand All @@ -59,7 +59,6 @@ def run(self):
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _format_chunk(chunk):
if len(r) <= 40:
return r
else:
return r[:13] + "..." + r[-14:] + " (length {})".format(len(chunk))
return r[:13] + "..." + r[-14:] + f" (length {len(chunk)})"


def _compare_chunks(expected, actual):
Expand All @@ -252,7 +252,7 @@ def _compare_chunks(expected, actual):
for i, (e, a) in enumerate(itertools.zip_longest(expected, actual, fillvalue="<end>")):
if e != a:
message += [
" Chunks differ at index {}:".format(i),
f" Chunks differ at index {i}:",
" Expected: " + (repr(expected[i : i + 5]) + "..." if e != "<end>" else "<end>"),
" Found: " + (repr(actual[i : i + 5]) + "..." if a != "<end>" else "<end>"),
]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{36,37,38,39,310,311,312,313,py3}{,-smtp},lint
envlist = py{37,38,39,310,311,312,313,py3}{,-smtp},lint
recreate = True
isolated_build = True

Expand Down