Modernize hostingsvcs.service.URLRequest
Review Request #8909 — Created April 21, 2017 and submitted
The
URLRequest
initializer was using a mutable object ({}
) for its
default value of its headers parameter, which would persist to other
requests if it was modified. We now use a default value ofNone
and
change it to an empty dict in the method call.Documentation has been added for the class and its methods.
Built the docs and read through them.
Ran unit tests.
-
-
reviewboard/hostingsvcs/service.py (Diff revision 1) I don't think we need to use literals for HTTP GET/POST.
-
-
reviewboard/hostingsvcs/service.py (Diff revision 1) Can simplify with:
super(...).__init__(..., headers or {})
Checks run (3 succeeded)
-
-
reviewboard/hostingsvcs/service.py (Diff revision 2) Actually, hold on.
Request
is an old-style class that can't be used withsuper
.
Checks run (3 succeeded)
Description: |
|
---|