Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Deprecate the "update" aspect of context hooks #5

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

pawamoy
Copy link
Collaborator

@pawamoy pawamoy commented Jul 14, 2024

Context hooks must now always modify the context in place. The API is deprecated accordingly (backward compatible).

Issue-4: #4

Context hooks must now always modify the context in place.
The API is deprecated accordingly (backward compatible).

Issue-4: #4
@pawamoy pawamoy requested a review from sisp July 14, 2024 15:35
@pawamoy
Copy link
Collaborator Author

pawamoy commented Jul 14, 2024

@bswck if you want to have a look :)

Copy link
Member

@sisp sisp left a comment

Choose a reason for hiding this comment

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

@pawamoy How about adding tests with the deprecated approach verifying that the warning is raised?

@pawamoy
Copy link
Collaborator Author

pawamoy commented Jul 14, 2024

Thanks for the review @sisp, done 🙂

Copy link
Member

@sisp sisp left a comment

Choose a reason for hiding this comment

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

LGTM! 👌 I have only two minor questions.

pyproject.toml Show resolved Hide resolved
@pawamoy pawamoy merged commit bdae1c2 into main Jul 15, 2024
49 of 51 checks passed
@bswck
Copy link

bswck commented Jul 15, 2024

@pawamoy thanks for mentioning. I only wanted to leave two comments after the PR was merged, but as I think about them now, there can't be better stacklevel for warnings because they would point to extension initialization nowhere useful, not to class construction.

Thanks for fixing #4.

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.

3 participants