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

api_client: accept session #6

Merged
merged 1 commit into from
Aug 19, 2024
Merged

api_client: accept session #6

merged 1 commit into from
Aug 19, 2024

Conversation

aviau
Copy link
Member

@aviau aviau commented Aug 18, 2024

This allows users to pass a requests.session that might have adapters for retrying, backoff, etc.

As a user of the lib, I found myself wanting to enable requests retries and it would have been simple if I coul control the session.

What do we think? The downside is that it might interfere with retry features that we might want to bake in the lib ourselves. But I think the approach right now is to keep this lib very light and keep things simple.

in a follow-up PR I'll make it so that the Session that we create has an adapter with good defaults for retries

@aviau aviau assigned isra17 and unassigned isra17 Aug 18, 2024
@aviau aviau requested a review from isra17 August 18, 2024 20:14
@aviau aviau force-pushed the aviau/session branch 3 times, most recently from 4769ebe to 0b8c6cc Compare August 19, 2024 14:04
@aviau aviau requested a review from mlefebvre August 19, 2024 14:10
@aviau aviau merged commit 8bc6195 into main Aug 19, 2024
5 checks passed
@aviau aviau deleted the aviau/session branch August 19, 2024 14:23
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