Skip to content

bengal-pounce 0.4.0

Choose a tag to compare

@lbliii lbliii released this 26 Mar 15:29
· 98 commits to main since this release
d8388c1

Highlights

  • First-class testing APITestServer runs a real pounce server in a background thread. Use it as a context manager, async context manager, or via the auto-registered pounce_server pytest fixture. Ephemeral port binding, .url property, and reliable startup synchronization out of the box.
  • Graceful shutdown overhaul — Per-worker parallel joins, bounded executor teardown, and connection draining with 503 responses during shutdown.
  • Thread-safety fixes — Connection counter is now atomic under threading.Lock, and ASGI bridge header filtering is single-pass.

Added

  • pounce.testing.TestServer — real server for integration tests with context manager support
  • pounce.testing.serve() — async context manager helper
  • pounce_server pytest fixture — auto-registered via pytest11 entry point
  • Server.bound_addr — public property for bound (host, port) after startup
  • Startup readiness synchronization for reliable test orchestration

Changed

  • Graceful shutdown applies shutdown_timeout per worker with parallel joins
  • Worker executor teardown runs on a dedicated thread pool, wrapped in asyncio.wait_for
  • Log formatting respects sys.stderr.isatty() for TTY detection

Fixed

  • Thread-safe connection counter with threading.Lock on Worker._active_connections
  • Single-pass hop-by-hop header filter in ASGI bridge response path

Docs

  • Synced README, ARD, FEATURES, PRD, and site pages with actual codebase

Install

uv add "bengal-pounce==0.4.0"