Skip to content

Commit c2cf82f

Browse files
committed
docs(CHANGES): Add async doctest support release notes for #59
why: Document new features and breaking changes for upcoming release what: - Add AsyncDocTestRunner feature with before/after code examples - Note pytest plugin integration - Document testdocutils -> run_doctest_docutils rename as breaking change
1 parent 9b91e5b commit c2cf82f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

CHANGES

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,47 @@ $ uvx --from 'gp-libs' --prerelease allow gp-libs
3030

3131
<!-- To maintainers and contributors: Please add notes for the forthcoming version below -->
3232

33+
### Features
34+
35+
#### doctest_docutils
36+
37+
- Add `AsyncDocTestRunner` for transparent top-level await support in doctests (#59)
38+
39+
Enables clean async doctests without `asyncio.run()` boilerplate:
40+
41+
```python
42+
# Before (required boilerplate)
43+
>>> async def example():
44+
... await asyncio.sleep(0)
45+
... return 42
46+
>>> asyncio.run(example())
47+
42
48+
49+
# After (top-level await)
50+
>>> await asyncio.sleep(0)
51+
>>> async def fetch():
52+
... return 42
53+
>>> await fetch()
54+
42
55+
```
56+
57+
Uses Python's `PyCF_ALLOW_TOP_LEVEL_AWAIT` compile flag (3.8+) with automatic
58+
detection - sync doctests work unchanged, async doctests "just work."
59+
60+
Includes `_Runner310` shim for Python 3.10 compatibility (asyncio.Runner is 3.11+).
61+
62+
#### pytest_doctest_docutils
63+
64+
- Integrate `AsyncDocTestRunner` for async doctest support in pytest (#59)
65+
66+
### Breaking changes
67+
68+
#### doctest_docutils
69+
70+
- Rename `testdocutils()``run_doctest_docutils()` (#59)
71+
72+
The function was renamed to avoid pytest automatically collecting it as a test.
73+
3374
### Documentation
3475

3576
- Migrate docs deployment to AWS OIDC authentication and AWS CLI

0 commit comments

Comments
 (0)