]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
requests 2.3 compat
authorKevin McCarthy <me@kevinmccarthy.org>
Sat, 17 May 2014 22:51:47 +0000 (12:51 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Sat, 17 May 2014 22:58:31 +0000 (12:58 -1000)
.travis.yml
tox.ini
vcr/stubs/__init__.py

index 1e0459a07355b2b825003936e874afeda366e667..cb4679ccdcd69574eb01a737d42764313f227301 100644 (file)
@@ -5,7 +5,8 @@ env:
     - secure: AifoKzwhjV94cmcQZrdQmqRu/9rkZZvWpwBv1daeAQpLOKFPGsOm3D+x2cSw9+iCfkgDZDfqQVv1kCaFVxTll8v8jTq5SJdqEY0NmGWbj/UkNtShh609oRDsuzLxAEwtVKYjf/h8K2BRea+bl1tGkwZ2vtmYS6dxNlAijjWOfds=
     - secure: LBSEg/gMj4u4Hrpo3zs6Y/1mTpd2RtcN49mZIFgTdbJ9IhpiNPqcEt647Lz94F9Eses2x2WbNuKqZKZZReY7QLbEzU1m0nN5jlaKrjcG5NR5clNABfFFyhgc0jBikyS4abAG8jc2efeaTrFuQwdoF4sE8YiVrkiVj2X5Xoi6sBk=
   matrix:
-    - WITH_LIB="requests2.x"
+    - WITH_LIB="requests2.2"
+    - WITH_LIB="requests2.3"
     - WITH_LIB="requests1.x"
     - WITH_LIB="httplib2"
     - WITH_LIB="boto"
@@ -15,15 +16,21 @@ matrix:
   exclude:
     - env: WITH_LIB="boto"
       python: 3.3
+    - env: WITH_LIB="boto"
+      python: 3.4
+    - env: WITH_LIB="requests1.x"
+      python: 3.4
 python:
 - 2.6
 - 2.7
 - 3.3
+- 3.4
 - pypy
 install:
 - pip install PyYAML pytest pytest-localserver --use-mirrors
 - if [ $WITH_LIB = "requests1.x" ] ; then pip install requests==1.2.3; fi
-- if [ $WITH_LIB = "requests2.x" ] ; then pip install requests; fi
+- if [ $WITH_LIB = "requests2.2" ] ; then pip install requests==2.2.1; fi
+- if [ $WITH_LIB = "requests2.3" ] ; then pip install requests==2.3.0; fi
 - if [ $WITH_LIB = "httplib2" ] ; then pip install httplib2; fi
 - if [ $WITH_LIB = "boto" ] ; then pip install boto; fi
 script: python setup.py test
diff --git a/tox.ini b/tox.ini
index e3a1e2ae720aa4bfd07af7dd24c8967866eae980..322802259a427816ba18a6909cfee95bb99c1cb3 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -10,15 +10,18 @@ envlist =
     py33,
     py34,
     pypy,
-    py26requests,
-    py27requests,
-    py34requests,
-    pypyrequests,
-    py26oldrequests,
-    py27oldrequests,
-    py33oldrequests,
-    py34oldrequests,
-    pypyoldrequests,
+    py26requests23,
+    py27requests23,
+    py34requests23,
+    pypyrequests23,
+    py26requests22,
+    py27requests22,
+    py34requests22,
+    pypyrequests22,
+    py26requests1,
+    py27requests1,
+    py33requests1,
+    pypyrequests1,
     py26httplib2,
     py27httplib2,
     py33httplib2,
@@ -34,7 +37,7 @@ deps =
     pytest-localserver
     PyYAML
 
-[testenv:py26oldrequests]
+[testenv:py26requests1]
 basepython = python2.6
 deps =
     mock
@@ -43,7 +46,7 @@ deps =
     PyYAML
     requests==1.2.3
 
-[testenv:py27oldrequests]
+[testenv:py27requests1]
 basepython = python2.7
 deps =
     mock
@@ -52,7 +55,7 @@ deps =
     PyYAML
     requests==1.2.3
 
-[testenv:py33oldrequests]
+[testenv:py33requests1]
 basepython = python3.3
 deps =
     mock
@@ -61,8 +64,8 @@ deps =
     PyYAML
     requests==1.2.3
 
-[testenv:py34oldrequests]
-basepython = python3.4
+[testenv:pypyrequests1]
+basepython = pypy
 deps =
     mock
     pytest
@@ -70,59 +73,95 @@ deps =
     PyYAML
     requests==1.2.3
 
-[testenv:pypyoldrequests]
+[testenv:py26requests23]
+basepython = python2.6
+deps =
+    mock
+    pytest
+    pytest-localserver
+    PyYAML
+    requests==2.3.0
+
+[testenv:py27requests23]
+basepython = python2.7
+deps =
+    mock
+    pytest
+    pytest-localserver
+    PyYAML
+    requests==2.3.0
+
+[testenv:py33requests23]
+basepython = python3.4
+deps =
+    mock
+    pytest
+    pytest-localserver
+    PyYAML
+    requests==2.3.0
+
+[testenv:py34requests23]
+basepython = python3.4
+deps =
+    mock
+    pytest
+    pytest-localserver
+    PyYAML
+    requests==2.3.0
+
+[testenv:pypyrequests23]
 basepython = pypy
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests==1.2.3
+    requests==2.3.0
 
-[testenv:py26requests]
+[testenv:py26requests22]
 basepython = python2.6
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests
+    requests==2.2.1
 
-[testenv:py27requests]
+[testenv:py27requests22]
 basepython = python2.7
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests
+    requests==2.2.1
 
-[testenv:py33requests]
+[testenv:py33requests22]
 basepython = python3.4
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests
+    requests==2.2.1
 
-[testenv:py34requests]
+[testenv:py34requests22]
 basepython = python3.4
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests
+    requests==2.2.1
 
-[testenv:pypyrequests]
+[testenv:pypyrequests22]
 basepython = pypy
 deps =
     mock
     pytest
     pytest-localserver
     PyYAML
-    requests
+    requests==2.2.1
 
 [testenv:py26httplib2]
 basepython = python2.6
index 3376b3c609f1e86615b6d3cc45bb510fc15b4630..33c0fef1a547d12b7f434194207ca41f6dc1c728 100644 (file)
@@ -285,6 +285,9 @@ class VCRConnection:
             self.real_connection.sock = value
 
     def __init__(self, *args, **kwargs):
+        if six.PY3:
+            kwargs.pop('strict', None) # apparently this is gone in py3
+
         # need to temporarily reset here because the real connection
         # inherits from the thing that we are mocking out.  Take out
         # the reset if you want to see what I mean :)