workers-runtime-sdk 1.9.1__tar.gz → 1.9.3__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 (207) hide show
  1. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/.gitignore +2 -0
  2. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/CHANGELOG.md +18 -0
  3. workers_runtime_sdk-1.9.3/LICENSE +21 -0
  4. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/PKG-INFO +3 -1
  5. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/pyproject.toml +3 -1
  6. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_workers_sdk_entropy_import_context.py +9 -0
  7. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/conftest.py +6 -42
  8. workers_runtime_sdk-1.9.3/tests/test_django_databases.py +37 -0
  9. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/test_in_workerd.py +2 -0
  10. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/pyproject.toml +16 -0
  11. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/src/django_db_config.py +61 -0
  12. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/src/django_db_helpers.py +100 -0
  13. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/src/test_mysql.py +35 -0
  14. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/src/test_postgresql.py +35 -0
  15. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/src/worker.py +9 -0
  16. workers_runtime_sdk-1.9.3/tests/web-frameworks-test/django-databases/wrangler.jsonc +18 -0
  17. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object/worker.py +0 -4
  18. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-abort/worker.py +0 -3
  19. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-websocket/tester.js +0 -3
  20. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-websocket/worker.py +0 -4
  21. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/python-rpc/worker.js +0 -3
  22. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/python-rpc/worker.py +0 -4
  23. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/workflow/worker.js +0 -3
  24. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/uv.lock +2 -2
  25. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/AGENTS.md +0 -0
  26. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/README.md +0 -0
  27. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_cloudflare_compat_flags.pyi +0 -0
  28. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_pyodide_entrypoint_helper.pyi +0 -0
  29. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_workers_sdk_package_patches.py +0 -0
  30. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_workers_sdk_patch_loader.pth +0 -0
  31. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/_workers_sdk_patch_loader.py +0 -0
  32. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/asgi.py +0 -0
  33. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/__init__.py +0 -0
  34. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/asgi.py +0 -0
  35. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/blob.py +0 -0
  36. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/entrypoints.py +0 -0
  37. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/fetch.py +0 -0
  38. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/formdata.py +0 -0
  39. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/py.typed +0 -0
  40. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/request.py +0 -0
  41. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/response.py +0 -0
  42. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/rpc.py +0 -0
  43. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/types.py +0 -0
  44. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/utils.py +0 -0
  45. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/workflows.js +0 -0
  46. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/workflows.py +0 -0
  47. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/src/workers/wsgi.py +0 -0
  48. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/public/data.json +0 -0
  49. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/public/hello.txt +0 -0
  50. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/pyproject.toml +0 -0
  51. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/conftest.py +0 -0
  52. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_analytics_engine.py +0 -0
  53. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_assets.py +0 -0
  54. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_d1.py +0 -0
  55. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_do.py +0 -0
  56. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_hyperdrive_mysql.py +0 -0
  57. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_hyperdrive_postgresql.py +0 -0
  58. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_images.py +0 -0
  59. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_kv.py +0 -0
  60. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_mtls.py +0 -0
  61. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_queue.py +0 -0
  62. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_r2.py +0 -0
  63. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_ratelimit.py +0 -0
  64. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_vectorize.py +0 -0
  65. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_version_metadata.py +0 -0
  66. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/test_workflow.py +0 -0
  67. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/worker.py +0 -0
  68. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/worker_durable_object.py +0 -0
  69. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/src/worker_workflow.py +0 -0
  70. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/bindings-test/wrangler.jsonc +0 -0
  71. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/test_bindings.py +0 -0
  72. /workers_runtime_sdk-1.9.1/tests/test_web_frameworks.py → /workers_runtime_sdk-1.9.3/tests/test_django.py +0 -0
  73. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/test_fastapi.py +0 -0
  74. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/test_flask.py +0 -0
  75. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/pyproject.toml +0 -0
  76. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/_client.py +0 -0
  77. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/conftest.py +0 -0
  78. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/__init__.py +0 -0
  79. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/api_urls.py +0 -0
  80. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/auth_backend.py +0 -0
  81. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/drf_auth.py +0 -0
  82. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/drf_serializers.py +0 -0
  83. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/drf_throttling.py +0 -0
  84. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/drf_views.py +0 -0
  85. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/forms.py +0 -0
  86. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/middleware.py +0 -0
  87. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/templatetags/__init__.py +0 -0
  88. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/templatetags/custom_tags.py +0 -0
  89. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/urls.py +0 -0
  90. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/django_app/views.py +0 -0
  91. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/templates/base.html +0 -0
  92. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/templates/context_test.html +0 -0
  93. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/templates/csrf_form.html +0 -0
  94. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/templates/hello.html +0 -0
  95. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_async_utilities.py +0 -0
  96. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_auth.py +0 -0
  97. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_caching.py +0 -0
  98. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_cors.py +0 -0
  99. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_csrf.py +0 -0
  100. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_auth_permissions.py +0 -0
  101. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_content_negotiation.py +0 -0
  102. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_serializers.py +0 -0
  103. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_throttling.py +0 -0
  104. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_versioning.py +0 -0
  105. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_drf_views.py +0 -0
  106. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_error_handling.py +0 -0
  107. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_file_uploads.py +0 -0
  108. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_forms.py +0 -0
  109. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_middleware.py +0 -0
  110. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_pagination.py +0 -0
  111. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_request_response.py +0 -0
  112. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_sessions.py +0 -0
  113. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_signals.py +0 -0
  114. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_streaming.py +0 -0
  115. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_templates.py +0 -0
  116. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_url_routing.py +0 -0
  117. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/test_views_basic.py +0 -0
  118. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/src/worker.py +0 -0
  119. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/django-async/wrangler.jsonc +0 -0
  120. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/public/data.json +0 -0
  121. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/public/index.html +0 -0
  122. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/public/style.css +0 -0
  123. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/pyproject.toml +0 -0
  124. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/_client.py +0 -0
  125. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/conftest.py +0 -0
  126. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/static/app.css +0 -0
  127. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/static/data.json +0 -0
  128. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/static/hello.txt +0 -0
  129. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/static/index.html +0 -0
  130. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_assets.py +0 -0
  131. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_error_handling.py +0 -0
  132. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_platform_boundaries.py +0 -0
  133. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_platform_io.py +0 -0
  134. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_platform_lifecycle.py +0 -0
  135. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_response_types.py +0 -0
  136. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_routing.py +0 -0
  137. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_staticfiles.py +0 -0
  138. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_sync_handlers.py +0 -0
  139. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/test_websocket.py +0 -0
  140. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/src/worker.py +0 -0
  141. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/fastapi-tests/wrangler.jsonc +0 -0
  142. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/flask-tests/pyproject.toml +0 -0
  143. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/flask-tests/src/test_response.py +0 -0
  144. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/flask-tests/src/worker.py +0 -0
  145. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/web-frameworks-test/flask-tests/wrangler.jsonc +0 -0
  146. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi/asgi.wd-test +0 -0
  147. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi/pyproject.toml +0 -0
  148. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi/tests/test_asgi.py +0 -0
  149. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi/worker.py +0 -0
  150. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi/wrangler.jsonc +0 -0
  151. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi-ws-disconnect/asgi-ws-disconnect.wd-test +0 -0
  152. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi-ws-disconnect/pyproject.toml +0 -0
  153. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi-ws-disconnect/tests/test_ws_disconnect.py +0 -0
  154. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi-ws-disconnect/worker.py +0 -0
  155. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/asgi-ws-disconnect/wrangler.jsonc +0 -0
  156. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object/durable-object.wd-test +0 -0
  157. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object/pyproject.toml +0 -0
  158. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object/wrangler.jsonc +0 -0
  159. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-abort/durable-object-abort.wd-test +0 -0
  160. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-abort/pyproject.toml +0 -0
  161. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-abort/wrangler.jsonc +0 -0
  162. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-inheritance/durable-object-inheritance.wd-test +0 -0
  163. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-inheritance/pyproject.toml +0 -0
  164. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-inheritance/worker.py +0 -0
  165. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-inheritance/wrangler.jsonc +0 -0
  166. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-websocket/durable-object-websocket.wd-test +0 -0
  167. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-websocket/pyproject.toml +0 -0
  168. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/durable-object-websocket/wrangler.jsonc +0 -0
  169. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/entropy-patches.wd-test +0 -0
  170. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/pyproject.toml +0 -0
  171. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_aiohttp_websocket.py +0 -0
  172. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_jsonschema.py +0 -0
  173. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_langsmith.py +0 -0
  174. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_litestar.py +0 -0
  175. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_mcp.py +0 -0
  176. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_numpy.py +0 -0
  177. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_opentelemetry.py +0 -0
  178. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_pydantic.py +0 -0
  179. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_rust_packages.py +0 -0
  180. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/tests/test_ssl_avoidance.py +0 -0
  181. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/worker.py +0 -0
  182. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/entropy-patches/wrangler.jsonc +0 -0
  183. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/http-client.wd-test +0 -0
  184. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/origin.py +0 -0
  185. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/pyproject.toml +0 -0
  186. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/tests/test_http_client.py +0 -0
  187. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/tests/test_urllib_request.py +0 -0
  188. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/worker.py +0 -0
  189. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/http-client/wrangler.jsonc +0 -0
  190. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/python-rpc/pyproject.toml +0 -0
  191. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/python-rpc/python-rpc.wd-test +0 -0
  192. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/python-rpc/wrangler.jsonc +0 -0
  193. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/pyproject.toml +0 -0
  194. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/sdk.wd-test +0 -0
  195. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/server.py +0 -0
  196. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/tests/test_sdk.py +0 -0
  197. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/worker.py +0 -0
  198. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/sdk/wrangler.jsonc +0 -0
  199. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/workflow/pyproject.toml +0 -0
  200. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/workflow/worker.py +0 -0
  201. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/workflow/workflow.wd-test +0 -0
  202. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/workflow/wrangler.jsonc +0 -0
  203. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/wsgi/pyproject.toml +0 -0
  204. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/wsgi/tests/test_wsgi.py +0 -0
  205. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/wsgi/worker.py +0 -0
  206. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/wsgi/wrangler.jsonc +0 -0
  207. {workers_runtime_sdk-1.9.1 → workers_runtime_sdk-1.9.3}/tests/workerd-test/wsgi/wsgi.wd-test +0 -0
@@ -45,6 +45,7 @@ htmcov/
45
45
  nosetests.xml
46
46
  coverage.xml
47
47
  *.cover
48
+ *.profraw
48
49
  .hypothesis/
49
50
  .pytest_cache/
50
51
 
@@ -62,5 +63,6 @@ docs/_build/
62
63
  # OS specific
63
64
  .DS_Store
64
65
  Thumbs.db
66
+ default.profraw
65
67
 
66
68
  tests/test_workspace
@@ -2,6 +2,24 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v1.9.3 (2026-10-06)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Unify license to MIT and include license file in dists
10
+ ([#285](https://github.com/cloudflare/workers-py/pull/285),
11
+ [`253f3d5`](https://github.com/cloudflare/workers-py/commit/253f3d5bb9194023a9dfcc7da6051df2964b628b))
12
+
13
+
14
+ ## v1.9.2 (2026-09-30)
15
+
16
+ ### Bug Fixes
17
+
18
+ - **runtime-sdk**: Fix top-level entropy calls in fastapi >= 0.142.0
19
+ ([#283](https://github.com/cloudflare/workers-py/pull/283),
20
+ [`f0b104e`](https://github.com/cloudflare/workers-py/commit/f0b104eb0b9204fc877f34f59d510f6ef75f1833))
21
+
22
+
5
23
  ## v1.9.1 (2026-09-29)
6
24
 
7
25
  ### Bug Fixes
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cloudflare, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: workers-runtime-sdk
3
- Version: 1.9.1
3
+ Version: 1.9.3
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
7
+ License-Expression: MIT
8
+ License-File: LICENSE
7
9
  Classifier: License :: OSI Approved :: MIT License
8
10
  Classifier: Operating System :: OS Independent
9
11
  Classifier: Programming Language :: Python :: 3
@@ -4,9 +4,11 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "workers-runtime-sdk"
7
- version = "1.9.1"
7
+ version = "1.9.3"
8
8
  description = "Python SDK for Cloudflare Workers"
9
9
  readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
10
12
  requires-python = ">=3.11"
11
13
  classifiers = [
12
14
  "Programming Language :: Python :: 3",
@@ -229,6 +229,15 @@ def opentelemetry_baggage_context(module):
229
229
  yield
230
230
 
231
231
 
232
+ @register_exec_patch("fastapi.telemetry")
233
+ @contextmanager
234
+ def fastapi_telemetry_context(module):
235
+ # fastapi 0.142.0 added opentelemetry support
236
+ # which creates a UUID-backed key.
237
+ with allow_bad_entropy_calls_for_version("fastapi", 1, (0, 142, 0)):
238
+ yield
239
+
240
+
232
241
  @register_exec_patch("litestar.openapi.controller")
233
242
  @register_exec_patch("litestar.constants")
234
243
  @contextmanager
@@ -1,8 +1,5 @@
1
1
  """Shared fixtures and helpers for the host-side test suite."""
2
2
 
3
- import os
4
- import shutil
5
- from collections.abc import Generator
6
3
  from pathlib import Path
7
4
  from typing import Any
8
5
 
@@ -10,20 +7,17 @@ import pytest
10
7
  from testlib.host import (
11
8
  COMPAT_CONFIGS,
12
9
  CompatConfig,
13
- configure_compatibility,
14
- link_packages,
15
- pywrangler_sync,
16
- )
17
- from testlib.host import (
18
- dev_server as run_dev_server,
10
+ dev_server,
19
11
  )
20
12
  from testlib.host import (
21
13
  register_in_worker_suites as register_testlib_suites,
22
14
  )
23
15
 
16
+ __all__ = ["dev_server"]
17
+
18
+
24
19
  TEST_DIR: Path = Path(__file__).parent
25
20
 
26
- DEV_STARTUP_TIMEOUT: int = 120
27
21
  OPT_IN_MARKERS: tuple[str, ...] = ("hyperdrive",)
28
22
 
29
23
 
@@ -62,38 +56,8 @@ def worker_project_dir() -> Path:
62
56
 
63
57
 
64
58
  @pytest.fixture(scope="module")
65
- def dev_server(
66
- tmp_path_factory: pytest.TempPathFactory,
67
- worker_project_dir: Path,
68
- compat_config: CompatConfig,
69
- ) -> Generator[str]:
70
- """Start a pywrangler dev server on a free port and yield its base URL.
71
-
72
- The project is copied next to a ``packages`` symlink so that its
73
- ``../packages/...`` sources resolve and ``sync`` vendors the working-tree
74
- testlib and runtime-sdk.
75
- """
76
- tmp_path = tmp_path_factory.mktemp(f"{worker_project_dir.name}_dev")
77
- target = tmp_path / worker_project_dir.name
78
- shutil.copytree(worker_project_dir, target, ignore=shutil.ignore_patterns(".venv"))
79
- link_packages(tmp_path)
80
- env = os.environ | {"_PYODIDE_EXTRA_MOUNTS": str(tmp_path)}
81
-
82
- wrangler_jsonc = target / "wrangler.jsonc"
83
- configure_compatibility(wrangler_jsonc, compat_config)
84
-
85
- pywrangler_sync(target, env)
86
-
87
- with run_dev_server(
88
- target,
89
- tmp_path,
90
- env,
91
- startup_timeout=DEV_STARTUP_TIMEOUT,
92
- readiness_path="/health",
93
- require_success=True,
94
- log_name="dev.log",
95
- ) as (base_url, _):
96
- yield base_url
59
+ def dev_startup_timeout():
60
+ return 120
97
61
 
98
62
 
99
63
  def register_in_worker_suites(
@@ -0,0 +1,37 @@
1
+ # pyright: reportAttributeAccessIssue=false, reportMissingImports=false
2
+
3
+ """Stock Django database backends running through Hyperdrive in workerd."""
4
+
5
+ from pathlib import Path
6
+
7
+ import pytest
8
+ from conftest import COMPAT_CONFIGS, CompatConfig, register_in_worker_suites
9
+
10
+ DJANGO_DATABASES_DIR: Path = (
11
+ Path(__file__).parent / "web-frameworks-test" / "django-databases"
12
+ )
13
+ DJANGO_DATABASES_SRC_DIR: Path = DJANGO_DATABASES_DIR / "src"
14
+ PYTHON_314_CONFIGS = [
15
+ config for config in COMPAT_CONFIGS if config.python_version == "3.14"
16
+ ]
17
+ SUITE_MARKS: dict[str, pytest.MarkDecorator] = {
18
+ "postgresql": pytest.mark.hyperdrive,
19
+ "mysql": pytest.mark.hyperdrive,
20
+ }
21
+
22
+
23
+ @pytest.fixture(scope="module")
24
+ def worker_project_dir() -> Path:
25
+ return DJANGO_DATABASES_DIR
26
+
27
+
28
+ @pytest.fixture(
29
+ scope="module",
30
+ params=PYTHON_314_CONFIGS,
31
+ ids=[config.python_version for config in PYTHON_314_CONFIGS],
32
+ )
33
+ def compat_config(request: pytest.FixtureRequest) -> CompatConfig:
34
+ return request.param
35
+
36
+
37
+ register_in_worker_suites(globals(), DJANGO_DATABASES_SRC_DIR, marks=SUITE_MARKS)
@@ -7,6 +7,8 @@ import pytest
7
7
  from conftest import (
8
8
  COMPAT_CONFIGS,
9
9
  CompatConfig,
10
+ )
11
+ from testlib.host import (
10
12
  configure_compatibility,
11
13
  link_packages,
12
14
  pywrangler_sync,
@@ -0,0 +1,16 @@
1
+ [project]
2
+ name = "django-databases-test"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.14"
5
+ dependencies = [
6
+ "django>=5.2.8",
7
+ "mysqlclient",
8
+ "psycopg[binary]",
9
+ "pytest",
10
+ "testlib",
11
+ "workers-runtime-sdk",
12
+ ]
13
+
14
+ [tool.uv.sources]
15
+ testlib = { path = "../packages/testlib" }
16
+ workers-runtime-sdk = { path = "../packages/runtime-sdk" }
@@ -0,0 +1,61 @@
1
+ # pyright: reportMissingImports=false
2
+
3
+ """Django settings for stock backends running through Hyperdrive."""
4
+
5
+ import os
6
+
7
+ import django
8
+ from django.conf import settings
9
+
10
+ from workers import env
11
+
12
+ os.environ.setdefault("DJANGO_ALLOW_ASYNC_UNSAFE", "true")
13
+
14
+ HYPERDRIVE_POSTGRESQL = "hyperdrive_postgresql"
15
+ HYPERDRIVE_MYSQL = "hyperdrive_mysql"
16
+
17
+
18
+ def _postgresql_database() -> dict[str, object]:
19
+ hyperdrive = env.HYPERDRIVE_PG
20
+ return {
21
+ "ENGINE": "django.db.backends.postgresql",
22
+ "HOST": hyperdrive.host,
23
+ "PORT": str(hyperdrive.port),
24
+ "USER": hyperdrive.user,
25
+ "PASSWORD": hyperdrive.password,
26
+ "NAME": hyperdrive.database,
27
+ "CONN_MAX_AGE": 0,
28
+ "OPTIONS": {"sslmode": "disable"},
29
+ "DISABLE_SERVER_SIDE_CURSORS": True,
30
+ }
31
+
32
+
33
+ def _mysql_database() -> dict[str, object]:
34
+ hyperdrive = env.HYPERDRIVE_MYSQL
35
+ return {
36
+ "ENGINE": "django.db.backends.mysql",
37
+ "HOST": hyperdrive.host,
38
+ "PORT": str(hyperdrive.port),
39
+ "USER": hyperdrive.user,
40
+ "PASSWORD": hyperdrive.password,
41
+ "NAME": hyperdrive.database,
42
+ "CONN_MAX_AGE": 0,
43
+ "OPTIONS": {"ssl_mode": "DISABLED"},
44
+ }
45
+
46
+
47
+ settings.configure(
48
+ DEBUG=False,
49
+ SECRET_KEY="test-secret-key-for-workers-py",
50
+ INSTALLED_APPS=[],
51
+ DATABASES={
52
+ "default": {"ENGINE": "django.db.backends.dummy"},
53
+ HYPERDRIVE_POSTGRESQL: _postgresql_database(),
54
+ HYPERDRIVE_MYSQL: _mysql_database(),
55
+ },
56
+ TIME_ZONE="UTC",
57
+ USE_TZ=True,
58
+ DEFAULT_AUTO_FIELD="django.db.models.BigAutoField",
59
+ )
60
+
61
+ django.setup()
@@ -0,0 +1,100 @@
1
+ """ORM assertions shared by the independent Django backend suites."""
2
+
3
+ import uuid
4
+ from collections.abc import Iterator
5
+ from contextlib import contextmanager
6
+
7
+ import pytest
8
+ from django.db import connections, models, transaction
9
+ from django.test.utils import isolate_apps
10
+
11
+
12
+ class Rollback(Exception):
13
+ """Raised to roll back an atomic block."""
14
+
15
+
16
+ def _table_name() -> str:
17
+ return f"dht_{uuid.uuid4().hex}"
18
+
19
+
20
+ @contextmanager
21
+ def _temporary_model(alias: str) -> Iterator[type[models.Model]]:
22
+ table_name = _table_name()
23
+ connection = connections[alias]
24
+
25
+ with isolate_apps():
26
+
27
+ class TemporaryModel(models.Model):
28
+ name = models.CharField(max_length=100)
29
+ value = models.IntegerField()
30
+ float_value = models.FloatField(default=0.0)
31
+ is_active = models.BooleanField(default=False)
32
+
33
+ class Meta:
34
+ app_label = "hyperdrive_tests"
35
+ db_table = table_name
36
+
37
+ created = False
38
+ try:
39
+ with connection.schema_editor() as schema_editor:
40
+ schema_editor.create_model(TemporaryModel)
41
+ created = True
42
+ yield TemporaryModel
43
+ finally:
44
+ if created:
45
+ with connection.schema_editor() as schema_editor:
46
+ schema_editor.delete_model(TemporaryModel)
47
+
48
+
49
+ def assert_connectivity(alias: str) -> None:
50
+ connection = connections[alias]
51
+ connection.ensure_connection()
52
+ assert connection.is_usable()
53
+
54
+
55
+ def assert_crud(alias: str) -> None:
56
+ with _temporary_model(alias) as model:
57
+ objects = model.objects.using(alias)
58
+ objects.create(name="alpha", value=1)
59
+ objects.create(name="beta", value=2)
60
+
61
+ assert list(
62
+ objects.filter(name__in=["alpha", "beta"])
63
+ .order_by("name")
64
+ .values_list("name", "value")
65
+ ) == [("alpha", 1), ("beta", 2)]
66
+
67
+ assert objects.filter(name="alpha").update(value=11) == 1
68
+ assert objects.get(name="alpha").value == 11
69
+
70
+ assert objects.filter(name="alpha").delete()[0] == 1
71
+ assert objects.count() == 1
72
+ assert objects.get(name="beta").value == 2
73
+
74
+
75
+ def assert_data_types(alias: str) -> None:
76
+ with _temporary_model(alias) as model:
77
+ objects = model.objects.using(alias)
78
+ created = objects.create(
79
+ name="hello",
80
+ value=42,
81
+ float_value=3.14,
82
+ is_active=True,
83
+ )
84
+ row = objects.get(pk=created.pk)
85
+
86
+ assert row.name == "hello"
87
+ assert row.value == 42
88
+ assert abs(row.float_value - 3.14) < 0.001
89
+ assert row.is_active is True
90
+
91
+
92
+ def assert_transaction_rollback(alias: str) -> None:
93
+ with _temporary_model(alias) as model:
94
+ objects = model.objects.using(alias)
95
+
96
+ with pytest.raises(Rollback), transaction.atomic(using=alias):
97
+ objects.create(name="should_disappear", value=1)
98
+ raise Rollback
99
+
100
+ assert objects.count() == 0
@@ -0,0 +1,35 @@
1
+ # pyright: reportMissingImports=false
2
+
3
+ """Stock Django MySQL backend running through the HYPERDRIVE_MYSQL binding."""
4
+
5
+ import pytest
6
+ from django.db import connections
7
+ from django_db_config import HYPERDRIVE_MYSQL
8
+ from django_db_helpers import (
9
+ assert_connectivity,
10
+ assert_crud,
11
+ assert_data_types,
12
+ assert_transaction_rollback,
13
+ )
14
+
15
+
16
+ @pytest.fixture(autouse=True)
17
+ def close_connections():
18
+ yield
19
+ connections[HYPERDRIVE_MYSQL].close()
20
+
21
+
22
+ def test_connectivity():
23
+ assert_connectivity(HYPERDRIVE_MYSQL)
24
+
25
+
26
+ def test_crud():
27
+ assert_crud(HYPERDRIVE_MYSQL)
28
+
29
+
30
+ def test_data_types():
31
+ assert_data_types(HYPERDRIVE_MYSQL)
32
+
33
+
34
+ def test_transaction_rollback():
35
+ assert_transaction_rollback(HYPERDRIVE_MYSQL)
@@ -0,0 +1,35 @@
1
+ # pyright: reportMissingImports=false
2
+
3
+ """Stock Django PostgreSQL backend running through the HYPERDRIVE_PG binding."""
4
+
5
+ import pytest
6
+ from django.db import connections
7
+ from django_db_config import HYPERDRIVE_POSTGRESQL
8
+ from django_db_helpers import (
9
+ assert_connectivity,
10
+ assert_crud,
11
+ assert_data_types,
12
+ assert_transaction_rollback,
13
+ )
14
+
15
+
16
+ @pytest.fixture(autouse=True)
17
+ def close_connections():
18
+ yield
19
+ connections[HYPERDRIVE_POSTGRESQL].close()
20
+
21
+
22
+ def test_connectivity():
23
+ assert_connectivity(HYPERDRIVE_POSTGRESQL)
24
+
25
+
26
+ def test_crud():
27
+ assert_crud(HYPERDRIVE_POSTGRESQL)
28
+
29
+
30
+ def test_data_types():
31
+ assert_data_types(HYPERDRIVE_POSTGRESQL)
32
+
33
+
34
+ def test_transaction_rollback():
35
+ assert_transaction_rollback(HYPERDRIVE_POSTGRESQL)
@@ -0,0 +1,9 @@
1
+ # pyright: reportMissingImports=false
2
+
3
+ """Django database backend test worker."""
4
+
5
+ from testlib.entrypoint import TestRunnerEntrypoint
6
+
7
+
8
+ class Default(TestRunnerEntrypoint):
9
+ pass
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "django-databases-test",
3
+ "main": "src/worker.py",
4
+ "compatibility_date": "%COMPAT_DATE",
5
+ "compatibility_flags": ["python_workers"],
6
+ "hyperdrive": [
7
+ {
8
+ "binding": "HYPERDRIVE_PG",
9
+ "id": "00000000-0000-0000-0000-000000000001",
10
+ "localConnectionString": "postgres://testuser:testpass@127.0.0.1:5432/testdb"
11
+ },
12
+ {
13
+ "binding": "HYPERDRIVE_MYSQL",
14
+ "id": "00000000-0000-0000-0000-000000000002",
15
+ "localConnectionString": "mysql://testuser:testpass@127.0.0.1:3306/testdb"
16
+ }
17
+ ]
18
+ }
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2023 Cloudflare, Inc.
2
- # Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- # https://opensource.org/licenses/Apache-2.0
4
-
5
1
  # Copied from: https://github.com/cloudflare/workerd/tree/main/src/workerd/server/tests/python/durable-object
6
2
 
7
3
  from asyncio import sleep
@@ -1,6 +1,3 @@
1
- # Copyright (c) 2026 Cloudflare, Inc.
2
- # Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- # https://opensource.org/licenses/Apache-2.0
4
1
  from unittest import TestCase
5
2
 
6
3
  from workers import DurableObject, Response, WorkerEntrypoint
@@ -1,6 +1,3 @@
1
- // Copyright (c) 2025 Cloudflare, Inc.
2
- // Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- // https://opensource.org/licenses/Apache-2.0
4
1
  export default {
5
2
  async test(ctrl, env, ctx) {
6
3
  const resp = await env.PYTHON.fetch('http://example.com/websocket', {
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2023 Cloudflare, Inc.
2
- # Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- # https://opensource.org/licenses/Apache-2.0
4
-
5
1
  # Copied from: https://github.com/cloudflare/workerd/tree/main/src/workerd/server/tests/python/durable-object-websocket
6
2
  from js import WebSocketPair
7
3
 
@@ -1,6 +1,3 @@
1
- // Copyright (c) 2025 Cloudflare, Inc.
2
- // Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- // https://opensource.org/licenses/Apache-2.0
4
1
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
2
 
6
3
  import * as assert from 'node:assert';
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2023 Cloudflare, Inc.
2
- # Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- # https://opensource.org/licenses/Apache-2.0
4
-
5
1
  # Ported from workerd (https://github.com/cloudflare/workerd/tree/main/src/workerd/server/tests/python/python-rpc)
6
2
 
7
3
  import collections.abc
@@ -1,6 +1,3 @@
1
- // Copyright (c) 2026 Cloudflare, Inc.
2
- // Licensed under the Apache 2.0 license found in the LICENSE file or at:
3
- // https://opensource.org/licenses/Apache-2.0
4
1
  import { RpcTarget } from 'cloudflare:workers';
5
2
 
6
3
  import * as assert from 'node:assert';
@@ -1,5 +1,5 @@
1
1
  version = 1
2
- revision = 3
2
+ revision = 5
3
3
  requires-python = ">=3.11"
4
4
 
5
5
  [[package]]
@@ -376,7 +376,7 @@ wheels = [
376
376
 
377
377
  [[package]]
378
378
  name = "workers-runtime-sdk"
379
- version = "1.9.1"
379
+ version = "1.9.3"
380
380
  source = { editable = "." }
381
381
 
382
382
  [package.dev-dependencies]