Skip to content

Typing support for Request & Response storages #11762

@gsoldatov

Description

@gsoldatov

Is your feature request related to a problem?

Currently, type hinting for items inside Application context storage can be done, using AppKey. Adding the same feature to Request & Response classes would be useful as well.

Describe the solution you'd like

  1. Update implementations of MutableMapping in corresponding classes, similarly to how it's done in Application.
  2. Since AppKey will be used there, rename it to a more corresponding name (StorageKey?).
  3. Keep AppKey as an alias to the new name to avoid introducing a breaking change (with a deprecation warning, perhaps).
  4. Update tests & docs.

Describe alternatives you've considered

Related component

Server

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions