Skip to content

Upgrade to cross-web 0.6.0#4390

Merged
patrick91 merged 1 commit intomainfrom
fix/cross-web-0.6
Apr 29, 2026
Merged

Upgrade to cross-web 0.6.0#4390
patrick91 merged 1 commit intomainfrom
fix/cross-web-0.6

Conversation

@patrick91
Copy link
Copy Markdown
Member

@patrick91 patrick91 commented Apr 29, 2026

Summary by Sourcery

Align Channels HTTP handling with cross-web 0.6.0 requirements and document the compatibility fix.

Bug Fixes:

  • Ensure Channels HTTP integration works correctly with cross-web 0.6.0 and later by exposing path parameters from the Channels scope.

Enhancements:

  • Expose path parameters on the Channels HTTP request and handler abstractions to support frameworks expecting path_params.

Build:

  • Update the cross-web dependency to require version 0.6.0 or newer.

Documentation:

  • Add release notes describing the Channels integration fix and the new cross-web version requirement.

Closes #4388

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 29, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Upgrades the cross-web dependency to 0.6.0 and updates the Channels HTTP request/response adapters to expose path parameters via the new path_params API, plus documents the change in RELEASE.md.

File-Level Changes

Change Details Files
Expose path parameters on Channels HTTP request/adapter to satisfy cross-web 0.6.0 API.
  • Add a path_params property on the channels HTTP handler request wrapper that reads kwargs from the consumer.scope['url_route'] mapping.
  • Expose a path_params property on the Strawberry request adapter that forwards to the underlying Channels request path_params.
strawberry/channels/handlers/http_handler.py
Update dependency constraints to use cross-web 0.6.0 and document the patch release.
  • Bump the cross-web dependency minimum version from 0.4.0 to 0.6.0 in pyproject.toml.
  • Add a RELEASE.md entry describing this as a patch release fixing Channels integration with cross-web 0.6.0+.
  • Update the uv.lock file to reflect the new dependency version and resolved graph.
pyproject.toml
RELEASE.md
uv.lock

Possibly linked issues

  • #(unlisted): Yes. The PR adds path_params to Channels adapters and upgrades cross-web, directly fixing the reported Channels breakage.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@botberry
Copy link
Copy Markdown
Member

Thanks for adding the RELEASE.md file!

Below is the changelog that will be used for the release.


This release fixes the Channels integration when using cross-web 0.6.0 or newer.

cross-web now requires request adapters to expose path_params, so Strawberry's
Channels HTTP adapters now read them from the Channels url_route scope.

This release was contributed by @patrick91 in #4390

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This patch upgrades the cross-web dependency to >=0.6.0 and adds the path_params property that the new version now requires from request adapters. The Channels-specific ChannelsRequest reads URL route kwargs from the Django Channels url_route scope entry, and BaseChannelsRequestAdapter delegates to it.

Confidence Score: 5/5

Safe to merge — minimal, targeted change with correct implementation and no regressions expected.

All changes are small and well-scoped: the new path_params property correctly reads from the standard Channels url_route scope with defensive .get() defaults, the version bump aligns with the implementation, and the lockfile hashes are updated. No logic errors or security concerns identified.

No files require special attention.

Important Files Changed

Filename Overview
strawberry/channels/handlers/http_handler.py Adds path_params property to ChannelsRequest (reads url_route.kwargs from Channels scope) and a delegating property on BaseChannelsRequestAdapter — correct and defensive implementation required by cross-web 0.6.0
pyproject.toml Bumps cross-web minimum version from 0.4.0 to 0.6.0 to match new path_params interface requirement
uv.lock Lockfile updated from cross-web 0.4.1 to 0.6.0 with correct hashes
RELEASE.md New release note describing the patch fix for Channels integration with cross-web 0.6.0

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class ChannelsRequest {
        +consumer: ChannelsConsumer
        +body: bytes
        +query_params: QueryParams
        +path_params: Mapping[str, Any]
        +headers: Mapping[str, str]
        +method: HTTPMethod
        +content_type: str | None
        +form_data: FormData
    }

    class BaseChannelsRequestAdapter {
        +request: ChannelsRequest
        +query_params: QueryParams
        +path_params: Mapping[str, Any]
        +method: HTTPMethod
        +headers: Mapping[str, str]
        +url: str
        +cookies: Mapping[str, str]
    }

    class ChannelsRequestAdapter {
        +get_body() bytes
        +get_form_data() FormData
    }

    class SyncChannelsRequestAdapter {
        +body: bytes
        +post_data: Mapping
        +files: Mapping
        +get_form_data() FormData
    }

    class AsyncHTTPRequestAdapter {
        <<cross-web>>
        +path_params: Mapping[str, Any]
    }

    class SyncHTTPRequestAdapter {
        <<cross-web>>
        +path_params: Mapping[str, Any]
    }

    BaseChannelsRequestAdapter --> ChannelsRequest : uses
    ChannelsRequestAdapter --|> BaseChannelsRequestAdapter
    SyncChannelsRequestAdapter --|> BaseChannelsRequestAdapter
    ChannelsRequestAdapter ..|> AsyncHTTPRequestAdapter : implements
    SyncChannelsRequestAdapter ..|> SyncHTTPRequestAdapter : implements
Loading

Reviews (1): Last reviewed commit: "Upgrade to cross-web 0.6.0" | Re-trigger Greptile

@botberry
Copy link
Copy Markdown
Member

botberry commented Apr 29, 2026

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

@patrick91 patrick91 merged commit 2b60ddf into main Apr 29, 2026
75 checks passed
@patrick91 patrick91 deleted the fix/cross-web-0.6 branch April 29, 2026 08:19
@botberry
Copy link
Copy Markdown
Member

This PR was published as 0.315.3. Thank you for contributing!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 29, 2026

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing fix/cross-web-0.6 (e5dd208) with main (6e30f1a)

Open in CodSpeed

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.

cross-web 0.6.0 breaks channels integration

2 participants