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

Make optional callback functions kwarg only #779

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

emontnemery
Copy link
Collaborator

@emontnemery emontnemery commented Jan 15, 2024

Breaking change

Most user facing functions accepting an optional callback function have been changed such that the optional arguments are now kwarg only

Change

Make optional callback functions kwarg only

Background

This is the first step in refactoring the callback functions to accept a bool status and an optional response.

Refactoring the callback handling is needed because callbacks are currently only called if the request suceeds; there's no call if the request fails. This means any user relying on callbacks will hang forever or until a timeout when the request fails.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Is this a breaking change for users of the library?

What's the reason for that goal?

callback functions to accept a bool status and an optional response

@emontnemery
Copy link
Collaborator Author

Is this a breaking change for users of the library?

What's the reason for that goal?

callback functions to accept a bool status and an optional response

Thanks Martin, the PR has been updated with this information

@emontnemery emontnemery merged commit 2c2441b into master Jan 15, 2024
1 check passed
@emontnemery emontnemery deleted the kwargs_only branch January 15, 2024 14:37
@MartinHjelmare
Copy link
Contributor

I fixed a typo.

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.

2 participants