derks/drest — pull request #1 by spookylukey (2013-11-12 12:05:25+00:00)
Title: Fixed mutable default arguments in multiple places

Using mutable default arguments in Python is asking for trouble.

In using drest, I'm pretty sure that I came up against this trouble in practice - I had requests that were using headers from previous requests. My code was involved, so it's hard to track down. I did pin down a set of steps that reliably showed the problem, and after fixed all the mutable default arguments I could find, and the problem stopped. I don't know which one in particular was the fix, but they are all bugs waiting to happen.

I ran the tests, and got the same number of failures before and after.

BTW, thanks for this library, it's working really well for my use case, which requires quite a few customisations but you've already got all the hooks I need - cheers!

Also, sorry for noise on other repo - I forked the datafolklabs repo accidentally first time.