Skip to content
Myr

Skip unneccessary Request.copy in Session.request

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Robert Estelle · committed by Robert Estelle · parent b5c1361 · Browse files · 1 file+6 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−4 removed

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:requests/sessions.py+6 added-4 removed
229 unmodified lines
230231 def update_request(self, request):232 """Destructively updates/merges the settings of a :class:`Request`233 object from those of the :class:`Session`.234235 :param request: mutable :class:`Request` instance.236 """237 cookies = request.cookies or {}238239 # Bootstrap CookieJar.
18 unmodified lines
258 request.auth = merge_setting(request.auth, self.auth)259 request.hooks = merge_setting(request.hooks, self.hooks)260 request.method = request.method.upper()261260 return request261262 def prepare_request(self, request):263 req = self.update_request(request.copy())263 req = request.copy()264 self.update_request(req)265 return req.prepare()266267 def request(self, method, url,268 params=None,
49 unmodified lines
318 auth = auth,319 cookies = cookies,320 hooks = hooks,321 )321 prep = self.prepare_request(req)322 self.update_request(req)323 prep = req.prepare()324325 proxies = proxies or {}326327 # Gather clues from the surrounding environment.
196 unmodified lines