Skip to content

Commit

Permalink
Export HTTPMove (#6594)
Browse files Browse the repository at this point in the history
Nitpick: If you catch `HTTPRedirection` then mypy complains that it
doesn't have a `location` attribute (this is used in
aiohttp-debugtoolbar, for example).

Proposal to export `HTTPMove`, in order to catch any exceptions with
location.
  • Loading branch information
Dreamsorcerer authored May 14, 2023
1 parent cbbf36c commit a5d6418
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES/6594.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Exported ``HTTPMove`` which can be used to catch any redirection request
that has a location -- :user:`dreamsorcerer`.
2 changes: 2 additions & 0 deletions aiohttp/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
HTTPLengthRequired,
HTTPMethodNotAllowed,
HTTPMisdirectedRequest,
HTTPMove,
HTTPMovedPermanently,
HTTPMultipleChoices,
HTTPNetworkAuthenticationRequired,
Expand Down Expand Up @@ -157,6 +158,7 @@
"HTTPLengthRequired",
"HTTPMethodNotAllowed",
"HTTPMisdirectedRequest",
"HTTPMove",
"HTTPMovedPermanently",
"HTTPMultipleChoices",
"HTTPNetworkAuthenticationRequired",
Expand Down

0 comments on commit a5d6418

Please sign in to comment.