workers-runtime-sdk 1.6.9__tar.gz → 1.6.11__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 (167) hide show
  1. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/CHANGELOG.md +17 -0
  2. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/PKG-INFO +1 -1
  3. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/pyproject.toml +1 -1
  4. workers_runtime_sdk-1.6.11/src/_workers_sdk_package_patches.py +45 -0
  5. workers_runtime_sdk-1.6.11/src/_workers_sdk_patch_loader.pth +1 -0
  6. workers_runtime_sdk-1.6.11/src/_workers_sdk_patch_loader.py +16 -0
  7. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/asgi.py +19 -0
  8. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/src/static/app.css +4 -0
  9. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/src/static/data.json +1 -0
  10. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/src/static/hello.txt +1 -0
  11. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/src/static/index.html +7 -0
  12. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/src/test_staticfiles.py +117 -0
  13. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/src/worker.py +16 -0
  14. workers_runtime_sdk-1.6.11/tests/web-frameworks-test/fastapi-tests/wrangler.jsonc +21 -0
  15. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi/tests/test_asgi.py +13 -0
  16. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi/worker.py +28 -0
  17. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/uv.lock +1 -1
  18. workers_runtime_sdk-1.6.9/src/_workers_sdk_entropy_import_context.pth +0 -1
  19. workers_runtime_sdk-1.6.9/src/_workers_sdk_entropy_import_context_loader.py +0 -13
  20. workers_runtime_sdk-1.6.9/tests/web-frameworks-test/fastapi-tests/wrangler.jsonc +0 -11
  21. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/.gitignore +0 -0
  22. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/AGENTS.md +0 -0
  23. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/README.md +0 -0
  24. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/_cloudflare_compat_flags.pyi +0 -0
  25. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/_pyodide_entrypoint_helper.pyi +0 -0
  26. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/_workers_sdk_entropy_import_context.py +0 -0
  27. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/__init__.py +0 -0
  28. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/blob.py +0 -0
  29. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/entrypoints.py +0 -0
  30. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/fetch.py +0 -0
  31. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/formdata.py +0 -0
  32. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/py.typed +0 -0
  33. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/request.py +0 -0
  34. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/response.py +0 -0
  35. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/rpc.py +0 -0
  36. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/types.py +0 -0
  37. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/utils.py +0 -0
  38. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/workflows.py +0 -0
  39. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/src/workers/wsgi.py +0 -0
  40. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/public/data.json +0 -0
  41. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/public/hello.txt +0 -0
  42. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/pyproject.toml +0 -0
  43. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/conftest.py +0 -0
  44. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_analytics_engine.py +0 -0
  45. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_assets.py +0 -0
  46. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_d1.py +0 -0
  47. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_do.py +0 -0
  48. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_images.py +0 -0
  49. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_kv.py +0 -0
  50. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_mtls.py +0 -0
  51. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_queue.py +0 -0
  52. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_r2.py +0 -0
  53. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_ratelimit.py +0 -0
  54. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_vectorize.py +0 -0
  55. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_version_metadata.py +0 -0
  56. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/test_workflow.py +0 -0
  57. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/worker.py +0 -0
  58. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/worker_durable_object.py +0 -0
  59. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/src/worker_workflow.py +0 -0
  60. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/bindings-test/wrangler.jsonc +0 -0
  61. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/conftest.py +0 -0
  62. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/test_bindings.py +0 -0
  63. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/test_fastapi.py +0 -0
  64. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/test_in_workerd.py +0 -0
  65. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/test_web_frameworks.py +0 -0
  66. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/pyproject.toml +0 -0
  67. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/_client.py +0 -0
  68. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/conftest.py +0 -0
  69. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/__init__.py +0 -0
  70. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/api_urls.py +0 -0
  71. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/auth_backend.py +0 -0
  72. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/drf_auth.py +0 -0
  73. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/drf_serializers.py +0 -0
  74. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/drf_throttling.py +0 -0
  75. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/drf_views.py +0 -0
  76. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/forms.py +0 -0
  77. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/middleware.py +0 -0
  78. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/templatetags/__init__.py +0 -0
  79. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/templatetags/custom_tags.py +0 -0
  80. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/urls.py +0 -0
  81. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/django_app/views.py +0 -0
  82. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/templates/base.html +0 -0
  83. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/templates/context_test.html +0 -0
  84. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/templates/csrf_form.html +0 -0
  85. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/templates/hello.html +0 -0
  86. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_async_utilities.py +0 -0
  87. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_auth.py +0 -0
  88. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_caching.py +0 -0
  89. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_cors.py +0 -0
  90. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_csrf.py +0 -0
  91. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_auth_permissions.py +0 -0
  92. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_content_negotiation.py +0 -0
  93. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_serializers.py +0 -0
  94. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_throttling.py +0 -0
  95. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_versioning.py +0 -0
  96. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_drf_views.py +0 -0
  97. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_error_handling.py +0 -0
  98. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_file_uploads.py +0 -0
  99. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_forms.py +0 -0
  100. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_middleware.py +0 -0
  101. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_pagination.py +0 -0
  102. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_request_response.py +0 -0
  103. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_sessions.py +0 -0
  104. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_signals.py +0 -0
  105. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_streaming.py +0 -0
  106. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_templates.py +0 -0
  107. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_url_routing.py +0 -0
  108. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/test_views_basic.py +0 -0
  109. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/src/worker.py +0 -0
  110. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/django-async/wrangler.jsonc +0 -0
  111. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/public/data.json +0 -0
  112. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/public/index.html +0 -0
  113. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/public/style.css +0 -0
  114. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/pyproject.toml +0 -0
  115. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/src/_client.py +0 -0
  116. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/src/conftest.py +0 -0
  117. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/web-frameworks-test/fastapi-tests/src/test_assets.py +0 -0
  118. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi/asgi.wd-test +0 -0
  119. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi/pyproject.toml +0 -0
  120. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi/wrangler.jsonc +0 -0
  121. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi-ws-disconnect/asgi-ws-disconnect.wd-test +0 -0
  122. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi-ws-disconnect/pyproject.toml +0 -0
  123. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi-ws-disconnect/tests/test_ws_disconnect.py +0 -0
  124. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi-ws-disconnect/worker.py +0 -0
  125. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/asgi-ws-disconnect/wrangler.jsonc +0 -0
  126. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object/durable-object.wd-test +0 -0
  127. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object/pyproject.toml +0 -0
  128. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object/worker.py +0 -0
  129. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object/wrangler.jsonc +0 -0
  130. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-abort/durable-object-abort.wd-test +0 -0
  131. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-abort/pyproject.toml +0 -0
  132. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-abort/worker.py +0 -0
  133. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-abort/wrangler.jsonc +0 -0
  134. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-inheritance/durable-object-inheritance.wd-test +0 -0
  135. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-inheritance/pyproject.toml +0 -0
  136. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-inheritance/worker.py +0 -0
  137. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-inheritance/wrangler.jsonc +0 -0
  138. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-websocket/durable-object-websocket.wd-test +0 -0
  139. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-websocket/pyproject.toml +0 -0
  140. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-websocket/tester.js +0 -0
  141. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-websocket/worker.py +0 -0
  142. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/durable-object-websocket/wrangler.jsonc +0 -0
  143. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/entropy-patches.wd-test +0 -0
  144. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/pyproject.toml +0 -0
  145. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_aiohttp_websocket.py +0 -0
  146. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_langsmith.py +0 -0
  147. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_numpy.py +0 -0
  148. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_pydantic.py +0 -0
  149. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_rust_packages.py +0 -0
  150. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/tests/test_ssl_avoidance.py +0 -0
  151. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/worker.py +0 -0
  152. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/entropy-patches/wrangler.jsonc +0 -0
  153. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/python-rpc/pyproject.toml +0 -0
  154. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/python-rpc/python-rpc.wd-test +0 -0
  155. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/python-rpc/worker.js +0 -0
  156. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/python-rpc/worker.py +0 -0
  157. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/python-rpc/wrangler.jsonc +0 -0
  158. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/pyproject.toml +0 -0
  159. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/sdk.wd-test +0 -0
  160. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/server.py +0 -0
  161. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/tests/test_sdk.py +0 -0
  162. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/worker.py +0 -0
  163. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/sdk/wrangler.jsonc +0 -0
  164. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/wsgi/pyproject.toml +0 -0
  165. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/wsgi/worker.py +0 -0
  166. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/wsgi/wrangler.jsonc +0 -0
  167. {workers_runtime_sdk-1.6.9 → workers_runtime_sdk-1.6.11}/tests/workerd-test/wsgi/wsgi.wd-test +0 -0
@@ -2,6 +2,23 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v1.6.11 (2026-08-10)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Implements tests for FastAPI StaticFiles and anyio thread patch
10
+ ([`a30f53e`](https://github.com/cloudflare/workers-py/commit/a30f53e95edcf42fc93e5e2dc84251121881418b))
11
+
12
+
13
+ ## v1.6.10 (2026-08-10)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **runtime-sdk**: Terminate the response stream when the app fails mid-stream
18
+ ([#168](https://github.com/cloudflare/workers-py/pull/168),
19
+ [`fd4dde9`](https://github.com/cloudflare/workers-py/commit/fd4dde98fcc39f405a7cf320a6db49a83426f46b))
20
+
21
+
5
22
  ## v1.6.9 (2026-08-10)
6
23
 
7
24
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workers-runtime-sdk
3
- Version: 1.6.9
3
+ Version: 1.6.11
4
4
  Summary: Python SDK for Cloudflare Workers
5
5
  Project-URL: Homepage, https://github.com/cloudflare/workers-py
6
6
  Project-URL: Bug Tracker, https://github.com/cloudflare/workers-py/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "workers-runtime-sdk"
7
- version = "1.6.9"
7
+ version = "1.6.11"
8
8
  description = "Python SDK for Cloudflare Workers"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -0,0 +1,45 @@
1
+ """
2
+ Top level runtime compatibility patches for packages.
3
+
4
+ These patches adapt packages that assume capabilities the workers runtime does
5
+ not provide. Unlike the entropy patches, they are not related to snapshotting.
6
+ """
7
+
8
+ from contextlib import contextmanager
9
+
10
+ from _cloudflare.import_patch_manager import (
11
+ register_exec_patch,
12
+ )
13
+
14
+
15
+ @register_exec_patch("anyio.to_thread")
16
+ @contextmanager
17
+ def anyio_to_thread_context(module):
18
+ """`anyio.to_thread.run_sync` dispatches blocking work to an OS thread, but the
19
+ workers runtime is single threaded, so starting a thread raises
20
+ `RuntimeError: can't start new thread`. Run the callable inline instead.
21
+
22
+ This function is the only caller of `run_sync_in_worker_thread`, which makes it
23
+ the single chokepoint for every blocking call anyio makes on behalf of a
24
+ framework. In starlette/fastapi that covers sync route handlers, sync
25
+ dependencies, `StaticFiles`, `FileResponse`, `UploadFile`, `BackgroundTask` and
26
+ `GZipMiddleware`, as well as `anyio.Path` and `anyio.open_file`.
27
+
28
+ Patching the module attribute is enough because every caller looks it up at
29
+ call time (e.g. `starlette.concurrency` and `anyio._core._fileio` both import
30
+ the module rather than the function).
31
+
32
+ We patch `anyio.to_thread` rather than the backend's
33
+ `run_sync_in_worker_thread` because `anyio._backends._asyncio` is imported
34
+ lazily by `get_async_backend()` during a request, by which point the import
35
+ patch manager is no longer installed.
36
+ """
37
+ yield
38
+
39
+ async def run_sync(func, *args, **kwargs):
40
+ # Callers pass the function's own arguments positionally and anyio's
41
+ # options (`limiter`, `abandon_on_cancel`, `cancellable`) as keywords.
42
+ # None of the options mean anything without threads, so drop them.
43
+ return func(*args)
44
+
45
+ module.run_sync = run_sync
@@ -0,0 +1 @@
1
+ import _workers_sdk_patch_loader
@@ -0,0 +1,16 @@
1
+ """
2
+ Loader shim for the top level package patches.
3
+
4
+ This module is imported by the .pth file on every Python startup. The patches
5
+ depend on the `_cloudflare` package, which only exists inside the workers
6
+ runtime. When running outside of the workers runtime, `_cloudflare` is not
7
+ available, so we silently skip loading the patches. Skipping is also what we
8
+ want in that case: the patches adapt packages to the workers runtime and should
9
+ not change how they behave under native Python.
10
+ """
11
+
12
+ import importlib.util
13
+
14
+ if importlib.util.find_spec("_cloudflare") is not None:
15
+ import _workers_sdk_entropy_import_context # noqa: F401
16
+ import _workers_sdk_package_patches # noqa: F401
@@ -28,6 +28,13 @@ def run_in_background(coro: Awaitable[Any]) -> None:
28
28
  fut.add_done_callback(_on_done)
29
29
 
30
30
 
31
+ async def close_stream_quietly(writer):
32
+ try:
33
+ await writer.close()
34
+ except Exception:
35
+ logger.debug("Closing the response stream failed", exc_info=True)
36
+
37
+
31
38
  @contextmanager
32
39
  def acquire_js_buffer(pybuffer):
33
40
  from pyodide.ffi import create_proxy
@@ -182,6 +189,7 @@ async def process_request(
182
189
 
183
190
  # Streaming state — initialized lazily on first body chunk with more_body=True.
184
191
  writer = None
192
+ writer_closed = False
185
193
 
186
194
  receive_queue = Queue()
187
195
  if req.body:
@@ -208,6 +216,7 @@ async def process_request(
208
216
  nonlocal status
209
217
  nonlocal headers
210
218
  nonlocal writer
219
+ nonlocal writer_closed
211
220
 
212
221
  if got["type"] == "http.response.start":
213
222
  status = got["status"]
@@ -224,6 +233,7 @@ async def process_request(
224
233
  await writer.write(jsbytes.slice())
225
234
  if not more_body:
226
235
  await writer.close()
236
+ writer_closed = True
227
237
  finished_response.set()
228
238
  elif more_body:
229
239
  # First body chunk with more data coming — switch to streaming.
@@ -275,6 +285,15 @@ async def process_request(
275
285
  # Response already sent — exception can't be propagated to the
276
286
  # client, so log it to avoid silently swallowing errors.
277
287
  logger.exception("Exception in ASGI application after response started")
288
+ finished_response.set()
289
+ if writer is not None and not writer_closed:
290
+ # End the body so a client reading it sees the stream stop
291
+ # instead of waiting forever for chunks that will never
292
+ # come. Deliberately not awaited: close() settles only once
293
+ # the queued chunks reach a consumer, so a response body
294
+ # that nobody reads would block this task, which the
295
+ # runtime is waiting on through wait_until.
296
+ run_in_background(close_stream_quietly(writer))
278
297
 
279
298
  # Create task to run the application in the background
280
299
  app_task = create_proxy(create_task(run_app()))
@@ -0,0 +1,4 @@
1
+ body {
2
+ font-family: monospace;
3
+ color: rebeccapurple;
4
+ }
@@ -0,0 +1 @@
1
+ {"source": "staticfiles", "number": 7}
@@ -0,0 +1,7 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head><title>FastAPI StaticFiles Test</title></head>
4
+ <body>
5
+ <h1>Hello from StaticFiles</h1>
6
+ </body>
7
+ </html>
@@ -0,0 +1,117 @@
1
+ """Tests for FastAPI's native static file APIs (StaticFiles and FileResponse).
2
+
3
+ Unlike ``test_assets.py``, which proxies to the Workers Assets binding, these
4
+ tests exercise Starlette's own filesystem-backed static file serving against
5
+ files bundled into the worker under ``src/static/``.
6
+ """
7
+
8
+ import pytest
9
+ from _client import fetch, get_json, read_json
10
+
11
+
12
+ @pytest.mark.asyncio
13
+ async def test_staticfiles_serves_text(fastapi_app):
14
+ """Mounted StaticFiles app serves a bundled text file."""
15
+ resp = await fetch(fastapi_app, "/static/hello.txt")
16
+ assert resp.status == 200
17
+ text = await resp.text()
18
+ assert "Hello from StaticFiles" in text
19
+
20
+
21
+ @pytest.mark.asyncio
22
+ async def test_staticfiles_serves_html(fastapi_app):
23
+ """Mounted StaticFiles app serves a bundled HTML file."""
24
+ resp = await fetch(fastapi_app, "/static/index.html")
25
+ assert resp.status == 200
26
+ text = await resp.text()
27
+ assert "Hello from StaticFiles" in text
28
+ assert "<!doctype html>" in text.lower()
29
+
30
+
31
+ @pytest.mark.asyncio
32
+ async def test_staticfiles_guesses_content_type(fastapi_app):
33
+ """StaticFiles infers the content type from the file extension."""
34
+ resp = await fetch(fastapi_app, "/static/app.css")
35
+ assert resp.status == 200
36
+ assert "css" in resp.headers.get("content-type")
37
+
38
+
39
+ @pytest.mark.asyncio
40
+ async def test_staticfiles_serves_json(fastapi_app):
41
+ """StaticFiles serves a JSON file that is parseable and correctly typed."""
42
+ resp = await fetch(fastapi_app, "/static/data.json")
43
+ assert resp.status == 200
44
+ assert "application/json" in resp.headers.get("content-type")
45
+ data = await read_json(resp)
46
+ assert data["source"] == "staticfiles"
47
+ assert data["number"] == 7
48
+
49
+
50
+ @pytest.mark.asyncio
51
+ async def test_staticfiles_sets_content_length(fastapi_app):
52
+ """StaticFiles reports the on-disk size and sends exactly that many bytes."""
53
+ resp = await fetch(fastapi_app, "/static/hello.txt")
54
+ assert resp.status == 200
55
+ content_length = resp.headers.get("content-length")
56
+ assert content_length is not None
57
+ body = (await resp.text()).encode()
58
+ assert len(body) == int(content_length)
59
+
60
+
61
+ @pytest.mark.asyncio
62
+ async def test_staticfiles_sets_validators(fastapi_app):
63
+ """StaticFiles derives etag and last-modified headers from the file stat."""
64
+ resp = await fetch(fastapi_app, "/static/hello.txt")
65
+ assert resp.status == 200
66
+ assert resp.headers.get("etag")
67
+ assert resp.headers.get("last-modified")
68
+
69
+
70
+ @pytest.mark.asyncio
71
+ async def test_staticfiles_honours_if_none_match(fastapi_app):
72
+ """A conditional request matching the etag gets a 304 with no body."""
73
+ first = await fetch(fastapi_app, "/static/hello.txt")
74
+ etag = first.headers.get("etag")
75
+ assert etag
76
+
77
+ second = await fetch(
78
+ fastapi_app, "/static/hello.txt", headers={"if-none-match": etag}
79
+ )
80
+ assert second.status == 304
81
+ assert await second.text() == ""
82
+
83
+
84
+ @pytest.mark.asyncio
85
+ async def test_staticfiles_missing_file_returns_404(fastapi_app):
86
+ """StaticFiles returns 404 for a file that is not bundled."""
87
+ resp = await fetch(fastapi_app, "/static/nonexistent.txt")
88
+ assert resp.status == 404
89
+
90
+
91
+ @pytest.mark.asyncio
92
+ async def test_file_response_serves_file(fastapi_app):
93
+ """A route returning FileResponse streams the bundled file."""
94
+ resp = await fetch(fastapi_app, "/native-file")
95
+ assert resp.status == 200
96
+ assert "text/plain" in resp.headers.get("content-type")
97
+ text = await resp.text()
98
+ assert "Hello from StaticFiles" in text
99
+
100
+
101
+ @pytest.mark.asyncio
102
+ async def test_file_response_sets_content_length(fastapi_app):
103
+ """FileResponse reports the on-disk size and sends exactly that many bytes."""
104
+ resp = await fetch(fastapi_app, "/native-file")
105
+ assert resp.status == 200
106
+ content_length = resp.headers.get("content-length")
107
+ assert content_length is not None
108
+ body = (await resp.text()).encode()
109
+ assert len(body) == int(content_length)
110
+
111
+
112
+ @pytest.mark.asyncio
113
+ async def test_api_route_still_works(fastapi_app, env):
114
+ """API routes are unaffected by the StaticFiles mount."""
115
+ resp, data = await get_json(fastapi_app, "/api/hello", env=env)
116
+ assert resp.status == 200
117
+ assert data["message"] == "Hello from FastAPI"
@@ -1,9 +1,12 @@
1
1
  import asyncio
2
2
  import importlib.util
3
+ from pathlib import Path
3
4
 
4
5
  import pytest
5
6
  from fastapi import FastAPI, Request
7
+ from fastapi.responses import FileResponse
6
8
  from fastapi.responses import Response as FastAPIResponse
9
+ from fastapi.staticfiles import StaticFiles
7
10
  from pyodide.webloop import WebLoop
8
11
 
9
12
  import asgi
@@ -17,6 +20,8 @@ async def _noop(*args):
17
20
  WebLoop.shutdown_asyncgens = _noop
18
21
  WebLoop.shutdown_default_executor = _noop
19
22
 
23
+ STATIC_DIR = Path(__file__).parent / "static"
24
+
20
25
  app = FastAPI()
21
26
 
22
27
 
@@ -30,6 +35,17 @@ async def health():
30
35
  return {"ok": True}
31
36
 
32
37
 
38
+ @app.get("/native-file")
39
+ async def native_file():
40
+ """Serve a single bundled file with FastAPI's native FileResponse."""
41
+ return FileResponse(STATIC_DIR / "hello.txt", media_type="text/plain")
42
+
43
+
44
+ # Mounted before the catch-all below so `/static/*` is handled by Starlette's
45
+ # own filesystem-backed static file app rather than the Assets binding.
46
+ app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
47
+
48
+
33
49
  @app.get("/{path:path}")
34
50
  async def frontend(path: str, request: Request):
35
51
  """Proxy static asset requests to the Workers Assets binding."""
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "fastapi-tests",
3
+ "main": "src/worker.py",
4
+ "compatibility_date": "%COMPAT_DATE",
5
+ "compatibility_flags": ["python_workers"],
6
+ // Only `**/*.txt` and `**/*.html` are bundled as Text by default, so the
7
+ // other `src/static/` fixtures would never reach the Pyodide filesystem for
8
+ // StaticFiles to read. `fallthrough` keeps the default Text rule as well.
9
+ "rules": [
10
+ {
11
+ "type": "Text",
12
+ "globs": ["static/*.css", "static/*.json"],
13
+ "fallthrough": true
14
+ }
15
+ ],
16
+ "assets": {
17
+ "directory": "./public/",
18
+ "binding": "ASSETS",
19
+ "run_worker_first": true
20
+ }
21
+ }
@@ -399,3 +399,16 @@ async def test_scope_path_is_percent_decoded():
399
399
  async def test_scope_exposes_raw_path():
400
400
  scope = await _scope("/scope/hello%20world")
401
401
  assert scope["raw_path"] == "/scope/hello%20world"
402
+
403
+
404
+ @pytest.mark.asyncio
405
+ async def test_late_stream_failure_terminates_response():
406
+ # An app that raises after the streaming response started must terminate
407
+ # the stream (truncated EOF) instead of leaving the client hanging; a
408
+ # regression here surfaces as a timeout or workerd's hung-request
409
+ # cancellation instead of a clean read.
410
+ response = await asyncio.wait_for(
411
+ env.SELF.fetch("http://example.com/stream-late-failure"), timeout=5
412
+ )
413
+ body = await asyncio.wait_for(response.text(), timeout=5)
414
+ assert body == "chunk-1"
@@ -182,6 +182,29 @@ class StreamingApp:
182
182
  # ---------------------------------------------------------------------------
183
183
 
184
184
 
185
+ class LateFailureStreamApp:
186
+ """Starts a streaming response, then raises: the stream must terminate."""
187
+
188
+ async def __call__(self, scope, receive, send):
189
+ if scope["type"] == "lifespan":
190
+ message = await receive()
191
+ if message["type"] == "lifespan.startup":
192
+ await send({"type": "lifespan.startup.complete"})
193
+ return
194
+ await receive()
195
+ await send(
196
+ {
197
+ "type": "http.response.start",
198
+ "status": 200,
199
+ "headers": [(b"content-type", b"application/octet-stream")],
200
+ }
201
+ )
202
+ await send(
203
+ {"type": "http.response.body", "body": b"chunk-1", "more_body": True}
204
+ )
205
+ raise RuntimeError("app failed mid-stream")
206
+
207
+
185
208
  class ScopeEchoApp:
186
209
  """Echoes selected scope fields as JSON so tests can inspect them."""
187
210
 
@@ -214,6 +237,7 @@ app = HeaderEchoApp()
214
237
  sse_app = SSEApp()
215
238
  streaming_app = StreamingApp()
216
239
  scope_echo_app = ScopeEchoApp()
240
+ late_failure_stream_app = LateFailureStreamApp()
217
241
 
218
242
  example_hdr = {"Header1": "Value1", "Header2": "Value2"}
219
243
 
@@ -231,6 +255,10 @@ class Default(WorkerEntrypoint):
231
255
  return await asgi.fetch(streaming_app, request, self.env, self.ctx)
232
256
  elif path.startswith("/scope"):
233
257
  return await asgi.fetch(scope_echo_app, request, self.env, self.ctx)
258
+ elif path == "/stream-late-failure":
259
+ return await asgi.fetch(
260
+ late_failure_stream_app, request, self.env, self.ctx
261
+ )
234
262
 
235
263
  return await asgi.fetch(app, request, self.env, self.ctx)
236
264
 
@@ -345,7 +345,7 @@ wheels = [
345
345
 
346
346
  [[package]]
347
347
  name = "workers-runtime-sdk"
348
- version = "1.6.9"
348
+ version = "1.6.11"
349
349
  source = { editable = "." }
350
350
 
351
351
  [package.dev-dependencies]
@@ -1 +0,0 @@
1
- import _workers_sdk_entropy_import_context_loader
@@ -1,13 +0,0 @@
1
- """
2
- Loader shim for _workers_sdk_entropy_import_context.
3
-
4
- This module is imported by the .pth file on every Python startup. The entropy
5
- context patches depend on the `_cloudflare` package, which only exists inside
6
- the workers runtime. When running outside of the workers runtime, `_cloudflare`
7
- is not available, so we silently skip loading the patches.
8
- """
9
-
10
- import importlib.util
11
-
12
- if importlib.util.find_spec("_cloudflare") is not None:
13
- import _workers_sdk_entropy_import_context # noqa: F401
@@ -1,11 +0,0 @@
1
- {
2
- "name": "fastapi-tests",
3
- "main": "src/worker.py",
4
- "compatibility_date": "%COMPAT_DATE",
5
- "compatibility_flags": ["python_workers"],
6
- "assets": {
7
- "directory": "./public/",
8
- "binding": "ASSETS",
9
- "run_worker_first": true
10
- }
11
- }