Max Shytikov
9d8426e668
Make migration python 2.6 compatible
2014-04-30 02:36:26 +02:00
Max Shytikov
424c658da4
Fixed open tmp file in python3
2014-04-30 02:36:26 +02:00
Max Shytikov
f0972628ef
Fixed migration for one file
2014-04-30 02:36:26 +02:00
Max Shytikov
ee28768a31
Added migration script for old cassettes
2014-04-30 02:36:26 +02:00
Max Shytikov
96d8782d08
Added 'protocol' to Request for backwards compatibility
2014-04-30 02:31:11 +02:00
Max Shytikov
f9a64e1609
Fixed available matchers declaration
2014-04-30 02:31:11 +02:00
Max Shytikov
2fa1aaa1f7
Replaced 'url' mather with 'uri'.
2014-04-30 02:31:11 +02:00
Max Shytikov
2f6db0dc0c
Added scheme to default 'match_on'
2014-04-30 02:30:08 +02:00
Max Shytikov
4267828a3e
Added 'scheme' to Request with matcher and test
2014-04-30 02:29:25 +02:00
Max Shytikov
4e9d5f6885
Updated default 'match_on'
2014-04-30 02:29:25 +02:00
Max Shytikov
9b188e986f
Added query to Request with matcher and test
2014-04-30 02:27:52 +02:00
Max Shytikov
6b060e5666
Added path to Request with matcher and test
2014-04-30 02:27:52 +02:00
Max Shytikov
bd9fa773e8
Added port to Request with matcher and test
2014-04-30 02:27:52 +02:00
Max Shytikov
18ec57fa73
Added test and impl for Request 'host' attribute
2014-04-30 02:27:52 +02:00
Max Shytikov
edf1df9188
Replaced Request 'host, port, protocol, path' with 'uri'
2014-04-30 02:27:52 +02:00
Kevin McCarthy
e6fdc735e4
Filter Sensitive Data From Requests
...
Add the ability to filter out sensitive data, using one of three
methods: from headers, from a query string, and by using a custom
callback to modify the request.
Closes #67
2014-04-27 11:38:28 -10:00
Kevin McCarthy
f317800cb7
Add Logging
...
This helps to figure out which matcher has decided your two cassettes
differ, and figure out when your cassettes have hit the network.
Closes #34
2014-04-27 11:29:06 -10:00
Kevin McCarthy
58ac00a7f6
pep8
2014-04-26 21:30:43 -10:00
Kevin McCarthy
6273c32334
Add Exception when JSON Serializing Binary Data
...
Since I can't think of a good way to deal with this, let's just give a
nice error message to point people in the right direction.
Closes #51
2014-04-26 14:31:40 -10:00
Kevin McCarthy
582b8eab51
pep8
2014-04-23 21:24:12 -10:00
Kevin McCarthy
bc5199c893
improve socket mocking to hopefully pass both new python3.4 socket connection stuff and requests tests
2014-04-23 19:30:43 -10:00
Kevin McCarthy
bd2d2cea72
bump supported python3 version to 3.4
2014-04-23 18:58:17 -10:00
Chris Marusich
955e532162
Add full support for Boto
...
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.
2014-04-03 13:52:30 -07:00
Kevin McCarthy
6d0a8d8ed9
use six.moves instead of _compat
2014-03-08 23:14:16 -10:00
Kevin McCarthy
985e573303
pep8 cleanup
2014-03-08 22:59:10 -10:00
Kevin McCarthy
f5db99f079
need the sock for httplib2, don't want sock for requests, can't we all just get along?
2014-03-08 21:56:25 -10:00
Kevin McCarthy
dedca0f6e7
expose sock, pass correct args to connect in stubs. should fix httplib2 in python3
2014-03-08 21:27:09 -10:00
Kevin McCarthy
0d77d2dcc6
fix self.closed in python3, and request must inherit from httprequest for httplib2
2014-03-08 21:11:50 -10:00
Kevin McCarthy
d187d910b9
Don't try to inherit from the real response object
2014-03-08 20:16:45 -10:00
Åsmund Grammeltvedt
a73da71159
Add Python 2.3 support
...
This commit also adds the 'six' dependency
2014-03-08 20:01:48 -10:00
Roberto Abdelkader Martínez Pérez
46a2c25f6a
httplib2 support
2014-03-08 19:35:30 -10:00
Kevin McCarthy
e84cd6f059
Major Refactor of Stubs
...
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.
2014-03-08 19:22:58 -10:00
Marc Abramowitz
559cd902e1
patch: Save requests...HTTPSConnection
...
so that we unpatch back to the correct class in reset().
Closes #59
2014-02-04 10:30:29 -08:00
Kevin McCarthy
84bf7b6132
Load Old Cassettes
...
Add backwards-compatible cassette loading code that can load
the old style header dicts from response cassettes.
2014-01-11 09:28:45 -10:00
Kevin McCarthy
2cf779d776
PEP8 Fixes
2013-12-19 19:43:32 -10:00
Kevin McCarthy
d4494bae50
Let's have the new exceptions subclass basic exception types
2013-12-19 19:43:32 -10:00
Marc Abramowitz
41f5fce895
Nicer error for can't overwrite existing cassette
...
Raise CannotOverwriteExistingCassetteException rather than Exception.
Include cassette filename and record mode in error message.
2013-12-19 19:20:00 -10:00
Marc Abramowitz
a6806f2f99
Nicer error when cassette doesn't contain request
...
Raise UnhandledHTTPRequestError.
Show name of cassette and request.
2013-12-19 15:41:04 -08:00
Kevin McCarthy
624212ef15
Store Headers as a List
...
This is a backwards-incompatible change that will store headers
as a list rather than a dictionary. The reason being that you can
have multiple values for a single header, and concatenating them
together with commas can create an unparseable string (sometimes
the header values can have commas in them)
2013-12-15 16:56:39 -10:00
Kevin McCarthy
144d25bc66
Add Decorator Support
2013-12-15 16:56:25 -10:00
Kevin McCarthy
49929e3064
formatting fixes
2013-12-01 14:38:46 -10:00
Kevin McCarthy
188b57a2fa
Fix API by adding 'responses_of' method
...
`responses_of` replaces `response_of`, since each request can have
several matching responses now.
This breaks backwards compatibility if you are using the
response_of method, so a version bump will be required.
2013-12-01 14:26:35 -10:00
Kevin McCarthy
b84f8e963b
Fix Cryptic 'write-protected' Message
...
Closes #46
2013-12-01 13:46:44 -10:00
Marc Abramowitz
ea13d51677
del self.sock in VCRConnectionMixin.request
...
instead of in connection class constructors.
Fixes GH-48.
2013-11-26 12:12:39 -08:00
Kevin McCarthy
c2d857c585
Remove Secure File Overwrite Support
...
Closes #42
2013-11-10 12:25:59 -10:00
Kevin McCarthy
89403c255c
Record Multiple Matching Requests
...
This change allows us to record multiple matching requests to
the same URL, and then play them back sequentially.
Closes #40 , #41
2013-11-10 12:17:39 -10:00
Kevin McCarthy
6200493896
Remove Some stray \t characters
...
I guess that's what I get for playing around with my vimrc.
Thanks to @bryanhelmig for pointing these out.
2013-11-09 17:52:02 -10:00
Kevin McCarthy
b0a13ba690
Fix Requests so it can gunzip the request body
...
I wasn't emulating the stateful file-object in my response stub,
so urllib3 wasn't decompressing gzipped bodies properly. This
should fix that problem.
Thanks @bryanhelmig for the motivation to dig into this.
2013-11-09 17:51:29 -10:00
Kevin McCarthy
d33b19b5bb
Fix Requests 2, Version Bump to 0.3.5
...
This fixes a compatiblity issue with the new version of requests.
Bumps the release version to 0.3.5, and closes #39 .
2013-10-24 21:57:18 -10:00
smallcode
16fbe40d87
Update filesystem.py
...
fix WindowsError: [Error 32].
because must close the file before rename the file in window system.
2013-10-22 17:41:56 +08:00