dash 4.4.0__tar.gz → 4.4.1__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 (414) hide show
  1. {dash-4.4.0/dash.egg-info → dash-4.4.1}/PKG-INFO +2 -1
  2. {dash-4.4.0 → dash-4.4.1}/dash/_callback.py +74 -17
  3. dash-4.4.1/dash/_callback_signing.py +68 -0
  4. {dash-4.4.0 → dash-4.4.1}/dash/_dash_renderer.py +2 -2
  5. {dash-4.4.0 → dash-4.4.1}/dash/_utils.py +68 -1
  6. {dash-4.4.0 → dash-4.4.1}/dash/backends/_flask.py +10 -0
  7. {dash-4.4.0 → dash-4.4.1}/dash/backends/_quart.py +9 -0
  8. {dash-4.4.0 → dash-4.4.1}/dash/background_callback/managers/__init__.py +14 -0
  9. {dash-4.4.0 → dash-4.4.1}/dash/background_callback/managers/celery_manager.py +10 -0
  10. {dash-4.4.0 → dash-4.4.1}/dash/background_callback/managers/diskcache_manager.py +6 -0
  11. {dash-4.4.0 → dash-4.4.1}/dash/dash-renderer/build/dash_renderer.dev.js +6 -1
  12. {dash-4.4.0 → dash-4.4.1}/dash/dash-renderer/build/dash_renderer.min.js +1 -1
  13. {dash-4.4.0 → dash-4.4.1}/dash/dash.py +89 -1
  14. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/bundle.js +1 -1
  15. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/bundle.js.map +1 -1
  16. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/demo.js +1 -1
  17. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/demo.js.map +1 -1
  18. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/package-info.json +1 -1
  19. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-datepicker.js +1 -1
  20. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-dropdown.js +1 -1
  21. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-graph.js +1 -1
  22. dash-4.4.1/dash/dcc/async-graph.js.map +1 -0
  23. dash-4.4.1/dash/dcc/async-slider.js +2 -0
  24. dash-4.4.1/dash/dcc/async-slider.js.map +1 -0
  25. dash-4.4.1/dash/dcc/dash_core_components-shared.js +3 -0
  26. dash-4.4.1/dash/dcc/dash_core_components-shared.js.map +1 -0
  27. {dash-4.4.0 → dash-4.4.1}/dash/dcc/dash_core_components.js +1 -1
  28. {dash-4.4.0 → dash-4.4.1}/dash/dcc/dash_core_components.js.map +1 -1
  29. {dash-4.4.0 → dash-4.4.1}/dash/dcc/package-info.json +5 -5
  30. {dash-4.4.0 → dash-4.4.1}/dash/html/package-info.json +1 -1
  31. dash-4.4.1/dash/labextension/dist/dash-jupyterlab.tgz +0 -0
  32. {dash-4.4.0 → dash-4.4.1}/dash/mcp/tasks/tasks.py +23 -3
  33. dash-4.4.1/dash/version.py +1 -0
  34. {dash-4.4.0 → dash-4.4.1/dash.egg-info}/PKG-INFO +2 -1
  35. {dash-4.4.0 → dash-4.4.1}/dash.egg-info/SOURCES.txt +1 -0
  36. {dash-4.4.0 → dash-4.4.1}/dash.egg-info/requires.txt +1 -0
  37. {dash-4.4.0 → dash-4.4.1}/requirements/install.txt +1 -0
  38. dash-4.4.0/dash/dcc/async-graph.js.map +0 -1
  39. dash-4.4.0/dash/dcc/async-slider.js +0 -2
  40. dash-4.4.0/dash/dcc/async-slider.js.map +0 -1
  41. dash-4.4.0/dash/dcc/dash_core_components-shared.js +0 -3
  42. dash-4.4.0/dash/dcc/dash_core_components-shared.js.map +0 -1
  43. dash-4.4.0/dash/labextension/dist/dash-jupyterlab.tgz +0 -0
  44. dash-4.4.0/dash/version.py +0 -1
  45. {dash-4.4.0 → dash-4.4.1}/LICENSE +0 -0
  46. {dash-4.4.0 → dash-4.4.1}/MANIFEST.in +0 -0
  47. {dash-4.4.0 → dash-4.4.1}/README.md +0 -0
  48. {dash-4.4.0 → dash-4.4.1}/dash/__init__.py +0 -0
  49. {dash-4.4.0 → dash-4.4.1}/dash/_callback_context.py +0 -0
  50. {dash-4.4.0 → dash-4.4.1}/dash/_configs.py +0 -0
  51. {dash-4.4.0 → dash-4.4.1}/dash/_get_app.py +0 -0
  52. {dash-4.4.0 → dash-4.4.1}/dash/_get_paths.py +0 -0
  53. {dash-4.4.0 → dash-4.4.1}/dash/_grouping.py +0 -0
  54. {dash-4.4.0 → dash-4.4.1}/dash/_hooks.py +0 -0
  55. {dash-4.4.0 → dash-4.4.1}/dash/_jupyter.py +0 -0
  56. {dash-4.4.0 → dash-4.4.1}/dash/_layout_utils.py +0 -0
  57. {dash-4.4.0 → dash-4.4.1}/dash/_no_update.py +0 -0
  58. {dash-4.4.0 → dash-4.4.1}/dash/_obsolete.py +0 -0
  59. {dash-4.4.0 → dash-4.4.1}/dash/_pages.py +0 -0
  60. {dash-4.4.0 → dash-4.4.1}/dash/_patch.py +0 -0
  61. {dash-4.4.0 → dash-4.4.1}/dash/_plotly_cli.py +0 -0
  62. {dash-4.4.0 → dash-4.4.1}/dash/_validate.py +0 -0
  63. {dash-4.4.0 → dash-4.4.1}/dash/_watch.py +0 -0
  64. {dash-4.4.0 → dash-4.4.1}/dash/backends/__init__.py +0 -0
  65. {dash-4.4.0 → dash-4.4.1}/dash/backends/_fastapi.py +0 -0
  66. {dash-4.4.0 → dash-4.4.1}/dash/backends/_utils.py +0 -0
  67. {dash-4.4.0 → dash-4.4.1}/dash/backends/base_server.py +0 -0
  68. {dash-4.4.0 → dash-4.4.1}/dash/backends/ws.py +0 -0
  69. {dash-4.4.0 → dash-4.4.1}/dash/background_callback/__init__.py +0 -0
  70. {dash-4.4.0 → dash-4.4.1}/dash/background_callback/_proxy_set_props.py +0 -0
  71. {dash-4.4.0 → dash-4.4.1}/dash/dash-renderer/build/dash-ws-worker.js +0 -0
  72. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/.gitkeep +0 -0
  73. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/DataTable.py +0 -0
  74. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/Format.py +0 -0
  75. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/FormatTemplate.py +0 -0
  76. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/__init__.py +0 -0
  77. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/_imports_.py +0 -0
  78. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-export.js +0 -0
  79. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-export.js.LICENSE.txt +0 -0
  80. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-export.js.map +0 -0
  81. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-highlight.js +0 -0
  82. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-highlight.js.map +0 -0
  83. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-table.js +0 -0
  84. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-table.js.LICENSE.txt +0 -0
  85. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/async-table.js.map +0 -0
  86. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/clipboard_test.2006415142.js +0 -0
  87. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/commons.js +0 -0
  88. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/commons.js.map +0 -0
  89. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/dash_table_queries_test.793109876.js +0 -0
  90. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/dateCoercion_test.962579238.js +0 -0
  91. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/dateValidation_test.371405921.js +0 -0
  92. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/derivedFragmentStyles_test.1414718214.js +0 -0
  93. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/derivedSelectedRows_test.191006642.js +0 -0
  94. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/derivedViewport_test.1205034743.js +0 -0
  95. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/edges_test.967237579.js +0 -0
  96. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/editColumnNames.2728755743.js +0 -0
  97. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/exportUtils_tests.2912917026.js +0 -0
  98. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/exportUtils_tests.2912917026.js.map +0 -0
  99. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/formatting_test.841259566.js +0 -0
  100. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/index.html +0 -0
  101. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/isEditable_test.3783358896.js +0 -0
  102. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/lexeme_test.1119087106.js +0 -0
  103. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/loadingState.3432615788.js +0 -0
  104. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/metadata.json +0 -0
  105. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/multi_columns_syntactic_tree.2997507671.js +0 -0
  106. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/numberCoercion_test.1793174015.js +0 -0
  107. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/numberValidation_test.2162365126.js +0 -0
  108. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/query_syntactic_tree_test.3221830692.js +0 -0
  109. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/reconcile_test.474626241.js +0 -0
  110. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/runtime.js +0 -0
  111. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/runtime.js.map +0 -0
  112. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/single_column_syntactic_tree_test.654853628.js +0 -0
  113. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/sorting_test.2769206697.js +0 -0
  114. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/table_clipboard_helper_test.53776781.js +0 -0
  115. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/table_clipboard_helper_test.53776781.js.map +0 -0
  116. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/table_update_test.2311585578.js +0 -0
  117. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/textCoercion_test.2622183371.js +0 -0
  118. {dash-4.4.0 → dash-4.4.1}/dash/dash_table/textValidation_test.63529138.js +0 -0
  119. {dash-4.4.0 → dash-4.4.1}/dash/dcc/.gitkeep +0 -0
  120. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Button.py +0 -0
  121. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Checklist.py +0 -0
  122. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Clipboard.py +0 -0
  123. {dash-4.4.0 → dash-4.4.1}/dash/dcc/ConfirmDialog.py +0 -0
  124. {dash-4.4.0 → dash-4.4.1}/dash/dcc/ConfirmDialogProvider.py +0 -0
  125. {dash-4.4.0 → dash-4.4.1}/dash/dcc/DatePickerRange.py +0 -0
  126. {dash-4.4.0 → dash-4.4.1}/dash/dcc/DatePickerSingle.py +0 -0
  127. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Download.py +0 -0
  128. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Dropdown.py +0 -0
  129. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Geolocation.py +0 -0
  130. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Graph.py +0 -0
  131. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Input.py +0 -0
  132. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Interval.py +0 -0
  133. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Link.py +0 -0
  134. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Loading.py +0 -0
  135. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Location.py +0 -0
  136. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Markdown.py +0 -0
  137. {dash-4.4.0 → dash-4.4.1}/dash/dcc/RadioItems.py +0 -0
  138. {dash-4.4.0 → dash-4.4.1}/dash/dcc/RangeSlider.py +0 -0
  139. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Slider.py +0 -0
  140. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Store.py +0 -0
  141. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Tab.py +0 -0
  142. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Tabs.py +0 -0
  143. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Textarea.py +0 -0
  144. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Tooltip.py +0 -0
  145. {dash-4.4.0 → dash-4.4.1}/dash/dcc/Upload.py +0 -0
  146. {dash-4.4.0 → dash-4.4.1}/dash/dcc/__init__.py +0 -0
  147. {dash-4.4.0 → dash-4.4.1}/dash/dcc/_imports_.py +0 -0
  148. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-datepicker.js.LICENSE.txt +0 -0
  149. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-datepicker.js.map +0 -0
  150. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-dropdown.js.LICENSE.txt +0 -0
  151. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-dropdown.js.map +0 -0
  152. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-highlight.js +0 -0
  153. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-highlight.js.map +0 -0
  154. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-markdown.js +0 -0
  155. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-markdown.js.LICENSE.txt +0 -0
  156. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-markdown.js.map +0 -0
  157. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-mathjax.js +0 -0
  158. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-slider.js.LICENSE.txt +0 -0
  159. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-upload.js +0 -0
  160. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-upload.js.LICENSE.txt +0 -0
  161. {dash-4.4.0 → dash-4.4.1}/dash/dcc/async-upload.js.map +0 -0
  162. {dash-4.4.0 → dash-4.4.1}/dash/dcc/dash_core_components-shared.js.LICENSE.txt +0 -0
  163. {dash-4.4.0 → dash-4.4.1}/dash/dcc/dash_core_components.js.LICENSE.txt +0 -0
  164. {dash-4.4.0 → dash-4.4.1}/dash/dcc/express.py +0 -0
  165. {dash-4.4.0 → dash-4.4.1}/dash/dcc/metadata.json +0 -0
  166. {dash-4.4.0 → dash-4.4.1}/dash/dcc/proptypes.js +0 -0
  167. {dash-4.4.0 → dash-4.4.1}/dash/dependencies.py +0 -0
  168. {dash-4.4.0 → dash-4.4.1}/dash/deps/polyfill@7.12.1.min.js +0 -0
  169. {dash-4.4.0 → dash-4.4.1}/dash/deps/prop-types@15.8.1.js +0 -0
  170. {dash-4.4.0 → dash-4.4.1}/dash/deps/prop-types@15.8.1.min.js +0 -0
  171. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@16.14.0.js +0 -0
  172. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@16.14.0.min.js +0 -0
  173. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@18.2.0.js +0 -0
  174. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@18.2.0.min.js +0 -0
  175. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@18.3.1.js +0 -0
  176. {dash-4.4.0 → dash-4.4.1}/dash/deps/react-dom@18.3.1.min.js +0 -0
  177. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@16.14.0.js +0 -0
  178. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@16.14.0.min.js +0 -0
  179. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@18.2.0.js +0 -0
  180. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@18.2.0.min.js +0 -0
  181. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@18.3.1.js +0 -0
  182. {dash-4.4.0 → dash-4.4.1}/dash/deps/react@18.3.1.min.js +0 -0
  183. {dash-4.4.0 → dash-4.4.1}/dash/development/__init__.py +0 -0
  184. {dash-4.4.0 → dash-4.4.1}/dash/development/_all_keywords.py +0 -0
  185. {dash-4.4.0 → dash-4.4.1}/dash/development/_collect_nodes.py +0 -0
  186. {dash-4.4.0 → dash-4.4.1}/dash/development/_generate_prop_types.py +0 -0
  187. {dash-4.4.0 → dash-4.4.1}/dash/development/_jl_components_generation.py +0 -0
  188. {dash-4.4.0 → dash-4.4.1}/dash/development/_py_components_generation.py +0 -0
  189. {dash-4.4.0 → dash-4.4.1}/dash/development/_py_prop_typing.py +0 -0
  190. {dash-4.4.0 → dash-4.4.1}/dash/development/_r_components_generation.py +0 -0
  191. {dash-4.4.0 → dash-4.4.1}/dash/development/base_component.py +0 -0
  192. {dash-4.4.0 → dash-4.4.1}/dash/development/build_process.py +0 -0
  193. {dash-4.4.0 → dash-4.4.1}/dash/development/component_generator.py +0 -0
  194. {dash-4.4.0 → dash-4.4.1}/dash/development/update_components.py +0 -0
  195. {dash-4.4.0 → dash-4.4.1}/dash/exceptions.py +0 -0
  196. {dash-4.4.0 → dash-4.4.1}/dash/extract-meta.js +0 -0
  197. {dash-4.4.0 → dash-4.4.1}/dash/favicon.ico +0 -0
  198. {dash-4.4.0 → dash-4.4.1}/dash/fingerprint.py +0 -0
  199. {dash-4.4.0 → dash-4.4.1}/dash/html/.gitkeep +0 -0
  200. {dash-4.4.0 → dash-4.4.1}/dash/html/A.py +0 -0
  201. {dash-4.4.0 → dash-4.4.1}/dash/html/Abbr.py +0 -0
  202. {dash-4.4.0 → dash-4.4.1}/dash/html/Acronym.py +0 -0
  203. {dash-4.4.0 → dash-4.4.1}/dash/html/Address.py +0 -0
  204. {dash-4.4.0 → dash-4.4.1}/dash/html/Area.py +0 -0
  205. {dash-4.4.0 → dash-4.4.1}/dash/html/Article.py +0 -0
  206. {dash-4.4.0 → dash-4.4.1}/dash/html/Aside.py +0 -0
  207. {dash-4.4.0 → dash-4.4.1}/dash/html/Audio.py +0 -0
  208. {dash-4.4.0 → dash-4.4.1}/dash/html/B.py +0 -0
  209. {dash-4.4.0 → dash-4.4.1}/dash/html/Base.py +0 -0
  210. {dash-4.4.0 → dash-4.4.1}/dash/html/Basefont.py +0 -0
  211. {dash-4.4.0 → dash-4.4.1}/dash/html/Bdi.py +0 -0
  212. {dash-4.4.0 → dash-4.4.1}/dash/html/Bdo.py +0 -0
  213. {dash-4.4.0 → dash-4.4.1}/dash/html/Big.py +0 -0
  214. {dash-4.4.0 → dash-4.4.1}/dash/html/Blink.py +0 -0
  215. {dash-4.4.0 → dash-4.4.1}/dash/html/Blockquote.py +0 -0
  216. {dash-4.4.0 → dash-4.4.1}/dash/html/Br.py +0 -0
  217. {dash-4.4.0 → dash-4.4.1}/dash/html/Button.py +0 -0
  218. {dash-4.4.0 → dash-4.4.1}/dash/html/Canvas.py +0 -0
  219. {dash-4.4.0 → dash-4.4.1}/dash/html/Caption.py +0 -0
  220. {dash-4.4.0 → dash-4.4.1}/dash/html/Center.py +0 -0
  221. {dash-4.4.0 → dash-4.4.1}/dash/html/Cite.py +0 -0
  222. {dash-4.4.0 → dash-4.4.1}/dash/html/Code.py +0 -0
  223. {dash-4.4.0 → dash-4.4.1}/dash/html/Col.py +0 -0
  224. {dash-4.4.0 → dash-4.4.1}/dash/html/Colgroup.py +0 -0
  225. {dash-4.4.0 → dash-4.4.1}/dash/html/Content.py +0 -0
  226. {dash-4.4.0 → dash-4.4.1}/dash/html/Data.py +0 -0
  227. {dash-4.4.0 → dash-4.4.1}/dash/html/Datalist.py +0 -0
  228. {dash-4.4.0 → dash-4.4.1}/dash/html/Dd.py +0 -0
  229. {dash-4.4.0 → dash-4.4.1}/dash/html/Del.py +0 -0
  230. {dash-4.4.0 → dash-4.4.1}/dash/html/Details.py +0 -0
  231. {dash-4.4.0 → dash-4.4.1}/dash/html/Dfn.py +0 -0
  232. {dash-4.4.0 → dash-4.4.1}/dash/html/Dialog.py +0 -0
  233. {dash-4.4.0 → dash-4.4.1}/dash/html/Div.py +0 -0
  234. {dash-4.4.0 → dash-4.4.1}/dash/html/Dl.py +0 -0
  235. {dash-4.4.0 → dash-4.4.1}/dash/html/Dt.py +0 -0
  236. {dash-4.4.0 → dash-4.4.1}/dash/html/Em.py +0 -0
  237. {dash-4.4.0 → dash-4.4.1}/dash/html/Embed.py +0 -0
  238. {dash-4.4.0 → dash-4.4.1}/dash/html/Fieldset.py +0 -0
  239. {dash-4.4.0 → dash-4.4.1}/dash/html/Figcaption.py +0 -0
  240. {dash-4.4.0 → dash-4.4.1}/dash/html/Figure.py +0 -0
  241. {dash-4.4.0 → dash-4.4.1}/dash/html/Font.py +0 -0
  242. {dash-4.4.0 → dash-4.4.1}/dash/html/Footer.py +0 -0
  243. {dash-4.4.0 → dash-4.4.1}/dash/html/Form.py +0 -0
  244. {dash-4.4.0 → dash-4.4.1}/dash/html/Frame.py +0 -0
  245. {dash-4.4.0 → dash-4.4.1}/dash/html/Frameset.py +0 -0
  246. {dash-4.4.0 → dash-4.4.1}/dash/html/H1.py +0 -0
  247. {dash-4.4.0 → dash-4.4.1}/dash/html/H2.py +0 -0
  248. {dash-4.4.0 → dash-4.4.1}/dash/html/H3.py +0 -0
  249. {dash-4.4.0 → dash-4.4.1}/dash/html/H4.py +0 -0
  250. {dash-4.4.0 → dash-4.4.1}/dash/html/H5.py +0 -0
  251. {dash-4.4.0 → dash-4.4.1}/dash/html/H6.py +0 -0
  252. {dash-4.4.0 → dash-4.4.1}/dash/html/Header.py +0 -0
  253. {dash-4.4.0 → dash-4.4.1}/dash/html/Hgroup.py +0 -0
  254. {dash-4.4.0 → dash-4.4.1}/dash/html/Hr.py +0 -0
  255. {dash-4.4.0 → dash-4.4.1}/dash/html/I.py +0 -0
  256. {dash-4.4.0 → dash-4.4.1}/dash/html/Iframe.py +0 -0
  257. {dash-4.4.0 → dash-4.4.1}/dash/html/Img.py +0 -0
  258. {dash-4.4.0 → dash-4.4.1}/dash/html/Ins.py +0 -0
  259. {dash-4.4.0 → dash-4.4.1}/dash/html/Kbd.py +0 -0
  260. {dash-4.4.0 → dash-4.4.1}/dash/html/Keygen.py +0 -0
  261. {dash-4.4.0 → dash-4.4.1}/dash/html/Label.py +0 -0
  262. {dash-4.4.0 → dash-4.4.1}/dash/html/Legend.py +0 -0
  263. {dash-4.4.0 → dash-4.4.1}/dash/html/Li.py +0 -0
  264. {dash-4.4.0 → dash-4.4.1}/dash/html/Link.py +0 -0
  265. {dash-4.4.0 → dash-4.4.1}/dash/html/Main.py +0 -0
  266. {dash-4.4.0 → dash-4.4.1}/dash/html/MapEl.py +0 -0
  267. {dash-4.4.0 → dash-4.4.1}/dash/html/Mark.py +0 -0
  268. {dash-4.4.0 → dash-4.4.1}/dash/html/Marquee.py +0 -0
  269. {dash-4.4.0 → dash-4.4.1}/dash/html/Meta.py +0 -0
  270. {dash-4.4.0 → dash-4.4.1}/dash/html/Meter.py +0 -0
  271. {dash-4.4.0 → dash-4.4.1}/dash/html/Nav.py +0 -0
  272. {dash-4.4.0 → dash-4.4.1}/dash/html/Nobr.py +0 -0
  273. {dash-4.4.0 → dash-4.4.1}/dash/html/Noscript.py +0 -0
  274. {dash-4.4.0 → dash-4.4.1}/dash/html/ObjectEl.py +0 -0
  275. {dash-4.4.0 → dash-4.4.1}/dash/html/Ol.py +0 -0
  276. {dash-4.4.0 → dash-4.4.1}/dash/html/Optgroup.py +0 -0
  277. {dash-4.4.0 → dash-4.4.1}/dash/html/Option.py +0 -0
  278. {dash-4.4.0 → dash-4.4.1}/dash/html/Output.py +0 -0
  279. {dash-4.4.0 → dash-4.4.1}/dash/html/P.py +0 -0
  280. {dash-4.4.0 → dash-4.4.1}/dash/html/Param.py +0 -0
  281. {dash-4.4.0 → dash-4.4.1}/dash/html/Picture.py +0 -0
  282. {dash-4.4.0 → dash-4.4.1}/dash/html/Plaintext.py +0 -0
  283. {dash-4.4.0 → dash-4.4.1}/dash/html/Pre.py +0 -0
  284. {dash-4.4.0 → dash-4.4.1}/dash/html/Progress.py +0 -0
  285. {dash-4.4.0 → dash-4.4.1}/dash/html/Q.py +0 -0
  286. {dash-4.4.0 → dash-4.4.1}/dash/html/Rb.py +0 -0
  287. {dash-4.4.0 → dash-4.4.1}/dash/html/Rp.py +0 -0
  288. {dash-4.4.0 → dash-4.4.1}/dash/html/Rt.py +0 -0
  289. {dash-4.4.0 → dash-4.4.1}/dash/html/Rtc.py +0 -0
  290. {dash-4.4.0 → dash-4.4.1}/dash/html/Ruby.py +0 -0
  291. {dash-4.4.0 → dash-4.4.1}/dash/html/S.py +0 -0
  292. {dash-4.4.0 → dash-4.4.1}/dash/html/Samp.py +0 -0
  293. {dash-4.4.0 → dash-4.4.1}/dash/html/Script.py +0 -0
  294. {dash-4.4.0 → dash-4.4.1}/dash/html/Section.py +0 -0
  295. {dash-4.4.0 → dash-4.4.1}/dash/html/Select.py +0 -0
  296. {dash-4.4.0 → dash-4.4.1}/dash/html/Shadow.py +0 -0
  297. {dash-4.4.0 → dash-4.4.1}/dash/html/Slot.py +0 -0
  298. {dash-4.4.0 → dash-4.4.1}/dash/html/Small.py +0 -0
  299. {dash-4.4.0 → dash-4.4.1}/dash/html/Source.py +0 -0
  300. {dash-4.4.0 → dash-4.4.1}/dash/html/Spacer.py +0 -0
  301. {dash-4.4.0 → dash-4.4.1}/dash/html/Span.py +0 -0
  302. {dash-4.4.0 → dash-4.4.1}/dash/html/Strike.py +0 -0
  303. {dash-4.4.0 → dash-4.4.1}/dash/html/Strong.py +0 -0
  304. {dash-4.4.0 → dash-4.4.1}/dash/html/Sub.py +0 -0
  305. {dash-4.4.0 → dash-4.4.1}/dash/html/Summary.py +0 -0
  306. {dash-4.4.0 → dash-4.4.1}/dash/html/Sup.py +0 -0
  307. {dash-4.4.0 → dash-4.4.1}/dash/html/Table.py +0 -0
  308. {dash-4.4.0 → dash-4.4.1}/dash/html/Tbody.py +0 -0
  309. {dash-4.4.0 → dash-4.4.1}/dash/html/Td.py +0 -0
  310. {dash-4.4.0 → dash-4.4.1}/dash/html/Template.py +0 -0
  311. {dash-4.4.0 → dash-4.4.1}/dash/html/Textarea.py +0 -0
  312. {dash-4.4.0 → dash-4.4.1}/dash/html/Tfoot.py +0 -0
  313. {dash-4.4.0 → dash-4.4.1}/dash/html/Th.py +0 -0
  314. {dash-4.4.0 → dash-4.4.1}/dash/html/Thead.py +0 -0
  315. {dash-4.4.0 → dash-4.4.1}/dash/html/Time.py +0 -0
  316. {dash-4.4.0 → dash-4.4.1}/dash/html/Title.py +0 -0
  317. {dash-4.4.0 → dash-4.4.1}/dash/html/Tr.py +0 -0
  318. {dash-4.4.0 → dash-4.4.1}/dash/html/Track.py +0 -0
  319. {dash-4.4.0 → dash-4.4.1}/dash/html/U.py +0 -0
  320. {dash-4.4.0 → dash-4.4.1}/dash/html/Ul.py +0 -0
  321. {dash-4.4.0 → dash-4.4.1}/dash/html/Var.py +0 -0
  322. {dash-4.4.0 → dash-4.4.1}/dash/html/Video.py +0 -0
  323. {dash-4.4.0 → dash-4.4.1}/dash/html/Wbr.py +0 -0
  324. {dash-4.4.0 → dash-4.4.1}/dash/html/Xmp.py +0 -0
  325. {dash-4.4.0 → dash-4.4.1}/dash/html/__init__.py +0 -0
  326. {dash-4.4.0 → dash-4.4.1}/dash/html/_imports_.py +0 -0
  327. {dash-4.4.0 → dash-4.4.1}/dash/html/dash_html_components.min.js +0 -0
  328. {dash-4.4.0 → dash-4.4.1}/dash/html/dash_html_components.min.js.map +0 -0
  329. {dash-4.4.0 → dash-4.4.1}/dash/html/metadata.json +0 -0
  330. {dash-4.4.0 → dash-4.4.1}/dash/labextension/package.json +0 -0
  331. {dash-4.4.0 → dash-4.4.1}/dash/mcp/__init__.py +0 -0
  332. {dash-4.4.0 → dash-4.4.1}/dash/mcp/_configure.py +0 -0
  333. {dash-4.4.0 → dash-4.4.1}/dash/mcp/_decorator.py +0 -0
  334. {dash-4.4.0 → dash-4.4.1}/dash/mcp/_server.py +0 -0
  335. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/__init__.py +0 -0
  336. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/__init__.py +0 -0
  337. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/base.py +0 -0
  338. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/resource_clientside_callbacks.py +0 -0
  339. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/resource_components.py +0 -0
  340. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/resource_layout.py +0 -0
  341. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/resource_page_layout.py +0 -0
  342. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/resources/resource_pages.py +0 -0
  343. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/__init__.py +0 -0
  344. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/base.py +0 -0
  345. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/callback_adapter.py +0 -0
  346. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/callback_adapter_collection.py +0 -0
  347. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/callback_utils.py +0 -0
  348. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/descriptions/__init__.py +0 -0
  349. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/descriptions/base.py +0 -0
  350. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/descriptions/description_background_callbacks.py +0 -0
  351. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/descriptions/description_docstring.py +0 -0
  352. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/descriptions/description_outputs.py +0 -0
  353. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/__init__.py +0 -0
  354. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/base.py +0 -0
  355. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/__init__.py +0 -0
  356. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/base.py +0 -0
  357. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/description_component_props.py +0 -0
  358. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/description_docstrings.py +0 -0
  359. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/description_html_labels.py +0 -0
  360. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/input_descriptions/description_pattern_matching.py +0 -0
  361. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/schema_callback_type_annotations.py +0 -0
  362. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/schema_component_proptypes.py +0 -0
  363. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/schema_component_proptypes_overrides.py +0 -0
  364. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/input_schemas/schema_pattern_matching.py +0 -0
  365. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/output_schemas/__init__.py +0 -0
  366. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/output_schemas/schema_callback_response.py +0 -0
  367. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/prop_roles.py +0 -0
  368. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/results/__init__.py +0 -0
  369. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/results/base.py +0 -0
  370. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/results/result_dataframe.py +0 -0
  371. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/results/result_plotly_figure.py +0 -0
  372. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/tool_background_tasks.py +0 -0
  373. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/tool_decorated_mcp_functions.py +0 -0
  374. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/tool_get_dash_component.py +0 -0
  375. {dash-4.4.0 → dash-4.4.1}/dash/mcp/primitives/tools/tools_callbacks.py +0 -0
  376. {dash-4.4.0 → dash-4.4.1}/dash/mcp/tasks/__init__.py +0 -0
  377. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/__init__.py +0 -0
  378. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/callback_types.py +0 -0
  379. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/component_types.py +0 -0
  380. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/exceptions.py +0 -0
  381. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/protocol.py +0 -0
  382. {dash-4.4.0 → dash-4.4.1}/dash/mcp/types/typing_utils.py +0 -0
  383. {dash-4.4.0 → dash-4.4.1}/dash/nbextension/__init__.py +0 -0
  384. {dash-4.4.0 → dash-4.4.1}/dash/nbextension/dash.json +0 -0
  385. {dash-4.4.0 → dash-4.4.1}/dash/nbextension/main.js +0 -0
  386. {dash-4.4.0 → dash-4.4.1}/dash/py.typed +0 -0
  387. {dash-4.4.0 → dash-4.4.1}/dash/resources.py +0 -0
  388. {dash-4.4.0 → dash-4.4.1}/dash/testing/__init__.py +0 -0
  389. {dash-4.4.0 → dash-4.4.1}/dash/testing/application_runners.py +0 -0
  390. {dash-4.4.0 → dash-4.4.1}/dash/testing/browser.py +0 -0
  391. {dash-4.4.0 → dash-4.4.1}/dash/testing/composite.py +0 -0
  392. {dash-4.4.0 → dash-4.4.1}/dash/testing/consts.py +0 -0
  393. {dash-4.4.0 → dash-4.4.1}/dash/testing/dash_page.py +0 -0
  394. {dash-4.4.0 → dash-4.4.1}/dash/testing/errors.py +0 -0
  395. {dash-4.4.0 → dash-4.4.1}/dash/testing/newhooks.py +0 -0
  396. {dash-4.4.0 → dash-4.4.1}/dash/testing/plugin.py +0 -0
  397. {dash-4.4.0 → dash-4.4.1}/dash/testing/wait.py +0 -0
  398. {dash-4.4.0 → dash-4.4.1}/dash/types.py +0 -0
  399. {dash-4.4.0 → dash-4.4.1}/dash.egg-info/dependency_links.txt +0 -0
  400. {dash-4.4.0 → dash-4.4.1}/dash.egg-info/entry_points.txt +0 -0
  401. {dash-4.4.0 → dash-4.4.1}/dash.egg-info/top_level.txt +0 -0
  402. {dash-4.4.0 → dash-4.4.1}/requirements/ag-grid.txt +0 -0
  403. {dash-4.4.0 → dash-4.4.1}/requirements/async.txt +0 -0
  404. {dash-4.4.0 → dash-4.4.1}/requirements/celery.txt +0 -0
  405. {dash-4.4.0 → dash-4.4.1}/requirements/ci.txt +0 -0
  406. {dash-4.4.0 → dash-4.4.1}/requirements/cloud.txt +0 -0
  407. {dash-4.4.0 → dash-4.4.1}/requirements/compress.txt +0 -0
  408. {dash-4.4.0 → dash-4.4.1}/requirements/dev.txt +0 -0
  409. {dash-4.4.0 → dash-4.4.1}/requirements/diskcache.txt +0 -0
  410. {dash-4.4.0 → dash-4.4.1}/requirements/fastapi.txt +0 -0
  411. {dash-4.4.0 → dash-4.4.1}/requirements/quart.txt +0 -0
  412. {dash-4.4.0 → dash-4.4.1}/requirements/testing.txt +0 -0
  413. {dash-4.4.0 → dash-4.4.1}/setup.cfg +0 -0
  414. {dash-4.4.0 → dash-4.4.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dash
3
- Version: 4.4.0
3
+ Version: 4.4.1
4
4
  Summary: A Python framework for building reactive web-apps. Developed by Plotly.
5
5
  Home-page: https://plotly.com/dash
6
6
  Author: Chris Parmer
@@ -45,6 +45,7 @@ Requires-Dist: nest-asyncio
45
45
  Requires-Dist: setuptools
46
46
  Requires-Dist: janus>=1.0.0
47
47
  Requires-Dist: pydantic>=2.10
48
+ Requires-Dist: comm
48
49
  Provides-Extra: async
49
50
  Requires-Dist: flask[async]; extra == "async"
50
51
  Provides-Extra: ci
@@ -24,6 +24,7 @@ from .exceptions import (
24
24
  ImportedInsideCallbackError,
25
25
  )
26
26
  from ._get_app import get_app
27
+ from . import _callback_signing
27
28
  from ._grouping import (
28
29
  flatten_grouping,
29
30
  make_grouping_by_index,
@@ -387,6 +388,24 @@ def _initialize_context(args, kwargs, inputs_state_indices, has_output, insert_o
387
388
  )
388
389
 
389
390
 
391
+ def get_request_end_id(secret: bytes):
392
+ """Return the verified end_id for the current request, or ``None``.
393
+
394
+ The renderer echoes the server-signed ``endId`` token on every callback
395
+ request; this verifies the signature and returns the underlying end_id so
396
+ background handles can be checked against it.
397
+ """
398
+ adapter = get_app().backend.request_adapter()
399
+ if not adapter:
400
+ return None
401
+ token = adapter.args.get("endId")
402
+ return _callback_signing.unsign(secret, _callback_signing.END_SCOPE, token)
403
+
404
+
405
+ def _get_signing_secret() -> bytes:
406
+ return get_app()._get_signing_secret() # pylint: disable=protected-access
407
+
408
+
390
409
  def _get_callback_manager(
391
410
  kwargs: dict, background: dict
392
411
  ) -> BaseBackgroundCallbackManager:
@@ -409,8 +428,14 @@ def _get_callback_manager(
409
428
  old_job = adapter.args.getlist("oldJob") if hasattr(adapter.args, "getlist") else []
410
429
 
411
430
  if old_job:
412
- for job in old_job:
413
- callback_manager.terminate_job(job)
431
+ secret = _get_signing_secret()
432
+ scope = _callback_signing.job_scope(get_request_end_id(secret))
433
+ for signed_job in old_job:
434
+ # Only terminate jobs whose handle we actually signed for this page
435
+ # load; ignore forged or replayed pids.
436
+ job = _callback_signing.unsign(secret, scope, signed_job)
437
+ if job is not None:
438
+ callback_manager.terminate_job(job)
414
439
 
415
440
  return callback_manager
416
441
 
@@ -450,9 +475,18 @@ def _setup_background_callback(
450
475
  ctx_value,
451
476
  )
452
477
 
478
+ # Sign the handles before handing them to the browser so they cannot be
479
+ # forged (arbitrary pid kill / arbitrary cache read) or replayed from
480
+ # another page load. The renderer treats them as opaque strings.
481
+ secret = _get_signing_secret()
482
+ end_id = get_request_end_id(secret)
453
483
  data = {
454
- "cacheKey": cache_key,
455
- "job": job,
484
+ "cacheKey": _callback_signing.sign(
485
+ secret, _callback_signing.cache_scope(end_id), cache_key
486
+ ),
487
+ "job": _callback_signing.sign(
488
+ secret, _callback_signing.job_scope(end_id), str(job)
489
+ ),
456
490
  }
457
491
 
458
492
  cancel = background.get("cancel")
@@ -467,15 +501,38 @@ def _setup_background_callback(
467
501
  return to_json(data)
468
502
 
469
503
 
504
+ def _read_request_handles():
505
+ """Read and verify the signed cacheKey/job handles from the current request.
506
+
507
+ Returns ``(cache_key, job_id)`` as the raw (unsigned) values, or ``None`` for
508
+ any handle that is missing or whose signature does not verify against this
509
+ page load's end_id. This is what prevents a client from supplying an
510
+ arbitrary cache key (read/delete) or an arbitrary pid (kill).
511
+ """
512
+ adapter = get_app().backend.request_adapter()
513
+ if not adapter:
514
+ return None, None
515
+ secret = _get_signing_secret()
516
+ end_id = get_request_end_id(secret)
517
+ cache_key = _callback_signing.unsign(
518
+ secret,
519
+ _callback_signing.cache_scope(end_id),
520
+ adapter.args.get("cacheKey"),
521
+ )
522
+ job_id = _callback_signing.unsign(
523
+ secret,
524
+ _callback_signing.job_scope(end_id),
525
+ adapter.args.get("job"),
526
+ )
527
+ return cache_key, job_id
528
+
529
+
470
530
  def _progress_background_callback(
471
531
  response, callback_manager, background, cache_key=None
472
532
  ):
473
533
  progress_outputs = background.get("progress")
474
- if cache_key is None:
475
- adapter = get_app().backend.request_adapter()
476
- cache_key = adapter.args.get("cacheKey")
477
534
 
478
- if progress_outputs:
535
+ if progress_outputs and cache_key is not None:
479
536
  # Get the progress before the result as it would be erased after the results.
480
537
  progress = callback_manager.get_progress(cache_key)
481
538
  if progress:
@@ -498,15 +555,19 @@ def _update_background_callback(
498
555
  callback_manager = _get_callback_manager(kwargs, background)
499
556
 
500
557
  if cache_key is None or job_id is None:
501
- adapter = get_app().backend.request_adapter()
502
- cache_key = cache_key or (adapter.args.get("cacheKey") if adapter else None)
503
- job_id = job_id or (adapter.args.get("job") if adapter else None)
558
+ req_cache_key, req_job_id = _read_request_handles()
559
+ cache_key = cache_key or req_cache_key
560
+ job_id = job_id or req_job_id
504
561
 
505
562
  _progress_background_callback(
506
563
  response, callback_manager, background, cache_key=cache_key
507
564
  )
508
565
 
509
- output_value = callback_manager.get_result(cache_key, job_id)
566
+ if cache_key is None:
567
+ # No valid handle for this page load -> read nothing, delete nothing.
568
+ output_value = callback_manager.UNDEFINED
569
+ else:
570
+ output_value = callback_manager.get_result(cache_key, job_id)
510
571
 
511
572
  return _handle_rest_background_callback(
512
573
  output_value,
@@ -531,12 +592,8 @@ def _handle_rest_background_callback(
531
592
  cache_key=None,
532
593
  job_id=None,
533
594
  ):
534
- if cache_key is None or job_id is None:
535
- adapter = get_app().backend.request_adapter()
536
- cache_key = cache_key or (adapter.args.get("cacheKey") if adapter else None)
537
- job_id = job_id or (adapter.args.get("job") if adapter else None)
538
595
  # Must get job_running after get_result since get_results terminates it.
539
- job_running = callback_manager.job_running(job_id)
596
+ job_running = callback_manager.job_running(job_id) if job_id is not None else False
540
597
  if not job_running and output_value is callback_manager.UNDEFINED:
541
598
  # Job canceled -> no output to close the loop.
542
599
  output_value = NoUpdate()
@@ -0,0 +1,68 @@
1
+ """Signing helpers for background-callback handles.
2
+
3
+ Background callbacks round-trip two values through the browser: the ``cacheKey``
4
+ (the diskcache/celery result key) and the ``job`` (the OS PID or Celery task id).
5
+ Historically these were sent to the client verbatim and trusted verbatim when
6
+ they came back, which let any HTTP client ask the server to read/delete an
7
+ arbitrary cache entry or to ``SIGKILL`` an arbitrary process id.
8
+
9
+ To close that, the server issues a per-page-load ``end_id`` token (signed so the
10
+ server can recognise the ones it minted), and every ``cacheKey``/``job`` handle
11
+ is HMAC-signed with a server-held secret and bound to that ``end_id``. A forged
12
+ PID or arbitrary cache key never carries a valid signature, and a handle minted
13
+ for one page load cannot be replayed from another. The client treats all of
14
+ these as opaque strings, so nothing about the handshake is visible to or
15
+ forgeable by the browser.
16
+
17
+ (This ``end_id`` is unrelated to the client-generated ``rendererId`` used for
18
+ SharedWorker routing in ``dash-renderer/src/utils/rendererId.ts``.)
19
+ """
20
+
21
+ import hmac
22
+ from hashlib import sha256
23
+ from typing import Optional
24
+
25
+ # Separates the payload from its signature in a signed token. Chosen because it
26
+ # never appears in the values we sign (hex digests, integers, and gen_salt
27
+ # output are all limited to ``[A-Za-z0-9]``).
28
+ _SEP = "~"
29
+
30
+
31
+ def _mac(secret: bytes, scope: str, value: str) -> str:
32
+ msg = f"{scope}\x00{value}".encode("utf-8")
33
+ return hmac.new(secret, msg, sha256).hexdigest()
34
+
35
+
36
+ def sign(secret: bytes, scope: str, value: str) -> str:
37
+ """Return ``value`` with an HMAC signature appended, bound to ``scope``."""
38
+ return f"{value}{_SEP}{_mac(secret, scope, value)}"
39
+
40
+
41
+ def unsign(secret: bytes, scope: str, signed: Optional[str]) -> Optional[str]:
42
+ """Verify a signed token and return the original value, or ``None``.
43
+
44
+ Returns ``None`` when the token is missing, malformed, or the signature does
45
+ not match ``scope`` under ``secret``. Uses a constant-time comparison so the
46
+ check does not leak the expected signature.
47
+ """
48
+ if not signed or _SEP not in signed:
49
+ return None
50
+
51
+ value, _, mac = signed.rpartition(_SEP)
52
+ expected = _mac(secret, scope, value)
53
+ if hmac.compare_digest(mac, expected):
54
+ return value
55
+ return None
56
+
57
+
58
+ # Scope strings. The end_id is folded into the job/cache scopes so a handle is
59
+ # only valid for the page load it was issued to.
60
+ END_SCOPE = "end"
61
+
62
+
63
+ def job_scope(end_id: Optional[str]) -> str:
64
+ return f"job:{end_id or ''}"
65
+
66
+
67
+ def cache_scope(end_id: Optional[str]) -> str:
68
+ return f"cacheKey:{end_id or ''}"
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  from typing import Any, List, Dict
3
3
 
4
- __version__ = "3.4.0"
4
+ __version__ = "3.4.1"
5
5
 
6
6
  _available_react_versions = {"18.3.1", "18.2.0", "16.14.0"}
7
7
  _available_reactdom_versions = {"18.3.1", "18.2.0", "16.14.0"}
@@ -65,7 +65,7 @@ _js_dist = [
65
65
  {
66
66
  "relative_package_path": "dash-renderer/build/dash_renderer.min.js",
67
67
  "dev_package_path": "dash-renderer/build/dash_renderer.dev.js",
68
- "external_url": "https://unpkg.com/dash-renderer@3.4.0"
68
+ "external_url": "https://unpkg.com/dash-renderer@3.4.1"
69
69
  "/build/dash_renderer.min.js",
70
70
  "namespace": "dash",
71
71
  },
@@ -4,6 +4,7 @@ import sys
4
4
  import uuid
5
5
  import hashlib
6
6
  import importlib
7
+ import importlib.util
7
8
  from collections import abc
8
9
  import subprocess
9
10
  import logging
@@ -17,7 +18,7 @@ import os
17
18
 
18
19
  from html import escape
19
20
  from functools import wraps
20
- from typing import Union
21
+ from typing import Optional, Union
21
22
  from .types import RendererHooks
22
23
 
23
24
  logger = logging.getLogger()
@@ -395,3 +396,69 @@ def get_root_path(import_name: str) -> str:
395
396
 
396
397
  # filepath is import_name.py for a module, or __init__.py for a package.
397
398
  return os.path.dirname(os.path.abspath(filepath)) # type: ignore[no-any-return]
399
+
400
+
401
+ def canonical_import_name(module_file: str) -> Optional[str]:
402
+ """Best-effort dotted import name for a running main module.
403
+
404
+ Mirrors how the FastAPI backend derives the uvicorn import string
405
+ (see ``dash/backends/_fastapi.py``): the path relative to the current
406
+ working directory with the separator replaced by dots, so a nested
407
+ ``package/app.py`` is aliased under ``package.app`` rather than just
408
+ ``app``. Falls back to the bare basename when the file lives outside the
409
+ cwd (e.g. ``python some/dir/app.py`` where only the script's own directory
410
+ is on ``sys.path``).
411
+
412
+ :meta private:
413
+ """
414
+ try:
415
+ rel_path = os.path.relpath(os.path.abspath(module_file), os.getcwd())
416
+ except (ValueError, OSError):
417
+ rel_path = os.path.basename(module_file)
418
+ if rel_path == os.pardir or rel_path.startswith(os.pardir + os.sep):
419
+ rel_path = os.path.basename(module_file)
420
+ parts = os.path.splitext(rel_path)[0].split(os.sep)
421
+ if not all(part.isidentifier() for part in parts):
422
+ return None
423
+ return ".".join(parts)
424
+
425
+
426
+ def alias_main_module(caller_name: str) -> None:
427
+ """Pre-register the running main module under its canonical import name.
428
+
429
+ When the app module runs as a script (``__main__``), or is re-executed by
430
+ multiprocessing's spawn as ``__mp_main__`` (e.g. in the worker process of
431
+ uvicorn's reloader), a later import of the same file by its real name
432
+ ("app:server" import strings) would execute the module a second time,
433
+ registering every callback twice. Pre-registering the running module under
434
+ its canonical import name makes that import resolve to this module instead
435
+ of re-executing the file. See issue #3818.
436
+
437
+ :meta private:
438
+ """
439
+ if caller_name not in ("__main__", "__mp_main__"):
440
+ return
441
+ module = sys.modules.get(caller_name)
442
+ if module is None:
443
+ return
444
+ module_file = getattr(module, "__file__", None)
445
+ if not module_file:
446
+ return
447
+ import_name = canonical_import_name(module_file)
448
+ if import_name is None or import_name in sys.modules:
449
+ return
450
+ try:
451
+ spec = importlib.util.find_spec(import_name)
452
+ if (
453
+ spec is not None
454
+ and spec.origin is not None
455
+ and os.path.samefile(spec.origin, module_file)
456
+ ):
457
+ sys.modules[import_name] = module
458
+ except (ImportError, ValueError, OSError):
459
+ # Aliasing is a best-effort optimization to avoid re-executing the
460
+ # module: find_spec may raise ImportError/ValueError if the name isn't
461
+ # importable (e.g. a namespace package or a parent __init__ that errors)
462
+ # and samefile may raise OSError if spec.origin no longer exists. In any
463
+ # of these cases we simply skip the alias and let the normal import run.
464
+ pass
@@ -285,6 +285,16 @@ class FlaskDashServer(BaseDashServer[Flask]):
285
285
  response_data = await response_data
286
286
  return cb_ctx.dash_response.set_response(data=response_data)
287
287
 
288
+ # Preserve the view function's identity as `dash.dash.dispatch` so that
289
+ # integrations keying on the fully-qualified view name keep working after
290
+ # the backend refactor moved dispatching out of `dash.dash.Dash.dispatch`.
291
+ # e.g. Flask-WTF CSRFProtect exemptions:
292
+ # csrf._exempt_views.add("dash.dash.dispatch")
293
+ for _fn in (_dispatch, _dispatch_async):
294
+ _fn.__name__ = "dispatch"
295
+ _fn.__qualname__ = "dispatch"
296
+ _fn.__module__ = "dash.dash"
297
+
288
298
  if dash_app._use_async: # pylint: disable=protected-access
289
299
  return _dispatch_async
290
300
  return _dispatch
@@ -402,6 +402,15 @@ class QuartDashServer(BaseDashServer[Quart]):
402
402
  response_data = await response_data
403
403
  return cb_ctx.dash_response.set_response(data=response_data) # type: ignore[arg-type]
404
404
 
405
+ # Preserve the view function's identity as `dash.dash.dispatch` so that
406
+ # integrations keying on the fully-qualified view name keep working after
407
+ # the backend refactor moved dispatching out of `dash.dash.Dash.dispatch`.
408
+ # e.g. (Quart-)WTF CSRFProtect exemptions:
409
+ # csrf._exempt_views.add("dash.dash.dispatch")
410
+ _dispatch.__name__ = "dispatch"
411
+ _dispatch.__qualname__ = "dispatch"
412
+ _dispatch.__module__ = "dash.dash"
413
+
405
414
  return _dispatch
406
415
 
407
416
  def register_callback_api_routes(
@@ -55,6 +55,20 @@ class BaseBackgroundCallbackManager(ABC):
55
55
  def get_updated_props(self, key):
56
56
  raise NotImplementedError
57
57
 
58
+ # Key under which the shared background-callback signing secret is stored in
59
+ # the result store, so all workers agree on one secret without a configured
60
+ # server secret_key. See Dash._get_signing_secret.
61
+ SIGNING_SECRET_KEY = "__dash_background_signing_secret__"
62
+
63
+ def get_or_create_signing_secret(self, generate):
64
+ """Return a signing secret shared across workers via the result store.
65
+
66
+ ``generate`` is a zero-argument callable returning fresh ``bytes``. The
67
+ first worker to reach an empty store wins; every other worker reads back
68
+ the stored value, so all workers converge on a single secret.
69
+ """
70
+ raise NotImplementedError
71
+
58
72
  def build_cache_key(self, fn, args, cache_args_to_ignore, triggered):
59
73
  try:
60
74
  fn_source = inspect.getsource(fn)
@@ -92,6 +92,16 @@ CeleryManager requires extra dependencies which can be installed doing
92
92
  def clear_cache_entry(self, key):
93
93
  self.handle.backend.delete(key)
94
94
 
95
+ def get_or_create_signing_secret(self, generate):
96
+ backend = self.handle.backend
97
+ existing = backend.get(self.SIGNING_SECRET_KEY)
98
+ if existing is not None:
99
+ return existing
100
+ secret = generate()
101
+ backend.set(self.SIGNING_SECRET_KEY, secret)
102
+ # Re-read so workers that raced on the initial set converge on one value.
103
+ return backend.get(self.SIGNING_SECRET_KEY) or secret
104
+
95
105
  def call_job_fn(self, key, job_fn, args, context):
96
106
  task = job_fn.delay(key, self._make_progress_key(key), args, context)
97
107
  return task.task_id
@@ -118,6 +118,12 @@ DiskcacheManager requires extra dependencies which can be installed doing
118
118
  def clear_cache_entry(self, key):
119
119
  self.handle.delete(key)
120
120
 
121
+ def get_or_create_signing_secret(self, generate):
122
+ # ``add`` only sets the value if the key is absent (atomic in diskcache),
123
+ # so the first worker wins and the rest read back the stored secret.
124
+ self.handle.add(self.SIGNING_SECRET_KEY, generate())
125
+ return self.handle.get(self.SIGNING_SECRET_KEY)
126
+
121
127
  # noinspection PyUnresolvedReferences
122
128
  def call_job_fn(self, key, job_fn, args, context):
123
129
  """