Skip to content

Commit

Permalink
docs(exceptions): Remove unused exception URLRequired from documentation
Browse files Browse the repository at this point in the history
The documentation previously listed `requests.URLRequired` as a valid
exception, suggesting it would be raised for invalid URLs. However,
this exception has been dead code since commit ab27027 (2012) and is
never actually raised.

Instead, invalid URLs raise `MissingSchema`, `InvalidSchema`, or
`InvalidURL`, none of which were documented. This commit removes
`URLRequired` from the documentation to reflect the actual behavior
and prevent confusion.

Signed-off-by: jakobheine <[email protected]>
  • Loading branch information
jakobheine committed Feb 1, 2025
1 parent fe0583b commit e361622
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Exceptions
.. autoexception:: requests.RequestException
.. autoexception:: requests.ConnectionError
.. autoexception:: requests.HTTPError
.. autoexception:: requests.URLRequired
.. autoexception:: requests.TooManyRedirects
.. autoexception:: requests.ConnectTimeout
.. autoexception:: requests.ReadTimeout
Expand Down

0 comments on commit e361622

Please sign in to comment.