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

Update http client comment #1381

Merged
merged 2 commits into from
Aug 26, 2024
Merged
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
10 changes: 6 additions & 4 deletions stripe/_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
Never,
)

# - Requests is the preferred HTTP library
# - Google App Engine has urlfetch
# - Use Pycurl if it's there (at least it verifies SSL certs)
# - Fall back to urllib2 with a warning if needed

# The precedence of HTTP libraries is
# - Urlfetch (this is provided by Google App Engine, so if it's present you probably want it)
# - Requests (popular library, the top priority for all environments outside Google App Engine, but not always present)
# - Pycurl (another library, not always present, not as preferred as Requests but at least it verifies SSL certs)
# - urllib2 with a warning (basically always present, fallback if needed)
try:
import urllib.request as urllibrequest
import urllib.error as urlliberror
Expand Down
Loading