Before this change, vcrpy would not work with modules of Boto (e.g., boto.iam)
that use Boto's CertValidatingHTTPSConnection to connect to AWS (unless you
went through the extra effort of disabling certificate validation during the
tests). This change adds support for those modules.
So the stubs were getting out of hand, and while trying to add support for the
putrequest and putheader methods, I had an idea for a cleaner way to handle
the stubs using the VCRHTTPConnection more as a proxy object. So
VCRHTTPConnection and VCRHTTPSConnection no longer inherit from HTTPConnection
and HTTPSConnection. This allowed me to get rid of quite a bit of
copy-and-pasted stdlib code.
This commit changes the whole core internal flow of requests.
Now, requests are actually physically made lazily when a response
is requested. This allows the entire request to be sent at once.
Otherwise, it would be impossible to compare whether requests have
already been recorded, since httplib.send() allows you to effectively
stream requests over HTTP.
This refactoring includes some PEP-8 compliance changes, as well as some more
complete testing to ensure that we're in fact serving everything out of
cassettes when we thing we are.
Incidentally, it also includes fixes for #3 and #4
Added support and tests for the Requests library. At least basic
support seems to be working. The tests should run fine if you
don't have requests installed; it just won't verify the requests-
specific tests.