Repository navigation
Commit 2f98b76
Allow loopback in vcr_config so --block-network works on Windows
Windows has no AF_UNIX socketpair(), so socket.socketpair() falls back
to connecting a real loopback socket. asyncio's ProactorEventLoop uses
exactly that call to build its self-pipe, so pytest-recording's network
guard (--block-network, set in addopts) makes asyncio.run() itself
raise "Network is disabled" before any async test can run, failing the
whole suite on setup rather than in the test bodies.
allowed_hosts already matches VCR's own host allowlist mechanism, so
letting 127.0.0.1 through here re-enables loop construction without
weakening the guard: provider endpoints stay blocked, only loopback is
let through.
Fixes typesafe-ai#44.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent e1d4cc9 commit 2f98b76
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| |||
0 commit comments