-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Closed
Description
There are some comments about this on #4842 but I think it warrants its own issue.
If simplejson
is present in the environment, the library uses it so .json()
returns simplejson.errors.JSONDecodeError
rather than json.decoder.JSONDecodeError
If I'm writing a library that uses requests
I don't know what other libraries will be present in an environment. I expect that a method returns a consistent exception type that I can handle. As it stands, anyone writing a library (e.g. conda-forge/conda-smithy#1369, Vonage/vonage-python-sdk#197) has to check themselves if simplejson
is present to know what exception type will be thrown.
nicpottier and norkans7
Metadata
Metadata
Assignees
Labels
No labels