Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Refactor logic to handle root_path to keep compatibility with ASGI and compatibility with other non-Starlette-specific libraries like a2wsgi #2400

Merged
merged 14 commits into from
Jan 9, 2024

Commits on Jan 7, 2024

  1. Configuration menu
    Copy the full SHA
    f76cd32 View commit details
    Browse the repository at this point in the history
  2. ♻️ Refactor extracting the local route_path from the scope, and creat…

    …ing the child scope with its own root_pat, this allows sub-apps (e.g. WSGIMiddleware) to know
    
    where it was mounted, and from which path prefix starts the path its sub-app should handle
    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    dd5c99f View commit details
    Browse the repository at this point in the history
  3. ♻️ Refactor datastructures and request to be conformant with the ASGI…

    … spec, respecting root_path
    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    65fb7a9 View commit details
    Browse the repository at this point in the history
  4. ✅ Add and update tests for root_path with mounted apps that don't kno…

    …w about Starlette internals (e.g. the route_root_path extension scope key that was added in
    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    e7f0646 View commit details
    Browse the repository at this point in the history
  5. ✅ Update test for root_path, TestClient was not requiring paths under…

    … a root_path to pass the root_path, which is what clients would have to do if the app is
    
    mounted.
    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    5a696d8 View commit details
    Browse the repository at this point in the history
  6. 🎨 Fix formatting

    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    3a438de View commit details
    Browse the repository at this point in the history
  7. 🎨 Remove type ignore

    tiangolo committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    7336191 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2c0ca97 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. Configuration menu
    Copy the full SHA
    a6267c9 View commit details
    Browse the repository at this point in the history
  2. ✨ Update (deprecated) WSGIMiddleware to be compatible with the update…

    …d root_path, taking pieces from a2wsgi
    tiangolo committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    0d6753f View commit details
    Browse the repository at this point in the history
  3. 🎨 Fix types

    tiangolo committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    0d37c87 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a010c33 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7be8c7a View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Configuration menu
    Copy the full SHA
    7f893a9 View commit details
    Browse the repository at this point in the history