pytest-async-benchmark 0.1.1__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/.github/workflows/ci.yml +3 -3
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/.gitignore +1 -0
- pytest_async_benchmark-0.3.0/CHANGELOG.md +81 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/PKG-INFO +408 -69
- pytest_async_benchmark-0.3.0/README.md +823 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/RELEASE_GUIDE.md +1 -1
- pytest_async_benchmark-0.3.0/examples/backwards_compatibility_examples.py +174 -0
- pytest_async_benchmark-0.3.0/examples/marker_syntax_examples.py +124 -0
- pytest_async_benchmark-0.3.0/examples/pedantic_examples.py +86 -0
- pytest_async_benchmark-0.3.0/examples/pytest_asyncio_showcase.py +163 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/examples/pytest_examples.py +33 -20
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/examples/quart_api_comparison.py +1 -1
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/pyproject.toml +7 -2
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/scripts/release-check.py +13 -1
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/__init__.py +1 -1
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/display.py +2 -2
- pytest_async_benchmark-0.3.0/src/pytest_async_benchmark/plugin.py +263 -0
- pytest_async_benchmark-0.3.0/src/pytest_async_benchmark/runner.py +142 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/utils.py +2 -1
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/tests/test_async_bench.py +12 -8
- pytest_async_benchmark-0.3.0/tests/test_async_compatibility.py +80 -0
- pytest_async_benchmark-0.3.0/tests/test_backwards_compatibility.py +84 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/tests/test_demo.py +12 -8
- pytest_async_benchmark-0.3.0/tests/test_marker_functionality.py +53 -0
- pytest_async_benchmark-0.3.0/tests/test_pedantic.py +220 -0
- pytest_async_benchmark-0.3.0/uv.lock +2871 -0
- pytest_async_benchmark-0.1.1/README.md +0 -486
- pytest_async_benchmark-0.1.1/src/pytest_async_benchmark/plugin.py +0 -91
- pytest_async_benchmark-0.1.1/src/pytest_async_benchmark/runner.py +0 -56
- pytest_async_benchmark-0.1.1/uv.lock +0 -1274
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/.github/workflows/release.yml +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/.github/workflows/test-publish.yml +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/.pre-commit-config.yaml +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/LICENSE +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/PYPI_SETUP.md +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/examples/comparison_examples.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/screenshot.png +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/scripts/quality-check.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/analytics.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/comparison.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/src/pytest_async_benchmark/stats.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/tests/conftest.py +0 -0
- {pytest_async_benchmark-0.1.1 → pytest_async_benchmark-0.3.0}/tests/test_comparison.py +0 -0
|
@@ -11,13 +11,13 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
14
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
- uses: actions/checkout@v4
|
|
18
18
|
|
|
19
19
|
- name: Install uv
|
|
20
|
-
uses: astral-sh/setup-uv@
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
21
|
with:
|
|
22
22
|
version: "latest"
|
|
23
23
|
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
|
|
40
40
|
- name: Test examples
|
|
41
41
|
run: |
|
|
42
|
-
uv run python -m pytest examples/pytest_examples.py -v
|
|
42
|
+
uv run python -m pytest examples/pytest_examples.py examples/pedantic_examples.py -v
|
|
43
43
|
uv run python examples/comparison_examples.py
|
|
44
44
|
|
|
45
45
|
- name: Test package build
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to pytest-async-benchmark will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.3.0] - 2026-11-10
|
|
9
|
+
|
|
10
|
+
### 🚀 Major Features
|
|
11
|
+
- **Pedantic Mode**: Added `async_benchmark.pedantic()` (and `AsyncBenchmarkRunner.run_pedantic()`) allowing per-iteration setup and teardown while excluding their duration from benchmark measurements (addresses issue #1)
|
|
12
|
+
- **Flexible Hook Support**: Setup and teardown functions can be synchronous or asynchronous coroutines
|
|
13
|
+
- **Argument Passing**: Return values from `setup` (individual values or unpacked tuples) are passed as arguments to both the target function and `teardown`
|
|
14
|
+
- **Dual Interface Pedantic Support**: Works seamlessly with `await async_benchmark.pedantic(...)` or synchronous `async_benchmark.pedantic(...)`
|
|
15
|
+
|
|
16
|
+
### 🔧 Improvements & Upgrades
|
|
17
|
+
- **Dependency Upgrades**: Upgraded dependencies to latest versions (pytest 9.x, rich 15.x, ruff 0.17.x, aiohttp 3.14.x, quart 0.23.x, pre-commit 4.7.x)
|
|
18
|
+
- **Modern Python Compatibility**: Fixed `asyncio.iscoroutinefunction` deprecations slated for removal in Python 3.16 by switching to `inspect.iscoroutinefunction` across all modules
|
|
19
|
+
- **Pytest-Asyncio v1.x Compatibility**: Added explicit `asyncio_mode = "auto"` and `asyncio_default_fixture_loop_scope = "function"` configuration in `pyproject.toml`
|
|
20
|
+
- **CI Matrix**: Extended GitHub Actions CI matrix to test on Python 3.13
|
|
21
|
+
|
|
22
|
+
## [0.2.0] - 2025-05-28
|
|
23
|
+
|
|
24
|
+
### 🚀 Major Features
|
|
25
|
+
- **Backwards Compatibility**: Automatic interface detection supporting both sync and async usage patterns
|
|
26
|
+
- **pytest-asyncio Integration**: Full compatibility with pytest-asyncio plugin when available
|
|
27
|
+
- **Dual Interface Support**: Works with `await async_benchmark(...)` (with pytest-asyncio) or `result = async_benchmark(...)` (without)
|
|
28
|
+
- **Smart Detection**: Automatically detects pytest-asyncio availability and provides appropriate interface
|
|
29
|
+
|
|
30
|
+
### ✨ Added
|
|
31
|
+
- Automatic pytest-asyncio detection and interface switching
|
|
32
|
+
- Legacy sync interface support for backwards compatibility with v0.1.x
|
|
33
|
+
- Optional dependency configuration for pytest-asyncio
|
|
34
|
+
- Comprehensive backwards compatibility test suite
|
|
35
|
+
- `_SyncResultWrapper` class for seamless sync interface
|
|
36
|
+
- Enhanced documentation covering both usage patterns
|
|
37
|
+
|
|
38
|
+
### 🔧 Changed
|
|
39
|
+
- **NON-BREAKING**: pytest-asyncio moved from required to optional dependency
|
|
40
|
+
- `AsyncBenchmarkFixture.__call__` now returns different types based on environment
|
|
41
|
+
- Enhanced fixture to support both sync and async interfaces automatically
|
|
42
|
+
- Updated examples to show both usage patterns
|
|
43
|
+
- README updated with backwards compatibility documentation
|
|
44
|
+
|
|
45
|
+
### 🛠️ Fixed
|
|
46
|
+
- RuntimeError issues when pytest-asyncio not available
|
|
47
|
+
- Event loop management conflicts in different environments
|
|
48
|
+
- Compatibility issues with projects not using pytest-asyncio
|
|
49
|
+
|
|
50
|
+
### 📚 Documentation
|
|
51
|
+
- Added pytest-asyncio compatibility section to README
|
|
52
|
+
- Updated all code examples to demonstrate async/await usage
|
|
53
|
+
- Created dedicated pytest-asyncio showcase example
|
|
54
|
+
- Enhanced Quick Start guide with modern async patterns
|
|
55
|
+
|
|
56
|
+
### 🧪 Testing
|
|
57
|
+
- All 40 tests passing with pytest-asyncio integration
|
|
58
|
+
- Examples thoroughly tested and validated
|
|
59
|
+
- Comprehensive test coverage maintained
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [0.1.1] - 2025-05-27
|
|
64
|
+
|
|
65
|
+
### Initial Features
|
|
66
|
+
- Core async benchmarking functionality
|
|
67
|
+
- Rich console output with beautiful formatting
|
|
68
|
+
- Statistical analysis and comparison tools
|
|
69
|
+
- Multiple examples and comprehensive testing
|
|
70
|
+
|
|
71
|
+
### Core Components
|
|
72
|
+
- `AsyncBenchmarkFixture` for pytest integration
|
|
73
|
+
- `AsyncBenchmarkRunner` for timing execution
|
|
74
|
+
- `BenchmarkComparator` for performance analysis
|
|
75
|
+
- Rich-based display formatting
|
|
76
|
+
|
|
77
|
+
### Examples
|
|
78
|
+
- Basic pytest examples
|
|
79
|
+
- Quart API comparison
|
|
80
|
+
- Comparison analysis tools
|
|
81
|
+
- Statistical benchmarking patterns
|