Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick-fix the CI for recent tox and recent urllib3 #690

Merged
merged 3 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/integration/test_boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def test_boto_vendored_stubs(tmpdir):
"https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions",
)
def test_boto_medium_difficulty(tmpdir, get_user):

with vcr.use_cassette(str(tmpdir.join("boto3-medium.yml"))):
response = get_user()
assert response["User"]["UserName"] == IAM_USER_NAME
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def cassette(tmpdir, httpbin, httpbin_secure):
],
)
def test_matchers(httpbin, httpbin_secure, cassette, matcher, matching_uri, not_matching_uri):

matching_uri = _replace_httpbin(matching_uri, httpbin, httpbin_secure)
not_matching_uri = _replace_httpbin(not_matching_uri, httpbin, httpbin_secure)
default_uri = _replace_httpbin(DEFAULT_URI, httpbin, httpbin_secure)
Expand Down Expand Up @@ -76,7 +75,6 @@ def test_method_matcher(cassette, httpbin, httpbin_secure):
"uri", [DEFAULT_URI, "http://httpbin.org/get?p2=q2&p1=q1", "http://httpbin.org/get?p2=q2&p1=q1"]
)
def test_default_matcher_matches(cassette, uri, httpbin, httpbin_secure):

uri = _replace_httpbin(uri, httpbin, httpbin_secure)

with vcr.use_cassette(cassette) as cass:
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def test_uri(method, uri):


def test_HeadersDict():

# Simple test of CaseInsensitiveDict
h = HeadersDict()
assert h == {}
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_vcr_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


def test_vcr_import_deprecation(recwarn):

if "vcr" in sys.modules:
# Remove imported module entry if already loaded in another test
del sys.modules["vcr"]
Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ commands =
isort --version
isort . --check --diff
flake8 --version
flake8 --exclude=./docs/conf.py,./.tox/
flake8 --exclude=./docs/conf.py,./.tox/,./venv/
pyflakes ./docs/conf.py
deps =
flake8
Expand Down Expand Up @@ -75,6 +75,8 @@ basepython = python3.7
usedevelop=true
commands =
./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append {posargs}
allowlist_externals =
./runtests.sh
deps =
Werkzeug==2.0.3
pytest
Expand All @@ -83,8 +85,9 @@ deps =
PyYAML
ipaddress
requests: requests>=2.22.0
requests: urllib3<2
httplib2: httplib2
urllib3: urllib3
urllib3: urllib3<2
boto3: boto3
boto3: urllib3
aiohttp: aiohttp
Expand Down
1 change: 0 additions & 1 deletion vcr/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def _requests(self):

@_build_patchers_from_mock_triples_decorator
def _boto3(self):

try:
# botocore using awsrequest
import botocore.awsrequest as cpool
Expand Down
2 changes: 1 addition & 1 deletion vcr/stubs/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_header(message, name):


def get_header_items(message):
for (key, values) in get_headers(message):
for key, values in get_headers(message):
for value in values:
yield key, value

Expand Down
1 change: 0 additions & 1 deletion vcr/stubs/httplib2_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection, HTTPSConnectionWithTimeo
_baseclass = HTTPSConnectionWithTimeout

def __init__(self, *args, **kwargs):

# Delete the keyword arguments that HTTPSConnection would not recognize
safe_keys = {
"host",
Expand Down