Remove mitmproxy from pinned environments

This commit is contained in:
Adrián Chaves 2020-10-30 21:34:15 +01:00
parent 3e5bc77737
commit 7327145bf3
3 changed files with 14 additions and 9 deletions

View File

@ -1,8 +1,6 @@
# Tests requirements
attrs
dataclasses; python_version == '3.6'
mitmproxy; python_version >= '3.7'
mitmproxy >= 4.0.4, < 5; python_version >= '3.6' and python_version < '3.7'
pyftpdlib
# https://github.com/pytest-dev/pytest-twisted/issues/93
pytest != 5.4, != 5.4.1

View File

@ -5,8 +5,6 @@ import re
import sys
from subprocess import Popen, PIPE
from urllib.parse import urlsplit, urlunsplit
from unittest import skipIf
from testfixtures import LogCapture
from twisted.internet import defer
from twisted.trial.unittest import TestCase
@ -57,13 +55,14 @@ def _wrong_credentials(proxy_url):
return urlunsplit(bad_auth_proxy)
@skipIf("pypy" in sys.executable,
"mitmproxy does not support PyPy")
@skipIf(platform.system() == 'Windows' and sys.version_info < (3, 7),
"mitmproxy does not support Windows when running Python < 3.7")
class ProxyConnectTestCase(TestCase):
def setUp(self):
try:
import mitmproxy
except ImportError:
self.skipTest('mitmproxy is not installed')
self.mockserver = MockServer()
self.mockserver.__enter__()
self._oldenv = os.environ.copy()

10
tox.ini
View File

@ -11,6 +11,10 @@ minversion = 1.7.0
deps =
-ctests/constraints.txt
-rtests/requirements-py3.txt
# mitmproxy does not support PyPy
# mitmproxy does not support Windows when running Python < 3.7
mitmproxy; python_version >= '3.7' and implementation_name != 'pypy'
mitmproxy >= 4.0.4, < 5; python_version >= '3.6' and python_version < '3.7' and platform_system != 'Windows' and implementation_name != 'pypy'
# Extras
boto3>=1.13.0
botocore>=1.4.87
@ -26,7 +30,7 @@ download = true
commands =
py.test --cov=scrapy --cov-report= {posargs:--durations=10 docs scrapy tests}
install_command =
pip install --use-feature=2020-resolver {opts} {packages}
pip install --use-feature=2020-resolver {opts} {packages}
[testenv:typing]
basepython = python3
@ -78,6 +82,10 @@ deps =
w3lib==1.17.0
zope.interface==4.1.3
-rtests/requirements-py3.txt
# mitmproxy 4.0.4+ requires upgrading some of the pinned dependencies
# above, hence we do not install it in pinned environments at the moment
# Extras
botocore==1.4.87
google-cloud-storage==1.29.0