requests/requests-oauthlib — pull request #4 by ib-lundgren (2012-12-18 00:58:07+00:00)
Title: Tidying up a bit for requests 1.0

I've added some initial tests and cleaned up the extension code a bit.

Unfortunately this code depends heavily on an update to requests.models.py in which lines 200 & 201 are swapped, i.e.

p.prepare_auth(self.auth)
p.prepare_body(self.data, self.files)

becomes

p.prepare_body(self.data, self.files)
p.prepare_auth(self.auth)

Why? Because we have no idea in auth whether body will soon be filled with files data or not and consequently it would be foolish to assume form encoded on empty body.

I've not had time to look into what implications this might have for requests. Will send a PR when I have. @kennethreitz