fix type of msg argument to HTTPRedirectHandler.redirect_request (#2949)

It's not really documented (https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPRedirectHandler.redirect_request), but logically a message is a str, and reading the code for the stdlib confirms that it's intended to be a str.
This commit is contained in:
Jelle Zijlstra
2019-05-03 14:44:56 -04:00
committed by Sebastian Rittau
parent 4d61442004
commit 8bd744a38f

View File

@@ -85,7 +85,7 @@ class BaseHandler:
class HTTPDefaultErrorHandler(BaseHandler): ...
class HTTPRedirectHandler(BaseHandler):
def redirect_request(self, req: Request, fp: IO[str], code: int, msg: int,
def redirect_request(self, req: Request, fp: IO[str], code: int, msg: str,
hdrs: Mapping[str, str],
newurl: str) -> Optional[Request]: ...
def http_error_301(self, req: Request, fp: IO[str], code: int, msg: int,