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

chore: update httpclient #834

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/unit/http/test_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def test_session_not_preserved(self):
self.assertEqual(response_2.content, "response_2")



class MyVersion(Version):
def __init__(self, domain):
super().__init__(domain, "v1")
Expand Down
2 changes: 1 addition & 1 deletion twilio/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(
self.session = Session() if pool_connections else None
if self.session and max_retries is not None:
self.session.mount("https://", HTTPAdapter(max_retries=max_retries))
if self.session is not None:
elif self.session is not None:
self.session.mount(
"https://", HTTPAdapter(pool_maxsize=min(32, os.cpu_count() + 4))
)
Expand Down
Loading