Skip to content

Commit

Permalink
Update http client comment (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Aug 26, 2024
1 parent 86c9f23 commit cf7bb8b
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit cf7bb8b

Please sign in to comment.