Skip to content

Maintenance: Implement PEP 612 (ParamSpec) for Logger #1711

Closed
@heitorlessa

Description

@heitorlessa

Summary

With typing_extension being now a runtime dependency, we can more accurately type decorators to allow signature change.

Quick blog on UX: https://sobolevn.me/2021/12/paramspec-guide

Why is this needed?

Customers using Pydantic or Event Source Data Class decorators to override Event type fail Mypy when using with logger.inject_lambda_context decorator, since it expects a Dict as its first argument.

Example: #1583

Which area does this relate to?

Logger

Solution

No response

Acknowledgment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical Debt tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions