Skip to content

build(deps): update aiointercept requirement from >=0.1.8 to >=0.1.9#83

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/aiointercept-gte-0.1.9
Closed

build(deps): update aiointercept requirement from >=0.1.8 to >=0.1.9#83
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/aiointercept-gte-0.1.9

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 9, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on aiointercept to permit the latest version.

Release notes

Sourced from aiointercept's releases.

v0.1.9

What's Changed

New Contributors

Full Changelog: Polandia94/aiointercept@v0.1.8...v0.1.9

Changelog

Sourced from aiointercept's changelog.

[0.1.9] - 2026-07-08

Fixed

  • Fix regression in 0.1.8: with a regex pattern registered, requests to bare IP addresses (e.g. http://127.0.0.1:PORT/) were wrongly redirected to the mock server and raised ServerDisconnectedError #96.

[0.1.8] - 2026-06-28

Added

  • m.ordered_requests — flat list of (key, AiointerceptRequest) tuples in arrival order, giving cross-URL request ordering that m.requests (grouped by key) does not provide.
  • m.call_count — integer property; total requests intercepted across all URLs (len(m.ordered_requests)).
  • MockResponse — object returned by m.add() / m.get() / m.post() etc. Its call_count attribute increments each time that specific registration is matched and served, enabling per-handler assertions: rsp = m.get(url); ...; assert rsp.call_count == 2.
  • m.last_request — property returning the most recently intercepted AiointerceptRequest, or None if no requests have been made.
  • Streaming response bodies: body= now accepts an AsyncIterable[bytes] (e.g. an async generator). aiohttp wraps it in an AsyncIterablePayload and streams the chunks with chunked transfer encoding, so the client receives each piece as it is written — useful for mocking server-sent events / OpenAI-style streaming endpoints. The iterator is drained once: with repeat only the first response carries the body and later ones come back empty, so register a fresh iterator per expected request. Related to aioresponses#274.

Fixed

  • start() now clears m.requests and m.ordered_requests at the beginning of each session. Previously, reusing the same instance across multiple invocations (decorator mode or manual start()/stop() cycles) accumulated requests from prior runs, causing assert_called_once() and assert_not_called() to report stale counts. Recorded requests remain accessible after stop() for post-context-manager inspection.
  • passthrough_unmatched proxying no longer truncates compressed upstream responses: the upstream Content-Length (the compressed size) was relayed alongside the already-decompressed body.
  • Proxied redirects are now relayed untouched (allow_redirects=False upstream), so the client's own redirect handling (allow_redirects, response.history) behaves as it would against the real network. Previously the proxy followed redirects itself and the client saw only the final response.
  • The internal proxy session no longer accumulates cookies across proxied requests (it now uses a DummyCookieJar); cookie state belongs to each test's own client.
  • Custom resolvers passed to TCPConnector(resolver=...) are now intercepted too. Resolution is funneled through a single TCPConnector._resolve_host patch instead of patching ThreadedResolver.resolve / AsyncResolver.resolve, which only covered those two classes.
  • Calling add() before the server is started now raises RuntimeError (was AssertionError, which disappears under python -O); a URL without a host raises ValueError.
  • start() now fails with a clear RuntimeError instead of blocking the caller's event loop forever if the server thread wedges during startup.

Improved

  • Sequential requests to a mocked host are faster: pooled keep-alive connections that already point at the mock server are reused instead of forcing a fresh TCP connection per request (connections pointing elsewhere are still discarded).
  • Mock startup is faster: the passthrough proxy session is created lazily on first use instead of eagerly on every start().
  • mock_external_urls=True now installs 3 class-level patches instead of 5 (TCPConnector._resolve_host / _get_ssl_context / _get), and passthrough hosts keep normal DNS caching (the per-lookup cache clearing is gone — interception happens before the cache).

[0.1.7] - 2026-06-12

Fixed

  • Allow mock.ANY on JSON, data and headers on asserts.
  • Callbacks were receiving the compiled regex instead of the real URL; now every callback receives a yarl URL.
  • Callbacks with a Content-Type header were raising an exception (the header collided with the default content type); now fixed.
  • With mock_external_urls=True, a request to a mocked host is now intercepted even when the client already holds a live keep-alive connection to the real server. A class-level TCPConnector._get patch refuses to reuse a pooled connection for intercepted hosts, forcing a fresh (redirected) connection; passthrough hosts still reuse their connections.
  • A failed start() (e.g. when bypass-session creation raises) now rolls back its class-level patches instead of leaking the patch refcount onto subsequent mocks.

Improved

  • DNS-cache invalidation no longer tracks TCPConnector instances at all. Instead of patching TCPConnector.__init__ at import time and clearing every live connector's cache on start(), a class-level _resolve_host patch (installed only when mock_external_urls=True) drops the relevant cache entry per lookup. No monkey-patching happens unless mock_external_urls=True.
  • Improved error messages

Added

  • AiointerceptRequest.kwargs now includes data for non-JSON request bodies. Thanks to @​eth2353.

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [aiointercept](https://github.com/Polandia94/aiointercept) to permit the latest version.
- [Release notes](https://github.com/Polandia94/aiointercept/releases)
- [Changelog](https://github.com/Polandia94/aiointercept/blob/main/CHANGELOG.md)
- [Commits](Polandia94/aiointercept@v0.1.8...v0.1.9)

---
updated-dependencies:
- dependency-name: aiointercept
  dependency-version: 0.1.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jul 9, 2026
@dependabot @github

dependabot Bot commented on behalf of github Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/pip/aiointercept-gte-0.1.9 branch July 13, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant