Skip to content

Provide Request instance in on_skipped_request callback #2007

Closed

Description

@vdusek

SkippedRequestCallback receives only the URL string, so handlers can't access request metadata (notably user_data) for skipped requests:

SkippedRequestCallback = Callable[[str, SkippedReason], Awaitable[None]]

#1999 implements passing the Request in a backward-compatible way, but that requires dual-dispatching on the callback's parameter type annotation, which is fragile runtime inspection (see this comment). Since v2 allows breaking changes, do it there with a clean signature instead:

SkippedRequestCallback = Callable[[Request, SkippedReason], Awaitable[None]]

Related

Activity

  1. added this to the 2.0 milestone on Jul 2, 2026
  2. added
    enhancementNew feature or request.
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Jul 2, 2026
  3. self-assigned this
    on Nov 2, 2026
  4. added a commit that references this issue on Nov 2, 2026
    b3b2b73
  5. vdusek commented on Nov 2, 2026

    @vdusek
    CollaboratorAuthor

    resolved by #2374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions