foghttp 0.3.2__tar.gz → 0.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. {foghttp-0.3.2 → foghttp-0.3.4}/.flake8 +3 -1
  2. {foghttp-0.3.2 → foghttp-0.3.4}/Cargo.lock +2 -1
  3. {foghttp-0.3.2 → foghttp-0.3.4}/Cargo.toml +2 -1
  4. {foghttp-0.3.2 → foghttp-0.3.4}/PKG-INFO +21 -4
  5. {foghttp-0.3.2 → foghttp-0.3.4}/README.md +20 -3
  6. {foghttp-0.3.2 → foghttp-0.3.4}/SECURITY.md +5 -4
  7. foghttp-0.3.4/docs/benchmarks.md +356 -0
  8. {foghttp-0.3.2 → foghttp-0.3.4}/docs/index.md +22 -4
  9. {foghttp-0.3.2 → foghttp-0.3.4}/docs/lifecycle.md +101 -15
  10. {foghttp-0.3.2 → foghttp-0.3.4}/docs/limitations.md +17 -4
  11. foghttp-0.3.4/docs/proxies.md +202 -0
  12. {foghttp-0.3.2 → foghttp-0.3.4}/docs/quickstart.md +25 -3
  13. {foghttp-0.3.2 → foghttp-0.3.4}/docs/redirects.md +19 -0
  14. {foghttp-0.3.2 → foghttp-0.3.4}/docs/request-builder.md +1 -2
  15. foghttp-0.3.4/docs/telemetry.md +171 -0
  16. {foghttp-0.3.2 → foghttp-0.3.4}/docs/timeouts.md +6 -0
  17. {foghttp-0.3.2 → foghttp-0.3.4}/docs/tls.md +12 -5
  18. {foghttp-0.3.2 → foghttp-0.3.4}/docs/use-cases.md +1 -1
  19. {foghttp-0.3.2 → foghttp-0.3.4}/examples/README.md +15 -3
  20. foghttp-0.3.4/examples/async_lifecycle_debug.py +46 -0
  21. foghttp-0.3.4/examples/http_proxy.py +34 -0
  22. foghttp-0.3.4/examples/telemetry_hooks.py +40 -0
  23. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/__init__.py +28 -0
  24. foghttp-0.3.4/foghttp/_client/config.py +92 -0
  25. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/core.py +17 -1
  26. foghttp-0.3.4/foghttp/_client/lifecycle_debug.py +154 -0
  27. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/options.py +5 -3
  28. foghttp-0.3.4/foghttp/_client/proxy/__init__.py +19 -0
  29. foghttp-0.3.4/foghttp/_client/proxy/auth.py +17 -0
  30. foghttp-0.3.4/foghttp/_client/proxy/constants.py +53 -0
  31. foghttp-0.3.4/foghttp/_client/proxy/environment.py +91 -0
  32. foghttp-0.3.4/foghttp/_client/proxy/models.py +131 -0
  33. foghttp-0.3.4/foghttp/_client/proxy/no_proxy.py +33 -0
  34. foghttp-0.3.4/foghttp/_client/proxy/no_proxy_rule.py +78 -0
  35. foghttp-0.3.4/foghttp/_client/proxy/no_proxy_tokens.py +72 -0
  36. foghttp-0.3.4/foghttp/_client/proxy/resolver.py +89 -0
  37. foghttp-0.3.4/foghttp/_client/proxy/transport_policy.py +9 -0
  38. foghttp-0.3.4/foghttp/_client/proxy/url_parsing.py +70 -0
  39. foghttp-0.3.4/foghttp/_client/raw/errors.py +58 -0
  40. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/raw/lifecycle.py +5 -1
  41. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/raw/requests.py +11 -0
  42. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/header_policy.py +1 -0
  43. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/stats.py +2 -0
  44. foghttp-0.3.4/foghttp/_client/telemetry/__init__.py +15 -0
  45. foghttp-0.3.4/foghttp/_client/telemetry/clock.py +8 -0
  46. foghttp-0.3.4/foghttp/_client/telemetry/dispatcher.py +139 -0
  47. foghttp-0.3.4/foghttp/_client/telemetry/emission.py +55 -0
  48. foghttp-0.3.4/foghttp/_client/telemetry/request_context.py +90 -0
  49. foghttp-0.3.4/foghttp/_client/telemetry/request_events.py +38 -0
  50. foghttp-0.3.4/foghttp/_client/telemetry/responses.py +82 -0
  51. foghttp-0.3.4/foghttp/_client/telemetry/url.py +16 -0
  52. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/transport.py +19 -37
  53. foghttp-0.3.4/foghttp/_client/transport_requests.py +26 -0
  54. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_foghttp.pyi +24 -1
  55. foghttp-0.3.4/foghttp/_telemetry.py +10 -0
  56. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/async_client.py +139 -17
  57. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/client.py +58 -5
  58. foghttp-0.3.4/foghttp/lifecycle_debug.py +55 -0
  59. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/messages.py +0 -2
  60. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/models.py +10 -0
  61. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/pool_diagnostics.py +2 -0
  62. foghttp-0.3.4/foghttp/stream_response/__init__.py +5 -0
  63. foghttp-0.3.4/foghttp/stream_response/async_response.py +121 -0
  64. foghttp-0.3.4/foghttp/stream_response/base.py +94 -0
  65. foghttp-0.3.4/foghttp/stream_response/bindings.py +21 -0
  66. foghttp-0.3.4/foghttp/stream_response/constants.py +4 -0
  67. foghttp-0.3.4/foghttp/stream_response/lifecycle_debug.py +14 -0
  68. foghttp-0.3.4/foghttp/stream_response/status.py +48 -0
  69. foghttp-0.3.4/foghttp/stream_response/sync_response.py +102 -0
  70. foghttp-0.3.4/foghttp/stream_response/telemetry.py +44 -0
  71. foghttp-0.3.4/foghttp/telemetry/__init__.py +17 -0
  72. foghttp-0.3.4/foghttp/telemetry/config.py +33 -0
  73. foghttp-0.3.4/foghttp/telemetry/errors.py +7 -0
  74. foghttp-0.3.4/foghttp/telemetry/events.py +62 -0
  75. foghttp-0.3.4/foghttp/telemetry/sinks.py +9 -0
  76. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/transport_state.py +2 -0
  77. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/transport_stats.py +7 -0
  78. {foghttp-0.3.2 → foghttp-0.3.4}/pyproject.toml +1 -1
  79. {foghttp-0.3.2 → foghttp-0.3.4}/ruff.toml +1 -1
  80. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/client/mod.rs +33 -8
  81. foghttp-0.3.4/src/core/client/proxy/authorization.rs +19 -0
  82. foghttp-0.3.4/src/core/client/proxy/endpoint.rs +27 -0
  83. foghttp-0.3.4/src/core/client/proxy/http.rs +122 -0
  84. foghttp-0.3.4/src/core/client/proxy/mod.rs +16 -0
  85. foghttp-0.3.4/src/core/client/proxy/tests.rs +356 -0
  86. foghttp-0.3.4/src/core/client/proxy/tunnel.rs +285 -0
  87. foghttp-0.3.4/src/core/headers/mod.rs +10 -0
  88. foghttp-0.3.2/src/core/headers.rs → foghttp-0.3.4/src/core/headers/request.rs +1 -22
  89. foghttp-0.3.4/src/core/headers/response.rs +19 -0
  90. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/headers/tests.rs +18 -1
  91. foghttp-0.3.4/src/core/metrics/buffered.rs +70 -0
  92. foghttp-0.3.4/src/core/metrics/counters.rs +176 -0
  93. foghttp-0.3.4/src/core/metrics/lifecycle.rs +6 -0
  94. foghttp-0.3.4/src/core/metrics/mod.rs +54 -0
  95. foghttp-0.3.4/src/core/metrics/origin/blocking.rs +7 -0
  96. foghttp-0.3.2/src/core/metrics/origin.rs → foghttp-0.3.4/src/core/metrics/origin/metrics.rs +11 -202
  97. foghttp-0.3.4/src/core/metrics/origin/mod.rs +13 -0
  98. foghttp-0.3.4/src/core/metrics/origin/registry.rs +81 -0
  99. foghttp-0.3.4/src/core/metrics/origin/snapshots.rs +36 -0
  100. foghttp-0.3.4/src/core/metrics/origin/tests.rs +91 -0
  101. foghttp-0.3.4/src/core/metrics/origin/waiters.rs +80 -0
  102. foghttp-0.3.4/src/core/metrics/snapshots.rs +195 -0
  103. foghttp-0.3.4/src/core/metrics/telemetry.rs +45 -0
  104. foghttp-0.3.4/src/core/metrics/tests.rs +247 -0
  105. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/request.rs +7 -0
  106. {foghttp-0.3.2 → foghttp-0.3.4}/src/errors.rs +28 -0
  107. {foghttp-0.3.2 → foghttp-0.3.4}/src/messages.rs +16 -1
  108. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/diagnostics.rs +4 -0
  109. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/gate.rs +2 -0
  110. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/spawn.rs +4 -5
  111. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/stream_spawn.rs +4 -5
  112. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/mod.rs +69 -23
  113. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/options.rs +0 -10
  114. foghttp-0.3.4/src/py/client/transport/body.rs +73 -0
  115. foghttp-0.3.4/src/py/client/transport/buffered.rs +111 -0
  116. foghttp-0.3.4/src/py/client/transport/client.rs +24 -0
  117. foghttp-0.3.4/src/py/client/transport/context.rs +35 -0
  118. foghttp-0.3.4/src/py/client/transport/mod.rs +16 -0
  119. foghttp-0.3.4/src/py/client/transport/proxy.rs +66 -0
  120. foghttp-0.3.4/src/py/client/transport/request.rs +137 -0
  121. foghttp-0.3.4/src/py/client/transport/response.rs +112 -0
  122. foghttp-0.3.4/src/py/client/transport/streaming.rs +152 -0
  123. foghttp-0.3.4/src/py/client/transport/tests.rs +188 -0
  124. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/pool_diagnostics.rs +7 -0
  125. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/stats.rs +35 -27
  126. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/transport_state.rs +7 -0
  127. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/helpers.py +20 -0
  128. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_actions.py +34 -0
  129. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_assertions.py +40 -0
  130. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_data.py +32 -0
  131. foghttp-0.3.4/tests/client_cancellation/lifecycle_debug_predicates.py +68 -0
  132. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_buffered.py +133 -0
  133. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_messages.py +78 -0
  134. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_streaming.py +132 -0
  135. foghttp-0.3.4/tests/client_cancellation/test_async_lifecycle_debug_strict.py +65 -0
  136. foghttp-0.3.4/tests/client_cancellation/test_async_telemetry.py +33 -0
  137. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/conftest.py +3 -2
  138. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/helpers.py +3 -0
  139. foghttp-0.3.4/tests/client_lifecycle/test_async_client_lifecycle.py +180 -0
  140. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/test_raw_client_lifecycle.py +3 -0
  141. foghttp-0.3.4/tests/client_lifecycle/test_sync_client_lifecycle.py +172 -0
  142. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/test_sync_close_race.py +2 -1
  143. foghttp-0.3.4/tests/client_lifecycle/test_sync_close_waits.py +127 -0
  144. foghttp-0.3.4/tests/client_options/test_raw_numeric_boundary.py +283 -0
  145. foghttp-0.3.4/tests/client_proxy/client_options.py +30 -0
  146. foghttp-0.3.4/tests/client_proxy/conftest.py +33 -0
  147. foghttp-0.3.4/tests/client_proxy/connect_proxy_server.py +256 -0
  148. foghttp-0.3.4/tests/client_proxy/environment.py +24 -0
  149. foghttp-0.3.4/tests/client_proxy/http_proxy_server.py +285 -0
  150. foghttp-0.3.4/tests/client_proxy/test_client_config.py +235 -0
  151. foghttp-0.3.4/tests/client_proxy/test_environment.py +194 -0
  152. foghttp-0.3.4/tests/client_proxy/test_http_proxy_transport.py +361 -0
  153. foghttp-0.3.4/tests/client_proxy/test_https_proxy_connect.py +613 -0
  154. foghttp-0.3.4/tests/client_proxy/test_no_proxy.py +92 -0
  155. foghttp-0.3.4/tests/client_proxy/test_proxy_models.py +72 -0
  156. foghttp-0.3.4/tests/client_resources/test_diagnostic_snapshot_contract.py +130 -0
  157. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_sync_pool_diagnostics.py +2 -0
  158. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/server.py +1 -1
  159. foghttp-0.3.4/tests/client_telemetry/assertions.py +103 -0
  160. foghttp-0.3.4/tests/client_telemetry/conftest.py +24 -0
  161. foghttp-0.3.4/tests/client_telemetry/constants.py +24 -0
  162. foghttp-0.3.4/tests/client_telemetry/models.py +38 -0
  163. foghttp-0.3.4/tests/client_telemetry/test_async_stream_hooks.py +77 -0
  164. foghttp-0.3.4/tests/client_telemetry/test_async_stream_telemetry.py +115 -0
  165. foghttp-0.3.4/tests/client_telemetry/test_async_telemetry.py +43 -0
  166. foghttp-0.3.4/tests/client_telemetry/test_concurrent_delivery.py +49 -0
  167. foghttp-0.3.4/tests/client_telemetry/test_event_contract.py +62 -0
  168. foghttp-0.3.4/tests/client_telemetry/test_sync_stream_telemetry.py +148 -0
  169. foghttp-0.3.4/tests/client_telemetry/test_sync_telemetry.py +69 -0
  170. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_transport/test_transport_adapter.py +91 -5
  171. foghttp-0.3.4/tests/conftest.py +7 -0
  172. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/responses.py +0 -2
  173. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/test_async_fault_injection.py +0 -1
  174. {foghttp-0.3.2 → foghttp-0.3.4}/tests/http_body_scenarios.py +0 -4
  175. {foghttp-0.3.2 → foghttp-0.3.4}/tests/redirect_helpers.py +0 -1
  176. foghttp-0.3.4/tests/request_builder/__init__.py +0 -0
  177. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_header_policy.py +1 -0
  178. foghttp-0.3.4/tests/response_decompression/__init__.py +0 -0
  179. foghttp-0.3.4/tests/support/async_http_server.py +64 -0
  180. foghttp-0.3.4/tests/support/http_routes.py +77 -0
  181. foghttp-0.3.4/tests/support/raw_responses.py +299 -0
  182. foghttp-0.3.4/tests/support/sync_http_server.py +281 -0
  183. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_async_client.py +2 -0
  184. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_async_redirects.py +1 -1
  185. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_client_options.py +0 -5
  186. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_public_api.py +8 -0
  187. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_raw_client.py +53 -4
  188. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_raw_client_errors.py +6 -0
  189. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_sync_client.py +2 -0
  190. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_sync_redirects.py +1 -1
  191. foghttp-0.3.4/tests/test_transport_stats.py +62 -0
  192. {foghttp-0.3.2 → foghttp-0.3.4}/uv.lock +1 -1
  193. foghttp-0.3.2/docs/benchmarks.md +0 -362
  194. foghttp-0.3.2/foghttp/_client/config.py +0 -50
  195. foghttp-0.3.2/foghttp/_client/raw/errors.py +0 -29
  196. foghttp-0.3.2/foghttp/stream_response.py +0 -260
  197. foghttp-0.3.2/src/core/metrics.rs +0 -631
  198. foghttp-0.3.2/src/py/client/transport/tests.rs +0 -86
  199. foghttp-0.3.2/src/py/client/transport.rs +0 -530
  200. foghttp-0.3.2/tests/client_lifecycle/test_client_lifecycle.py +0 -431
  201. foghttp-0.3.2/tests/client_options/test_raw_numeric_boundary.py +0 -145
  202. foghttp-0.3.2/tests/conftest.py +0 -655
  203. foghttp-0.3.2/tests/test_transport_stats.py +0 -19
  204. {foghttp-0.3.2 → foghttp-0.3.4}/.github/workflows/ci.yml +0 -0
  205. {foghttp-0.3.2 → foghttp-0.3.4}/.github/workflows/release.yml +0 -0
  206. {foghttp-0.3.2 → foghttp-0.3.4}/.gitignore +0 -0
  207. {foghttp-0.3.2 → foghttp-0.3.4}/.pre-commit-config.yaml +0 -0
  208. {foghttp-0.3.2 → foghttp-0.3.4}/CODE_OF_CONDUCT.md +0 -0
  209. {foghttp-0.3.2 → foghttp-0.3.4}/CONTRIBUTING.md +0 -0
  210. {foghttp-0.3.2 → foghttp-0.3.4}/LICENSE +0 -0
  211. {foghttp-0.3.2 → foghttp-0.3.4}/docs/pyo3-boundary.md +0 -0
  212. {foghttp-0.3.2 → foghttp-0.3.4}/docs/streaming.md +0 -0
  213. {foghttp-0.3.2 → foghttp-0.3.4}/examples/async_json_fanout.py +0 -0
  214. {foghttp-0.3.2 → foghttp-0.3.4}/examples/async_resource_limits.py +0 -0
  215. {foghttp-0.3.2 → foghttp-0.3.4}/examples/async_streaming.py +0 -0
  216. {foghttp-0.3.2 → foghttp-0.3.4}/examples/compressed_response.py +0 -0
  217. {foghttp-0.3.2 → foghttp-0.3.4}/examples/prepared_requests.py +0 -0
  218. {foghttp-0.3.2 → foghttp-0.3.4}/examples/redirects.py +0 -0
  219. {foghttp-0.3.2 → foghttp-0.3.4}/examples/request_builder_compatibility.py +0 -0
  220. {foghttp-0.3.2 → foghttp-0.3.4}/examples/sync_json_api.py +0 -0
  221. {foghttp-0.3.2 → foghttp-0.3.4}/examples/sync_streaming.py +0 -0
  222. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/__init__.py +0 -0
  223. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/asyncio_futures.py +0 -0
  224. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/constants.py +0 -0
  225. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/raw/__init__.py +0 -0
  226. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/raw/timeout_errors.py +0 -0
  227. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/__init__.py +0 -0
  228. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/builder.py +0 -0
  229. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/defaults.py +0 -0
  230. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/merge.py +0 -0
  231. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/request_builder/models.py +0 -0
  232. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/response.py +0 -0
  233. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/runtime/__init__.py +0 -0
  234. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/runtime/constants.py +0 -0
  235. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/runtime/workers.py +0 -0
  236. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/stream_context.py +0 -0
  237. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_client/tls.py +0 -0
  238. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_redaction.py +0 -0
  239. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_request_body.py +0 -0
  240. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_response/__init__.py +0 -0
  241. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_response/encoding.py +0 -0
  242. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_response/status.py +0 -0
  243. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/__init__.py +0 -0
  244. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/text/__init__.py +0 -0
  245. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/text/async_chunks.py +0 -0
  246. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/text/iterators.py +0 -0
  247. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/text/lines.py +0 -0
  248. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_streaming/text/sync_chunks.py +0 -0
  249. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_validation/__init__.py +0 -0
  250. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/_validation/numeric.py +0 -0
  251. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/body.py +0 -0
  252. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/errors/__init__.py +0 -0
  253. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/errors/base.py +0 -0
  254. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/errors/lifecycle.py +0 -0
  255. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/errors/response.py +0 -0
  256. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/errors/timeout.py +0 -0
  257. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/headers.py +0 -0
  258. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/limits.py +0 -0
  259. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/methods.py +0 -0
  260. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/py.typed +0 -0
  261. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/request.py +0 -0
  262. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/request_info.py +0 -0
  263. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/response.py +0 -0
  264. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/stats.py +0 -0
  265. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/status_codes/__init__.py +0 -0
  266. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/status_codes/client_error.py +0 -0
  267. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/status_codes/redirect.py +0 -0
  268. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/status_codes/server_error.py +0 -0
  269. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/status_codes/success.py +0 -0
  270. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/timeout_diagnostics.py +0 -0
  271. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/timeouts.py +0 -0
  272. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/tls.py +0 -0
  273. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/types/__init__.py +0 -0
  274. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/types/http.py +0 -0
  275. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/types/request.py +0 -0
  276. {foghttp-0.3.2 → foghttp-0.3.4}/foghttp/url.py +0 -0
  277. {foghttp-0.3.2 → foghttp-0.3.4}/logo.png +0 -0
  278. {foghttp-0.3.2 → foghttp-0.3.4}/scripts/check_all_position.py +0 -0
  279. {foghttp-0.3.2 → foghttp-0.3.4}/scripts/install_wheel_smoke.py +0 -0
  280. /foghttp-0.3.2/src/core/client/telemetry.rs → /foghttp-0.3.4/src/core/client/telemetry/mod.rs +0 -0
  281. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/client/telemetry/tests.rs +0 -0
  282. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/method.rs +0 -0
  283. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/metrics/atomic.rs +0 -0
  284. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/mod.rs +0 -0
  285. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/numeric/mod.rs +0 -0
  286. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/numeric/tests.rs +0 -0
  287. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/response/body.rs +0 -0
  288. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/response/budget.rs +0 -0
  289. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/response/decompression.rs +0 -0
  290. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/response/mod.rs +0 -0
  291. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/tls/mod.rs +0 -0
  292. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/tls/tests.rs +0 -0
  293. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/url/constants.rs +0 -0
  294. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/url/mod.rs +0 -0
  295. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/url/origin.rs +0 -0
  296. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/url/scheme.rs +0 -0
  297. {foghttp-0.3.2 → foghttp-0.3.4}/src/core/url/tests.rs +0 -0
  298. {foghttp-0.3.2 → foghttp-0.3.4}/src/lib.rs +0 -0
  299. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/mod.rs +0 -0
  300. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/origin.rs +0 -0
  301. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/pending.rs +0 -0
  302. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/permit.rs +0 -0
  303. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/telemetry.rs +0 -0
  304. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/acquire/tests.rs +0 -0
  305. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/active.rs +0 -0
  306. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/callback.rs +0 -0
  307. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/mod.rs +0 -0
  308. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/async_requests/registry.rs +0 -0
  309. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/body.rs +0 -0
  310. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/future.rs +0 -0
  311. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/lifecycle/mod.rs +0 -0
  312. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/lifecycle/tests.rs +0 -0
  313. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/action.rs +0 -0
  314. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/headers.rs +0 -0
  315. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/method.rs +0 -0
  316. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/mod.rs +0 -0
  317. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/policy.rs +0 -0
  318. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/status.rs +0 -0
  319. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/tests.rs +0 -0
  320. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/redirects/utils.rs +0 -0
  321. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/runtime/constants.rs +0 -0
  322. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/runtime/mod.rs +0 -0
  323. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/runtime/tests.rs +0 -0
  324. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/runtime/workers.rs +0 -0
  325. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/callback.rs +0 -0
  326. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/constants.rs +0 -0
  327. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/mod.rs +0 -0
  328. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/parts.rs +0 -0
  329. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/read.rs +0 -0
  330. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/registry.rs +0 -0
  331. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/response.rs +0 -0
  332. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/state.rs +0 -0
  333. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/streams/state_tests.rs +0 -0
  334. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/client/timeout_diagnostics.rs +0 -0
  335. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/mod.rs +0 -0
  336. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/response.rs +0 -0
  337. {foghttp-0.3.2 → foghttp-0.3.4}/src/py/url.rs +0 -0
  338. {foghttp-0.3.2 → foghttp-0.3.4}/tests/__init__.py +0 -0
  339. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/__init__.py +0 -0
  340. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/conftest.py +0 -0
  341. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/constants.py +0 -0
  342. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/test_async_cancellation.py +0 -0
  343. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_cancellation/test_asyncio_helpers.py +0 -0
  344. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/__init__.py +0 -0
  345. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/assertions.py +0 -0
  346. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/conftest.py +0 -0
  347. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/constants.py +0 -0
  348. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/models.py +0 -0
  349. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/server.py +0 -0
  350. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/test_async_keepalive.py +0 -0
  351. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_keepalive/test_sync_keepalive.py +0 -0
  352. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/__init__.py +0 -0
  353. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_lifecycle/constants.py +0 -0
  354. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_options/__init__.py +0 -0
  355. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_options/test_numeric_validation.py +0 -0
  356. {foghttp-0.3.2/tests/client_resources → foghttp-0.3.4/tests/client_proxy}/__init__.py +0 -0
  357. {foghttp-0.3.2/tests/client_timeouts → foghttp-0.3.4/tests/client_resources}/__init__.py +0 -0
  358. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/conftest.py +0 -0
  359. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/constants.py +0 -0
  360. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/helpers.py +0 -0
  361. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_async_global_limits.py +0 -0
  362. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_async_origin_limits.py +0 -0
  363. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_async_pool_diagnostics.py +0 -0
  364. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_async_response_body_limits.py +0 -0
  365. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_async_transport_state.py +0 -0
  366. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_sync_global_limits.py +0 -0
  367. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_sync_origin_limits.py +0 -0
  368. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_sync_response_body_limits.py +0 -0
  369. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_resources/test_sync_transport_state.py +0 -0
  370. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/__init__.py +0 -0
  371. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/conftest.py +0 -0
  372. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/constants.py +0 -0
  373. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/stream_readers.py +0 -0
  374. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/test_async_streaming.py +0 -0
  375. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/test_async_streaming_text_lines.py +0 -0
  376. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/test_streaming_text_decoding.py +0 -0
  377. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/test_sync_streaming.py +0 -0
  378. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/test_sync_streaming_text_lines.py +0 -0
  379. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_streaming/text_decoding_sources.py +0 -0
  380. {foghttp-0.3.2/tests/client_tls → foghttp-0.3.4/tests/client_telemetry}/__init__.py +0 -0
  381. {foghttp-0.3.2/tests/fault_injection → foghttp-0.3.4/tests/client_timeouts}/__init__.py +0 -0
  382. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_timeouts/conftest.py +0 -0
  383. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_timeouts/constants.py +0 -0
  384. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_timeouts/helpers.py +0 -0
  385. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_timeouts/test_async_timeouts.py +0 -0
  386. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_timeouts/test_sync_timeouts.py +0 -0
  387. {foghttp-0.3.2/tests/network_errors → foghttp-0.3.4/tests/client_tls}/__init__.py +0 -0
  388. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/assertions.py +0 -0
  389. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/certificates.py +0 -0
  390. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/conftest.py +0 -0
  391. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/constants.py +0 -0
  392. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/handshake_server.py +0 -0
  393. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/models.py +0 -0
  394. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/server.py +0 -0
  395. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/test_async_tls.py +0 -0
  396. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/test_async_tls_redirects.py +0 -0
  397. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/test_sync_tls.py +0 -0
  398. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/test_sync_tls_redirects.py +0 -0
  399. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_tls/test_tls_config.py +0 -0
  400. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_transport/__init__.py +0 -0
  401. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_transport/models.py +0 -0
  402. {foghttp-0.3.2 → foghttp-0.3.4}/tests/client_warning_actions.py +0 -0
  403. {foghttp-0.3.2/tests/request_builder → foghttp-0.3.4/tests/fault_injection}/__init__.py +0 -0
  404. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/conftest.py +0 -0
  405. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/constants.py +0 -0
  406. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/models.py +0 -0
  407. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/protocol.py +0 -0
  408. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/server.py +0 -0
  409. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/state.py +0 -0
  410. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/state_assertions.py +0 -0
  411. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/test_async_socket_shutdown.py +0 -0
  412. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/test_sync_fault_injection.py +0 -0
  413. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/test_sync_socket_shutdown.py +0 -0
  414. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/timeout_assertions.py +0 -0
  415. {foghttp-0.3.2 → foghttp-0.3.4}/tests/fault_injection/transport_waiters.py +0 -0
  416. {foghttp-0.3.2/tests/response_decompression → foghttp-0.3.4/tests/network_errors}/__init__.py +0 -0
  417. {foghttp-0.3.2 → foghttp-0.3.4}/tests/network_errors/conftest.py +0 -0
  418. {foghttp-0.3.2 → foghttp-0.3.4}/tests/network_errors/constants.py +0 -0
  419. {foghttp-0.3.2 → foghttp-0.3.4}/tests/network_errors/helpers.py +0 -0
  420. {foghttp-0.3.2 → foghttp-0.3.4}/tests/network_errors/test_async_network_errors.py +0 -0
  421. {foghttp-0.3.2 → foghttp-0.3.4}/tests/network_errors/test_sync_network_errors.py +0 -0
  422. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/__init__.py +0 -0
  423. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/conftest.py +0 -0
  424. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/constants.py +0 -0
  425. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/gil_progress.py +0 -0
  426. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/test_async_future_boundary.py +0 -0
  427. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/test_sync_gil_boundary.py +0 -0
  428. {foghttp-0.3.2 → foghttp-0.3.4}/tests/pyo3_boundary/thread_worker.py +0 -0
  429. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/encoding_property_helpers.py +0 -0
  430. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_base_url.py +0 -0
  431. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_body.py +0 -0
  432. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_default_headers.py +0 -0
  433. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_default_params.py +0 -0
  434. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_encoding_properties.py +0 -0
  435. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_headers.py +0 -0
  436. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_merge_contract.py +0 -0
  437. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_no_mutation.py +0 -0
  438. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_parity.py +0 -0
  439. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_query_params.py +0 -0
  440. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_builder/test_shortcuts.py +0 -0
  441. {foghttp-0.3.2 → foghttp-0.3.4}/tests/request_factories.py +0 -0
  442. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/conftest.py +0 -0
  443. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/constants.py +0 -0
  444. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/helpers.py +0 -0
  445. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/payloads.py +0 -0
  446. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/server.py +0 -0
  447. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/test_async_response_decompression.py +0 -0
  448. {foghttp-0.3.2 → foghttp-0.3.4}/tests/response_decompression/test_sync_response_decompression.py +0 -0
  449. {foghttp-0.3.2 → foghttp-0.3.4}/tests/support/__init__.py +0 -0
  450. {foghttp-0.3.2 → foghttp-0.3.4}/tests/support/timeout_diagnostics.py +0 -0
  451. {foghttp-0.3.2 → foghttp-0.3.4}/tests/support/transport_stats.py +0 -0
  452. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_async_response.py +0 -0
  453. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_headers.py +0 -0
  454. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_query_params.py +0 -0
  455. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_redaction.py +0 -0
  456. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_request_model.py +0 -0
  457. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_response_encoding.py +0 -0
  458. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_response_flags.py +0 -0
  459. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_runtime_workers.py +0 -0
  460. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_sync_response.py +0 -0
  461. {foghttp-0.3.2 → foghttp-0.3.4}/tests/test_url.py +0 -0
@@ -40,7 +40,9 @@ per-file-ignores =
40
40
  foghttp/request.py: WPS237
41
41
  foghttp/request_info.py: WPS237
42
42
  foghttp/response.py: WPS214, WPS237
43
- foghttp/stream_response.py: WPS201, WPS214, WPS237, WPS501
43
+ foghttp/stream_response/async_response.py: WPS214
44
+ foghttp/stream_response/base.py: WPS201, WPS237
45
+ foghttp/stream_response/sync_response.py: WPS501
44
46
  foghttp/url.py: WPS214, WPS237
45
47
  # Native resource adapters intentionally use try/finally-only cleanup paths.
46
48
  foghttp/_client/response.py: WPS501
@@ -110,7 +110,7 @@ dependencies = [
110
110
 
111
111
  [[package]]
112
112
  name = "foghttp"
113
- version = "0.3.2"
113
+ version = "0.3.4"
114
114
  dependencies = [
115
115
  "brotli",
116
116
  "bytes",
@@ -691,6 +691,7 @@ version = "1.52.2"
691
691
  source = "registry+https://github.com/rust-lang/crates.io-index"
692
692
  checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386"
693
693
  dependencies = [
694
+ "bytes",
694
695
  "libc",
695
696
  "mio",
696
697
  "pin-project-lite",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "foghttp"
3
- version = "0.3.2"
3
+ version = "0.3.4"
4
4
  edition = "2021"
5
5
  license = "MIT"
6
6
  readme = "README.md"
@@ -60,6 +60,7 @@ features = [
60
60
  [dependencies.tokio]
61
61
  version = "1.41.1"
62
62
  features = [
63
+ "io-util",
63
64
  "rt-multi-thread",
64
65
  "sync",
65
66
  "time",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foghttp
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Framework :: AsyncIO
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -64,6 +64,10 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
64
64
  - graceful sync `close()` for in-flight requests and cancellable async requests
65
65
  - global/per-origin request backpressure, per-origin acquire pressure stats, and
66
66
  stuck request diagnostics
67
+ - typed telemetry event hooks with redacted request/response lifecycle events
68
+ - versioned telemetry snapshots that separate alert-oriented stats from
69
+ diagnostic dump APIs
70
+ - opt-in async lifecycle debug snapshots for staging and tests
67
71
  - advanced per-client Tokio runtime worker tuning
68
72
  - focused buffered HTTP surface for JSON and form APIs, internal services,
69
73
  workers, and benchmarks
@@ -134,12 +138,20 @@ async with foghttp.AsyncClient() as client:
134
138
  token-like URL params, and buffered body bytes
135
139
  - normalized `URL` model with origin comparison and relative joins
136
140
  - GET/HEAD/POST redirects with final URL, history, and conservative replay policy
141
+ - HTTP proxy routing and HTTPS proxy `CONNECT` tunnelling through explicit
142
+ `proxy=` or `trust_env=True` when the proxy endpoint uses `http://`
137
143
  - HTTPS with default WebPKI roots, explicit custom CA certificates, and
138
144
  custom-only CA trust
139
145
  - graceful sync `close()` that waits for in-flight sync requests
140
146
  - async request cancellation that aborts the in-flight Rust request
141
147
  - global and per-origin request backpressure, per-origin acquire pressure
142
148
  snapshots, stuck request diagnostics, and HTTP/1.1 over HTTP/HTTPS
149
+ - opt-in typed telemetry event hooks for request, redirect, response headers,
150
+ response body, and request completion lifecycle
151
+ - versioned telemetry snapshot metadata for `stats()`, `dump_transport_state()`,
152
+ and `dump_pool_diagnostics()`
153
+ - opt-in async lifecycle debug mode for active request snapshots, strict leak
154
+ checks, and unclosed-client diagnostics
143
155
  - default per-response and aggregate buffered response body limits for memory
144
156
  safety
145
157
  - advanced per-client Tokio runtime worker tuning
@@ -152,7 +164,9 @@ async with foghttp.AsyncClient() as client:
152
164
  - [Request builder compatibility](https://github.com/AmberFog/foghttp/blob/main/docs/request-builder.md)
153
165
  - [Client lifecycle](https://github.com/AmberFog/foghttp/blob/main/docs/lifecycle.md)
154
166
  - [Timeout model](https://github.com/AmberFog/foghttp/blob/main/docs/timeouts.md)
167
+ - [Telemetry contract](https://github.com/AmberFog/foghttp/blob/main/docs/telemetry.md)
155
168
  - [Response streaming](https://github.com/AmberFog/foghttp/blob/main/docs/streaming.md)
169
+ - [Proxy and trust_env](https://github.com/AmberFog/foghttp/blob/main/docs/proxies.md)
156
170
  - [TLS trust](https://github.com/AmberFog/foghttp/blob/main/docs/tls.md)
157
171
  - [Use cases](https://github.com/AmberFog/foghttp/blob/main/docs/use-cases.md)
158
172
  - [Redirects](https://github.com/AmberFog/foghttp/blob/main/docs/redirects.md)
@@ -164,9 +178,12 @@ async with foghttp.AsyncClient() as client:
164
178
 
165
179
  FogHTTP is currently focused on controlled HTTP workloads. Buffered responses
166
180
  are the broadest supported path; sync and async response streaming are available
167
- as bytes/text/line context-managed APIs. Streaming uploads, cookies, auth helpers,
168
- proxy support, multipart uploads, HTTP/2, automatic `Accept-Encoding`
169
- negotiation, streaming decompression, strict connection-level pool limits,
181
+ as bytes/text/line context-managed APIs. HTTP proxy routing and HTTPS proxy
182
+ `CONNECT` tunnelling are available through `proxy=` and `trust_env=True` when
183
+ the proxy endpoint itself uses `http://`.
184
+ Streaming uploads, cookies, auth helpers, multipart uploads,
185
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression,
186
+ strict connection-level pool limits,
170
187
  per-request connect timeout reconfiguration, and request-body write timeout
171
188
  semantics are planned for later versions. Response body read timeout is
172
189
  available for buffered and streaming response bodies. Socket lifecycle telemetry
@@ -28,6 +28,10 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
28
28
  - graceful sync `close()` for in-flight requests and cancellable async requests
29
29
  - global/per-origin request backpressure, per-origin acquire pressure stats, and
30
30
  stuck request diagnostics
31
+ - typed telemetry event hooks with redacted request/response lifecycle events
32
+ - versioned telemetry snapshots that separate alert-oriented stats from
33
+ diagnostic dump APIs
34
+ - opt-in async lifecycle debug snapshots for staging and tests
31
35
  - advanced per-client Tokio runtime worker tuning
32
36
  - focused buffered HTTP surface for JSON and form APIs, internal services,
33
37
  workers, and benchmarks
@@ -98,12 +102,20 @@ async with foghttp.AsyncClient() as client:
98
102
  token-like URL params, and buffered body bytes
99
103
  - normalized `URL` model with origin comparison and relative joins
100
104
  - GET/HEAD/POST redirects with final URL, history, and conservative replay policy
105
+ - HTTP proxy routing and HTTPS proxy `CONNECT` tunnelling through explicit
106
+ `proxy=` or `trust_env=True` when the proxy endpoint uses `http://`
101
107
  - HTTPS with default WebPKI roots, explicit custom CA certificates, and
102
108
  custom-only CA trust
103
109
  - graceful sync `close()` that waits for in-flight sync requests
104
110
  - async request cancellation that aborts the in-flight Rust request
105
111
  - global and per-origin request backpressure, per-origin acquire pressure
106
112
  snapshots, stuck request diagnostics, and HTTP/1.1 over HTTP/HTTPS
113
+ - opt-in typed telemetry event hooks for request, redirect, response headers,
114
+ response body, and request completion lifecycle
115
+ - versioned telemetry snapshot metadata for `stats()`, `dump_transport_state()`,
116
+ and `dump_pool_diagnostics()`
117
+ - opt-in async lifecycle debug mode for active request snapshots, strict leak
118
+ checks, and unclosed-client diagnostics
107
119
  - default per-response and aggregate buffered response body limits for memory
108
120
  safety
109
121
  - advanced per-client Tokio runtime worker tuning
@@ -116,7 +128,9 @@ async with foghttp.AsyncClient() as client:
116
128
  - [Request builder compatibility](https://github.com/AmberFog/foghttp/blob/main/docs/request-builder.md)
117
129
  - [Client lifecycle](https://github.com/AmberFog/foghttp/blob/main/docs/lifecycle.md)
118
130
  - [Timeout model](https://github.com/AmberFog/foghttp/blob/main/docs/timeouts.md)
131
+ - [Telemetry contract](https://github.com/AmberFog/foghttp/blob/main/docs/telemetry.md)
119
132
  - [Response streaming](https://github.com/AmberFog/foghttp/blob/main/docs/streaming.md)
133
+ - [Proxy and trust_env](https://github.com/AmberFog/foghttp/blob/main/docs/proxies.md)
120
134
  - [TLS trust](https://github.com/AmberFog/foghttp/blob/main/docs/tls.md)
121
135
  - [Use cases](https://github.com/AmberFog/foghttp/blob/main/docs/use-cases.md)
122
136
  - [Redirects](https://github.com/AmberFog/foghttp/blob/main/docs/redirects.md)
@@ -128,9 +142,12 @@ async with foghttp.AsyncClient() as client:
128
142
 
129
143
  FogHTTP is currently focused on controlled HTTP workloads. Buffered responses
130
144
  are the broadest supported path; sync and async response streaming are available
131
- as bytes/text/line context-managed APIs. Streaming uploads, cookies, auth helpers,
132
- proxy support, multipart uploads, HTTP/2, automatic `Accept-Encoding`
133
- negotiation, streaming decompression, strict connection-level pool limits,
145
+ as bytes/text/line context-managed APIs. HTTP proxy routing and HTTPS proxy
146
+ `CONNECT` tunnelling are available through `proxy=` and `trust_env=True` when
147
+ the proxy endpoint itself uses `http://`.
148
+ Streaming uploads, cookies, auth helpers, multipart uploads,
149
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression,
150
+ strict connection-level pool limits,
134
151
  per-request connect timeout reconfiguration, and request-body write timeout
135
152
  semantics are planned for later versions. Response body read timeout is
136
153
  available for buffered and streaming response bodies. Socket lifecycle telemetry
@@ -67,8 +67,8 @@ The following areas are especially security-sensitive in FogHTTP:
67
67
  - URL credentials, token-like query parameters, or secrets in repr/error output
68
68
  - sensitive header redaction
69
69
  - request or response body leakage in diagnostics
70
- - SSRF-related behavior in redirects, URL normalization, proxy support, or
71
- future environment-driven configuration
70
+ - SSRF-related behavior in redirects, URL normalization, proxy support,
71
+ `trust_env` environment configuration, or future environment-driven behavior
72
72
  - header smuggling or unsafe manual framing headers
73
73
  - decompression, buffering, and response-body memory limits
74
74
  - denial of service through connection, request, pending queue, runtime, or
@@ -118,8 +118,9 @@ The following are usually out of scope unless they demonstrate a concrete
118
118
  FogHTTP vulnerability:
119
119
 
120
120
  - attacks that require arbitrary code execution in the caller process
121
- - reports about unsupported features such as proxy support, cookie jar behavior,
122
- multipart uploads, or HTTP/2 unless the current code exposes unsafe behavior
121
+ - reports about unsupported features such as proxy transport behavior, cookie
122
+ jar behavior, multipart uploads, or HTTP/2 unless the current code exposes
123
+ unsafe behavior
123
124
  - denial-of-service reports that ignore documented response and request limits
124
125
  - issues caused only by intentionally disabling security in user application
125
126
  code outside FogHTTP
@@ -0,0 +1,356 @@
1
+ # Benchmarks
2
+
3
+ Benchmark harness and full benchmark reports live in a separate repository:
4
+ [github.com/AmberFog/FogHttpBenchmark](https://github.com/AmberFog/FogHttpBenchmark).
5
+
6
+ The tables below are copied summary snapshots from that repository. They are
7
+ useful for release-to-release and client-to-client comparisons, but they are
8
+ local loopback benchmarks, not a universal prediction for real network latency.
9
+
10
+ This page is intentionally not a marketing scoreboard. Failed rows, skipped
11
+ clients, memory/resource limits, and known weak spots stay visible because they
12
+ are part of the engineering feedback loop.
13
+
14
+ ## Methodology
15
+
16
+ - Server: local asyncio HTTP/1.1 loopback server.
17
+ - Platform: `macOS-26.5-arm64-arm-64bit-Mach-O`.
18
+ - Python: `3.14.0`.
19
+ - Shuffle seed: `20260507`.
20
+ - Latest snapshot directory:
21
+ `results/full-foghttp-0.3.2-pypi-20260527-194316`.
22
+ - `sync:aiohttp` is skipped because aiohttp is async-only.
23
+ - Some suites skip clients that do not expose comparable APIs.
24
+ - Higher `ok/s`, `ops/s`, or successful `streams/s` is better.
25
+ - Lower `p95 ms`, threads, fds, and errors are better.
26
+ - Throughput and latency rows are only comparable when the row has `0`
27
+ measured errors and `0` warmup errors.
28
+ - Rows with failures are treated as compatibility, reliability, or safety
29
+ signals, not as successful throughput wins.
30
+ - Resource/backpressure suites intentionally trigger `PoolTimeout`,
31
+ `ResponseBodyTooLargeError`, and `ResponseBodyBudgetExceededError`; those are
32
+ expected rejections, not failed benchmark runs.
33
+
34
+ ## Snapshots
35
+
36
+ | Suite | Snapshot | Aggregate rows | Runs |
37
+ |---|---:|---:|---:|
38
+ | request workloads | `20260527-194741` | `324` | `972` |
39
+ | client creation | `20260527-194755` | `54` | `162` |
40
+ | resource/backpressure | `20260527-194955` | `36` | `108` |
41
+ | compressed response | `20260527-195433` | `162` | `486` |
42
+ | one upstream | `20260527-195934` | `144` | `432` |
43
+ | request builder | `20260527-200027` | `60` | `180` |
44
+ | response streaming | `20260527-201032` | `210` | `630` |
45
+ | delay/pool requests | `20260527-202555` | `72` | `216` |
46
+
47
+ ## Versions
48
+
49
+ | Package | Version |
50
+ |---|---:|
51
+ | FogHTTP | `0.3.2` |
52
+ | aiohttp | `3.13.5` |
53
+ | httpx | `0.28.1` |
54
+ | httpxyz | `0.31.2` |
55
+ | zapros | `0.11.1` |
56
+
57
+ ## Current Read
58
+
59
+ FogHTTP `0.3.2` looks strong on buffered request workloads, request building,
60
+ client defaults, compressed buffered responses, and bounded resource behavior.
61
+ The main weak area is response streaming, especially async short streams and
62
+ full line iteration.
63
+
64
+ | Area | What the latest run shows | Follow-up |
65
+ |---|---|---|
66
+ | Buffered requests | FogHTTP wins `59/72` successful request rows; sync wins `36/36`. | Keep watching async small JSON/POST rows where aiohttp is faster at `conc=1`. |
67
+ | Request builder | FogHTTP wins `20/20` build/prepared rows against httpx/httpxyz. | Stable; avoid unnecessary hot-path churn. |
68
+ | One upstream defaults | FogHTTP wins `48/48`; `base_url`, default headers/params, and prepared requests are cheap. | Stable foundation for API ergonomics. |
69
+ | Compressed responses | FogHTTP wins `33/36` success-only rows and passes stacked encodings. | Strong buffered feature; streaming decompression is still separate future work. |
70
+ | Resource/backpressure | Limits behave predictably; final buffered bytes return to `0`; recovery failures are `0`. | Continue using this suite as a safety gate. |
71
+ | Response streaming | FogHTTP wins `28/60` success-only rows; async wins only `8/30`. | Optimize async delivery and line iteration without hidden buffering. |
72
+
73
+ ```mermaid
74
+ xychart-beta
75
+ title "FogHTTP success-only wins by suite"
76
+ x-axis [requests, delay_pool, builder, one_upstream, compressed, streaming]
77
+ y-axis "win %" 0 --> 100
78
+ bar [82, 69, 100, 100, 92, 47]
79
+ ```
80
+
81
+ ```mermaid
82
+ xychart-beta
83
+ title "Selected FogHTTP streaming ratios vs best successful row"
84
+ x-axis [stream64k_async_c10, text64k_async_c50, lines10k_sync_c10, longline_sync_c1]
85
+ y-axis "FogHTTP / best" 0 --> 1
86
+ bar [0.48, 0.47, 0.32, 0.25]
87
+ ```
88
+
89
+ ## Request Workloads
90
+
91
+ Requests/run: `500`, warmup/run: `50`, repeats: `3`,
92
+ concurrency: `1,10,50,100`.
93
+
94
+ Scenarios: `json-small`, `json-decode-small`, `bytes-64k`,
95
+ `post-json-echo`, `post-echo-64k`, `redirect-get-302`,
96
+ `redirect-head-302`, `redirect-post-303`, `redirect-post-307`.
97
+
98
+ | Mode | Client | Wins | Median ok/s | Median p95 ms | Max threads | Max fds | Errors |
99
+ |---|---|---:|---:|---:|---:|---:|---:|
100
+ | async | aiohttp | `13/36` | `8020.5` | `3.82` | `2` | `207` | `0` |
101
+ | async | FogHTTP | `23/36` | `11286.1` | `2.13` | `18` | `210` | `0` |
102
+ | async | httpx | `0/36` | `1729.5` | `14.57` | `2` | `207` | `0` |
103
+ | async | httpxyz | `0/36` | `1735.1` | `14.59` | `2` | `207` | `0` |
104
+ | async | zapros | `0/36` | `4021.8` | `7.02` | `2` | `257` | `0` |
105
+ | sync | FogHTTP | `36/36` | `9147.0` | `3.44` | `118` | `234` | `0` |
106
+ | sync | httpx | `0/36` | `1179.2` | `23.52` | `102` | `109` | `0` |
107
+ | sync | httpxyz | `0/36` | `1180.9` | `19.94` | `102` | `109` | `0` |
108
+ | sync | zapros | `0/36` | `3339.1` | `8.46` | `102` | `282` | `0` |
109
+
110
+ FogHTTP is clearly competitive here. The honest weak spot is not the general
111
+ buffered path, but a few async low-concurrency rows where aiohttp has lower
112
+ fixed overhead for small request/response pairs.
113
+
114
+ ## Delay And Pool Workloads
115
+
116
+ Requests/run: `500`, warmup/run: `50`, repeats: `3`,
117
+ concurrency: `1,10,50,100`.
118
+
119
+ Scenarios: `delay-20ms`, `pool-contention-20ms`.
120
+
121
+ | Mode | Client | Wins | Median ok/s | Median p95 ms | Max threads | Max fds | Errors |
122
+ |---|---|---:|---:|---:|---:|---:|---:|
123
+ | async | aiohttp | `3/8` | `408.7` | `27.20` | `2` | `207` | `0` |
124
+ | async | FogHTTP | `4/8` | `425.2` | `26.64` | `18` | `210` | `0` |
125
+ | async | httpx | `1/8` | `285.5` | `524.78` | `2` | `107` | `0` |
126
+ | async | httpxyz | `0/8` | `343.3` | `36.79` | `2` | `207` | `0` |
127
+ | async | zapros | `0/8` | `384.5` | `30.70` | `2` | `207` | `0` |
128
+ | sync | FogHTTP | `7/8` | `425.5` | `24.56` | `118` | `210` | `0` |
129
+ | sync | httpx | `0/8` | `200.5` | `121.13` | `102` | `207` | `0` |
130
+ | sync | httpxyz | `1/8` | `297.2` | `76.88` | `102` | `207` | `0` |
131
+ | sync | zapros | `0/8` | `400.1` | `27.62` | `102` | `207` | `0` |
132
+
133
+ FogHTTP is close to the best async result and strong in sync mode. This suite
134
+ matters because the project is aimed at predictable concurrency, not only
135
+ maximum localhost throughput.
136
+
137
+ ## Client Creation And First Request
138
+
139
+ Iterations/run: `100`, client counts: `1,10,50`, repeats: `3`.
140
+
141
+ Scenarios: `create-close`, `create-first-request`,
142
+ `many-clients-open-close`, `reused-request`.
143
+
144
+ | Mode | Client | Wins | Median ops/s | Median p95 ms | Peak threads | Peak fds | Errors |
145
+ |---|---|---:|---:|---:|---:|---:|---:|
146
+ | async | aiohttp | `1/6` | `18300.5` | `0.051` | `0` | `2` | `0` |
147
+ | async | FogHTTP | `2/6` | `34478.6` | `0.032` | `1` | `5` | `0` |
148
+ | async | httpx | `0/6` | `354.0` | `2.813` | `0` | `2` | `0` |
149
+ | async | httpxyz | `0/6` | `352.5` | `2.851` | `0` | `2` | `0` |
150
+ | async | zapros | `3/6` | `35836.9` | `0.019` | `0` | `2` | `0` |
151
+ | sync | FogHTTP | `2/6` | `30186.1` | `0.036` | `1` | `5` | `0` |
152
+ | sync | httpx | `0/6` | `361.0` | `2.832` | `0` | `2` | `0` |
153
+ | sync | httpxyz | `0/6` | `357.0` | `2.926` | `0` | `2` | `0` |
154
+ | sync | zapros | `4/6` | `38112.9` | `0.018` | `0` | `2` | `0` |
155
+
156
+ Short-lived client creation is not the primary production usage pattern, but it
157
+ is still worth watching. FogHTTP is much faster than httpx/httpxyz in this
158
+ suite, while zapros remains better on several minimal lifecycle rows.
159
+
160
+ ## Request Builder
161
+
162
+ Iterations/run: `5000`, warmup/run: `500`, repeats: `3`.
163
+
164
+ This suite measures request construction without network I/O, plus a prepared
165
+ request send case through the local loopback server. aiohttp and zapros are
166
+ skipped because the suite requires comparable `build_request` support.
167
+
168
+ | Mode | Client | Kind | Rows | Median ops/s | Median p95 ms | Max threads | Max fds | Errors |
169
+ |---|---|---|---:|---:|---:|---:|---:|---:|
170
+ | async | FogHTTP | build | `9` | `149845.7` | `0.0069` | `3` | `8` | `0` |
171
+ | async | FogHTTP | send-prepared | `1` | `7944.3` | `0.1844` | `4` | `12` | `0` |
172
+ | async | httpx | build | `9` | `42722.0` | `0.0309` | `3` | `8` | `0` |
173
+ | async | httpx | send-prepared | `1` | `2107.7` | `0.6565` | `3` | `9` | `0` |
174
+ | async | httpxyz | build | `9` | `43938.1` | `0.0294` | `3` | `8` | `0` |
175
+ | async | httpxyz | send-prepared | `1` | `2177.7` | `0.5535` | `3` | `9` | `0` |
176
+ | sync | FogHTTP | build | `9` | `149884.2` | `0.0069` | `3` | `7` | `0` |
177
+ | sync | FogHTTP | send-prepared | `1` | `10202.4` | `0.1345` | `4` | `12` | `0` |
178
+ | sync | httpx | build | `9` | `44614.3` | `0.0276` | `3` | `7` | `0` |
179
+ | sync | httpx | send-prepared | `1` | `3478.3` | `0.3773` | `3` | `9` | `0` |
180
+ | sync | httpxyz | build | `9` | `42714.5` | `0.0295` | `3` | `7` | `0` |
181
+ | sync | httpxyz | send-prepared | `1` | `3546.6` | `0.3292` | `3` | `9` | `0` |
182
+
183
+ Request construction remains a strong area. This supports the current
184
+ Python-first API direction: base URL, params, headers, and body selection are
185
+ not making the request builder a bottleneck.
186
+
187
+ ## One Upstream Client Defaults
188
+
189
+ Requests/run: `1000`, warmup/run: `100`, repeats: `3`,
190
+ concurrency: `1,10,50`.
191
+
192
+ This suite compares direct requests with `base_url`, client defaults, prepared
193
+ requests, JSON bodies, and form bodies against one upstream. aiohttp and zapros
194
+ are skipped because the suite requires comparable client default support.
195
+
196
+ | Mode | Client | Wins | Median ok/s | Median p95 ms | Max threads | Max fds | Errors |
197
+ |---|---|---:|---:|---:|---:|---:|---:|
198
+ | async | FogHTTP | `24/24` | `9603.6` | `1.24` | `18` | `110` | `0` |
199
+ | async | httpx | `0/24` | `1549.2` | `5.98` | `2` | `107` | `0` |
200
+ | async | httpxyz | `0/24` | `2127.6` | `4.60` | `2` | `107` | `0` |
201
+ | sync | FogHTTP | `24/24` | `10327.1` | `1.01` | `68` | `110` | `0` |
202
+ | sync | httpx | `0/24` | `2019.6` | `6.62` | `52` | `107` | `0` |
203
+ | sync | httpxyz | `0/24` | `2062.8` | `6.47` | `52` | `107` | `0` |
204
+
205
+ Client defaults are currently cheap. This is useful because adoption-facing API
206
+ features should not quietly turn the hot path into a heavy Python layer.
207
+
208
+ ## Compressed Responses
209
+
210
+ Requests/run: `1000`, warmup/run: `100`, repeats: `3`,
211
+ concurrency: `1,10,50`.
212
+
213
+ Scenarios: `gzip-json-small`, `gzip-64k`, `deflate-64k`, `br-64k`,
214
+ `gzip-high-ratio-1m`, `multi-gzip-deflate-64k`.
215
+
216
+ | Mode | Client | Success rows | Wins | Median ok/s | Median p95 ms | Max threads | Max fds | Errors |
217
+ |---|---|---:|---:|---:|---:|---:|---:|---:|
218
+ | async | aiohttp | `15/18` | `3/15` | `6356.1` | `1.38` | `2` | `107` | `9000` |
219
+ | async | FogHTTP | `18/18` | `15/18` | `11984.9` | `0.92` | `18` | `110` | `0` |
220
+ | async | httpx | `18/18` | `0/18` | `1662.4` | `5.65` | `2` | `107` | `0` |
221
+ | async | httpxyz | `18/18` | `0/18` | `2217.5` | `4.39` | `2` | `107` | `0` |
222
+ | async | zapros | `15/18` | `0/15` | `3830.3` | `2.39` | `2` | `157` | `9000` |
223
+ | sync | FogHTTP | `18/18` | `18/18` | `14712.0` | `0.72` | `68` | `110` | `0` |
224
+ | sync | httpx | `18/18` | `0/18` | `2197.8` | `6.77` | `52` | `107` | `0` |
225
+ | sync | httpxyz | `18/18` | `0/18` | `2253.4` | `6.41` | `52` | `107` | `0` |
226
+ | sync | zapros | `15/18` | `0/15` | `4204.0` | `3.13` | `52` | `157` | `9000` |
227
+
228
+ The error totals come from stacked `Content-Encoding` rows for aiohttp and
229
+ zapros. They stay in the table because compatibility failures are useful
230
+ signals, but they are excluded from successful throughput comparisons.
231
+
232
+ FogHTTP's buffered decompression path is strong. This does not mean streaming
233
+ decompression is solved; streaming gzip/deflate/br remains a separate future
234
+ feature with different memory and partial-read semantics.
235
+
236
+ ## Response Streaming
237
+
238
+ Streams/run: `200`, warmup/run: `50`, repeats: `3`,
239
+ concurrency: `1,10,50`.
240
+
241
+ Scenarios: `stream-64k`, `stream-1m`, `drip-64k-1ms`,
242
+ `first-chunk-close-1m`, `text-64k`, `lines-10k`, `drip-lines-1ms`,
243
+ `unicode-lines`, `long-line-1m`, `first-line-close-10k`.
244
+
245
+ | Mode | Client | Success rows | Wins | Median streams/s | Median p95 ms | Max threads | Max fds | Errors |
246
+ |---|---|---:|---:|---:|---:|---:|---:|---:|
247
+ | async | aiohttp | `27/30` | `16/27` | `1873.8` | `6.68` | `3` | `157` | `1800` |
248
+ | async | FogHTTP | `30/30` | `8/30` | `1713.4` | `9.16` | `19` | `138` | `0` |
249
+ | async | httpx | `30/30` | `0/30` | `415.4` | `22.86` | `3` | `107` | `0` |
250
+ | async | httpxyz | `30/30` | `6/30` | `808.2` | `22.75` | `3` | `129` | `0` |
251
+ | sync | FogHTTP | `30/30` | `20/30` | `1384.1` | `9.31` | `69` | `195` | `0` |
252
+ | sync | httpx | `30/30` | `2/30` | `548.8` | `19.43` | `53` | `205` | `0` |
253
+ | sync | httpxyz | `30/30` | `8/30` | `585.1` | `18.88` | `53` | `207` | `0` |
254
+
255
+ This suite is the most important new signal. FogHTTP response streaming is
256
+ functionally healthy: full-consume rows produce reuse-eligible body outcomes,
257
+ early-close rows produce aborted/closed outcomes, and FogHTTP has `0` measured
258
+ streaming errors. But performance is uneven:
259
+
260
+ - full 1 MiB byte streams are good, especially async `stream-1m`;
261
+ - early close is healthy and observable;
262
+ - async 64 KiB byte and text streams still have high fixed overhead compared
263
+ with aiohttp;
264
+ - full line iteration is the largest bottleneck in both sync and async modes.
265
+
266
+ ### Streaming Bottlenecks
267
+
268
+ The rows below show FogHTTP against the best successful client for selected
269
+ weak scenarios. Failed competitor rows, such as aiohttp `LineTooLong`, are not
270
+ counted as successful wins.
271
+
272
+ | Scenario | FogHTTP / best | FogHTTP streams/s | Best client | Best streams/s | FogHTTP p95 ms | Best p95 ms |
273
+ |---|---:|---:|---|---:|---:|---:|
274
+ | `sync / long-line-1m / c1 / lines / all` | `0.25x` | `149.0` | httpxyz | `595.4` | `6.93` | `2.02` |
275
+ | `sync / long-line-1m / c10 / lines / all` | `0.26x` | `151.0` | httpxyz | `574.7` | `67.20` | `17.00` |
276
+ | `async / long-line-1m / c10 / lines / all` | `0.30x` | `169.2` | httpxyz | `568.3` | `67.96` | `18.19` |
277
+ | `sync / lines-10k / c1 / lines / all` | `0.32x` | `161.6` | httpxyz | `502.4` | `6.34` | `2.20` |
278
+ | `sync / lines-10k / c10 / lines / all` | `0.32x` | `160.0` | httpxyz | `495.5` | `63.19` | `20.04` |
279
+ | `async / long-line-1m / c50 / lines / all` | `0.33x` | `171.4` | httpxyz | `525.5` | `302.49` | `92.89` |
280
+ | `async / lines-10k / c1 / lines / all` | `0.40x` | `148.4` | httpxyz | `373.0` | `6.89` | `2.98` |
281
+ | `async / stream-64k / c50 / bytes / all` | `0.46x` | `4549.2` | aiohttp | `9783.5` | `7.44` | `5.31` |
282
+ | `async / text-64k / c50 / text / all` | `0.47x` | `4553.6` | aiohttp | `9756.0` | `11.12` | `5.31` |
283
+ | `async / stream-64k / c10 / bytes / all` | `0.48x` | `4672.1` | aiohttp | `9635.3` | `1.90` | `1.06` |
284
+ | `async / text-64k / c1 / text / all` | `0.51x` | `2438.0` | aiohttp | `4813.6` | `0.41` | `0.19` |
285
+
286
+ The target for future optimization is not to win every row at any cost. A good
287
+ result would be to bring common weak rows closer to `0.8x-1.0x` of the best
288
+ successful client while preserving bounded memory, explicit cleanup,
289
+ cancellation safety, and honest telemetry.
290
+
291
+ ## Resource And Backpressure Workloads
292
+
293
+ Requests/run: `200`, warmup/run: `0`, repeats: `3`,
294
+ concurrency: `10,50,100`.
295
+
296
+ Scenarios: `active-limit-serial`, `aggregate-buffered-budget`,
297
+ `pending-queue-full`, `per-origin-isolation`, `pool-timeout-recovery`,
298
+ `response-body-limit`.
299
+
300
+ | Mode | Scenario | Total ok | Median errors % | Median p95 ms | Peak active | Peak pending | Peak buffered bytes | Pool timeouts | Budget rejects | Final buffered bytes | Recovery failures | Max threads | Max fds |
301
+ |---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
302
+ | async | active-limit-serial | `1800` | `0.00` | `1068.26` | `1` | `99` | `106` | `0` | `0` | `0` | `0` | `3` | `13` |
303
+ | async | aggregate-buffered-budget | `10` | `99.50` | `27.12` | `10` | `90` | `98304` | `0` | `199` | `0` | `0` | `12` | `56` |
304
+ | async | pending-queue-full | `0` | `100.00` | `2.78` | `0` | `0` | `0` | `200` | `0` | `0` | `0` | `3` | `11` |
305
+ | async | per-origin-isolation | `1800` | `0.00` | `537.93` | `2` | `98` | `212` | `0` | `0` | `0` | `0` | `4` | `15` |
306
+ | async | pool-timeout-recovery | `35` | `99.00` | `9.74` | `1` | `99` | `106` | `199` | `0` | `0` | `0` | `3` | `13` |
307
+ | async | response-body-limit | `0` | `100.00` | `11.92` | `1` | `99` | `0` | `0` | `0` | `0` | `0` | `3` | `13` |
308
+ | sync | active-limit-serial | `1800` | `0.00` | `1056.93` | `1` | `99` | `106` | `0` | `0` | `0` | `0` | `103` | `14` |
309
+ | sync | aggregate-buffered-budget | `8` | `99.50` | `26.45` | `10` | `90` | `98304` | `0` | `200` | `0` | `0` | `112` | `62` |
310
+ | sync | pending-queue-full | `0` | `100.00` | `0.03` | `0` | `0` | `0` | `200` | `0` | `0` | `0` | `3` | `11` |
311
+ | sync | per-origin-isolation | `1800` | `0.00` | `534.30` | `2` | `98` | `212` | `0` | `0` | `0` | `0` | `104` | `15` |
312
+ | sync | pool-timeout-recovery | `33` | `99.00` | `7.66` | `1` | `99` | `106` | `199` | `0` | `0` | `0` | `103` | `13` |
313
+ | sync | response-body-limit | `0` | `100.00` | `14.16` | `1` | `99` | `0` | `0` | `0` | `0` | `0` | `103` | `13` |
314
+
315
+ ```mermaid
316
+ flowchart LR
317
+ requests["concurrent requests"] --> active["active request slots"]
318
+ requests --> pending["pending queue"]
319
+ active --> body_limit["per-response body limit"]
320
+ active --> buffered_budget["aggregate buffered budget"]
321
+ pending --> pool_timeout["PoolTimeout"]
322
+ body_limit --> body_too_large["ResponseBodyTooLargeError"]
323
+ buffered_budget --> budget_exceeded["ResponseBodyBudgetExceededError"]
324
+ budget_exceeded --> released["final buffered bytes = 0"]
325
+ ```
326
+
327
+ These rows are expected to contain rejections. The important result is that the
328
+ resource model is bounded and observable:
329
+
330
+ - `active-limit-serial` holds active requests at `1`.
331
+ - `per-origin-isolation` holds total active requests at `2`.
332
+ - `pending-queue-full` fails fast with `PoolTimeout`.
333
+ - `pool-timeout-recovery` records expected timeouts and recovery failures stay
334
+ at `0`.
335
+ - `response-body-limit` fails with `ResponseBodyTooLargeError`.
336
+ - `aggregate-buffered-budget` caps peak buffered bytes at `98304` and returns
337
+ final buffered bytes to `0`.
338
+
339
+ ## Known Bottlenecks
340
+
341
+ These are the most useful follow-up signals from the latest benchmark run:
342
+
343
+ - Async short response streaming has fixed overhead. The likely area is the
344
+ Rust/Tokio to Python async delivery path around chunk futures, callbacks, and
345
+ bytes conversion.
346
+ - Streaming line iteration is CPU/allocation heavy in both sync and async
347
+ modes. `lines-10k` and `long-line-1m` are the clearest bottlenecks.
348
+ - Client creation is fast enough for normal reuse-oriented workloads, but
349
+ zapros is still better in several minimal create/open-close rows.
350
+ - Thread count is higher for FogHTTP sync concurrency because sync calls bridge
351
+ into the Rust runtime from Python worker threads. This is expected today, but
352
+ it remains an operational trade-off to watch.
353
+
354
+ The optimization goal is to reduce these gaps without hidden full-body
355
+ buffering, without weakening cancellation or cleanup semantics, and without
356
+ turning the default hot path into a Python callback framework.
@@ -55,6 +55,12 @@ FogHTTP is designed around a few engineering priorities:
55
55
  custom-only CA trust
56
56
  - global and per-origin request backpressure with per-origin acquire pressure
57
57
  snapshots and stuck request diagnostics for operational visibility
58
+ - opt-in typed telemetry event hooks with redacted request/response lifecycle
59
+ events
60
+ - versioned telemetry snapshots that separate alert-oriented stats from
61
+ diagnostic dump APIs
62
+ - opt-in async lifecycle debug snapshots for tests, staging, and incident
63
+ diagnostics
58
64
 
59
65
  Until version `0.5.0`, backward compatibility is not guaranteed. I will still
60
66
  try to keep public interfaces stable and avoid unnecessary breaking changes.
@@ -65,8 +71,10 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
65
71
  - [Request builder compatibility](./request-builder.md)
66
72
  - [Client lifecycle](./lifecycle.md)
67
73
  - [Timeout model](./timeouts.md)
74
+ - [Telemetry contract](./telemetry.md)
68
75
  - [Response streaming](./streaming.md)
69
76
  - [TLS trust](./tls.md)
77
+ - [Proxy and trust_env](./proxies.md)
70
78
  - [Use cases](./use-cases.md)
71
79
  - [Redirects](./redirects.md)
72
80
  - [Limitations](./limitations.md)
@@ -110,13 +118,23 @@ try to keep public interfaces stable and avoid unnecessary breaking changes.
110
118
  - global active request limits, per-origin active request limits, pending
111
119
  acquire limits, per-origin acquire pressure snapshots, and stuck request
112
120
  diagnostics
121
+ - opt-in typed telemetry event hooks for request, redirect, response headers,
122
+ response body, and request completion lifecycle
123
+ - versioned telemetry snapshot metadata for `stats()`, `dump_transport_state()`,
124
+ and `dump_pool_diagnostics()`
125
+ - opt-in async lifecycle debug mode for active request snapshots and strict
126
+ leak checks
127
+ - HTTP proxy routing and HTTPS `CONNECT` tunnelling through explicit `proxy=` or
128
+ `trust_env=True` (`HTTP_PROXY` / `HTTPS_PROXY` / `ALL_PROXY`) when the proxy
129
+ endpoint uses `http://`, with target-host TLS validation for tunnelled HTTPS
113
130
  - default per-response and aggregate buffered response body limits
114
131
  - grouped HTTP status constants and reusable HTTP method constants
115
132
 
116
133
  ## Not Yet
117
134
 
118
135
  FogHTTP does not yet implement streaming uploads, cookies, multipart uploads,
119
- proxy support, `trust_env`, HTTP/2, automatic `Accept-Encoding` negotiation,
120
- streaming decompression, or advanced authentication helpers. Disabling TLS
121
- verification is intentionally not supported. See [Limitations](./limitations.md)
122
- for details.
136
+ HTTP/2, automatic `Accept-Encoding` negotiation, streaming decompression, or
137
+ advanced authentication helpers. `trust_env` supports HTTP proxy routing, HTTPS
138
+ `CONNECT` tunnelling through `http://` proxy endpoints, and `SSL_CERT_FILE`.
139
+ Disabling TLS verification is intentionally not supported. See
140
+ [Limitations](./limitations.md) for details.