-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MNT support oder requests versions (#817)
* MNT support older requests versions * remove unnecessary comment
- Loading branch information
1 parent
9edcb30
commit 912078f
Showing
5 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# JSONDecodeError was introduced in requests=2.27 released in 2022. | ||
# This allows us to support older requests for users | ||
# More information: https://github.com/psf/requests/pull/5856 | ||
try: | ||
from requests import JSONDecodeError # noqa | ||
except ImportError: | ||
try: | ||
from simplejson import JSONDecodeError # noqa | ||
except ImportError: | ||
from json import JSONDecodeError # noqa |