Skip to content

Commit 41fcf25

Browse files
authored
Add pytest-rerunfailures for flaky tests; Python 3.14 (#29)
* Add pytest-rerunfailures for flaky tests; drop Python 3.8 and add Python 3.14 * Update test matrix --------- Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
1 parent 4b9c32c commit 41fcf25

6 files changed

Lines changed: 555 additions & 1088 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ jobs:
4040
strategy:
4141
matrix:
4242
os: [ubuntu-latest, macos-latest, windows-latest]
43-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
43+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
4444
defaults:
4545
run:
4646
shell: bash
47+
env:
48+
RETRY_FLAKY_TESTS: ${{ github.event_name == 'schedule' && '1' || '' }}
4749

4850
steps:
4951
- name: Disable git auto-CRLF for Windows

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release Notes
22

3+
## v2.2.0 - 2025-10-01
4+
5+
- Removed support for Python 3.8
6+
- Added support for Python 3.14
7+
38
## v2.1.0 - 2025-04-02
49

510
- Removed support for Python 3.7

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test *args:
3030

3131
# Run all tests with Python version matrix
3232
test-all:
33-
for python in 3.8 3.9 3.10 3.11 3.12 3.13; do \
33+
for python in 3.9 3.10 3.11 3.12 3.13 3.14; do \
3434
just python=$python test; \
3535
done
3636

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "quickhttp"
3-
version = "2.1.0"
3+
version = "2.2.0"
44
description = "Lightweight CLI that wraps Python's http.server with automatic port-finding and shutdown."
55
readme = "README.md"
66
license = "MIT"
@@ -9,10 +9,17 @@ authors = [{ name = "Jay Qi", email = "jayqi.opensource@gmail.com" }]
99
keywords = ["http server", "dev server"]
1010
classifiers = [
1111
"Operating System :: OS Independent",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.9",
14+
"Programming Language :: Python :: 3.10",
15+
"Programming Language :: Python :: 3.11",
16+
"Programming Language :: Python :: 3.12",
17+
"Programming Language :: Python :: 3.13",
18+
"Programming Language :: Python :: 3.14",
1219
"Intended Audience :: Developers",
1320
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
1421
]
15-
requires-python = ">=3.8"
22+
requires-python = ">=3.9"
1623
dependencies = [
1724
"pytimeparse>=1.1.8",
1825
"typer>=0.3.0",
@@ -53,6 +60,7 @@ test = [
5360
"pytest>=7.2",
5461
"coverage>=7.1",
5562
"pytest-cov>=4.0",
63+
"pytest-rerunfailures",
5664
"requests",
5765
]
5866
typecheck = [

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def test_quickhttp_with_port(html_file, tmp_path):
154154
assert response.text == fp.read()
155155

156156

157+
@pytest.mark.flaky(reruns=1, reruns_delay=1, condition=os.getenv("RETRY_FLAKY_TESTS", "") == "1")
157158
def test_keyboard_interrupt(html_file, tmp_path):
158159
shutil.copy(html_file, tmp_path)
159160
port = find_available_port()

0 commit comments

Comments
 (0)