Skip to content

Conversation

chgiesse
Copy link

  • added context and has_request_context to custom backend
  • added get_root_path to dash _utils
  • compress gets handled by each backend

Christian Giessel added 5 commits September 19, 2025 01:43
∙ removed flask specific import in _validate and use backends.backend.has_request_context now
∙ callback context uses request adapter context now
∙
removed flask.helpers.get_root_path usage
flask fully decoupled from dash
@BSd3v BSd3v requested a review from Copilot September 19, 2025 20:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR decouples Dash from Flask dependencies by creating a unified backend abstraction layer that supports multiple web frameworks (Flask, Quart, and FastAPI). The main goal is to move Flask-specific functionality into backend-specific implementations while maintaining a consistent interface across all supported frameworks.

Key changes:

  • Moved Flask-specific compression logic to individual backend implementations
  • Added backend-agnostic context and request handling methods
  • Created a new get_root_path utility to replace Flask's helper function

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dash/dash.py Removes Flask import and delegates compression handling to backend
dash/backends/base_server.py Adds abstract methods for request context and compression handling
dash/backends/_flask.py Implements Flask-specific compression and context methods
dash/backends/_quart.py Implements Quart-specific compression and context methods
dash/backends/_fastapi.py Implements FastAPI-specific compression and context methods
dash/_utils.py Adds get_root_path function to replace Flask's helper
dash/_validate.py Updates to use backend-agnostic request context checking
dash/_callback_context.py Updates timing information to use backend-agnostic context
dash/_pages.py Updates to use new get_root_path utility
dash/_configs.py Updates to use new get_root_path utility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@BSd3v BSd3v requested a review from Copilot September 26, 2025 14:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant