Skip to content

Conversation

@groyoh
Copy link
Contributor

@groyoh groyoh commented Aug 26, 2025

This upgrade includes a breaking change in the typeguard API. typeguard.check_type doesn't rely on typeguard.config anymore. The solutions are either:

  • Explicitely mention the config in the typeguard.check_type
  • Rely on the @typechecked decorator

I went for the first one as we don't have many call to typeguard.check_type.

Note that version 4.0.0 was released on 2023-05-12 so there's no reason to try and maintain compatibility with versions < 4.

@groyoh groyoh force-pushed the dependency/typeguard branch from 576e064 to 4ea0cb5 Compare August 26, 2025 15:02
@groyoh groyoh changed the title dependency: Ensure the client can be used with the latest version of typeguard dependency: Updatetypeguard to version 4 Aug 26, 2025
@groyoh groyoh force-pushed the dependency/typeguard branch from 4ea0cb5 to e1e8c5e Compare August 27, 2025 06:30
@groyoh groyoh marked this pull request as ready for review August 27, 2025 06:31
@jdenquin jdenquin requested a review from Copilot August 27, 2025 07:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the typeguard dependency from version 3.0.2 to version 4.0 and adapts the codebase to accommodate breaking changes in the new major version.

  • Updates dependency version specification in setup.cfg
  • Migrates from module-level configuration to function-level parameters for collection checking
  • Changes import style from module import to specific function imports

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
setup.cfg Updates typeguard dependency version constraint from ~3.0.2 to ~4.0
lago_python_client/webhooks/clients.py Adapts to typeguard v4 API changes with specific imports and inline configuration
lago_python_client/services/response.py Migrates typeguard usage to v4 API with function-level collection checking strategy

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@iavorbotev iavorbotev left a comment

Choose a reason for hiding this comment

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

LGTM!

@groyoh
Copy link
Contributor Author

groyoh commented Aug 27, 2025

Thanks @jdenquin and @iavorbotev ! 🙏

@groyoh groyoh merged commit dd523c1 into main Aug 27, 2025
7 checks passed
@groyoh groyoh deleted the dependency/typeguard branch August 27, 2025 09:41
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.

4 participants