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

  • This request meets Lambda Powertools Tenets
    Should this be considered in other Lambda Powertools languages? i.e. Java, TypeScript

Activity

github-actions

github-actions commented on Nov 14, 2022

@github-actions
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

added
tech-debtTechnical Debt tasks
and removed
internalMaintenance changes
on Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @heitorlessa

        Issue actions

          Maintenance: Implement PEP 612 (ParamSpec) for Logger · Issue #1711 · aws-powertools/powertools-lambda-python