Skip to content

Commit 6b23540

Browse files
lesnik512claude
andcommitted
feat(story-2.4): re-export AuthValue at top-level httpware package
Consumers writing thin wrappers around AsyncClient construction need to type-annotate their own `auth=` parameter; without a public symbol the only options are duplicating the union or importing from `_internal`. Re-export `AuthValue` from `httpware._internal.auth` and add it to `__all__`. `_normalize_auth` stays internal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b8c09c2 commit 6b23540

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/httpware/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""httpware — resilience-first async HTTP client framework for Python."""
22

3+
from httpware._internal.auth import AuthValue
34
from httpware.client import AsyncClient
45
from httpware.config import ClientConfig, Limits, Timeout
56
from httpware.decoders import ResponseDecoder
@@ -33,6 +34,7 @@
3334
__all__ = [
3435
"STATUS_TO_EXCEPTION",
3536
"AsyncClient",
37+
"AuthValue",
3638
"BadRequestError",
3739
"ClientConfig",
3840
"ClientError",

tests/test_public_api.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Verify public API exports are correct and stable."""
2+
3+
import httpware
4+
from httpware import AuthValue # noqa: F401
5+
6+
7+
def test_all_exports_present() -> None:
8+
"""Verify all symbols in __all__ are actually exported."""
9+
for symbol in httpware.__all__:
10+
assert hasattr(httpware, symbol), f"{symbol} in __all__ but not exported"
11+
12+
13+
def test_auth_value_is_public() -> None:
14+
"""Verify AuthValue type alias is exported."""
15+
assert "AuthValue" in httpware.__all__

0 commit comments

Comments
 (0)