jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/474637 )
Change subject: Ignore RequestsDependencyWarning for cryptography during tests ......................................................................
Ignore RequestsDependencyWarning for cryptography during tests
The minimum recommended cryptography_version is hardcoded in requests/__init__.py.[1]
[1]: https://github.com/requests/requests/blob/57d7284c1a245cf9fbcecb594f50471d86...
Bug: T209153 Change-Id: I8dd4c4f85e51907bbcfcb38d6d0569aaf55326e8 --- M tests/utils.py 1 file changed, 8 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index 4036155..c0ce35b 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -23,6 +23,12 @@ from collections import Mapping from types import ModuleType
+try: + from cryptography import __version__ as cryptography_version + cryptography_version = list(map(int, cryptography_version.split('.'))) +except ImportError: + cryptography_version = None + import pywikibot from pywikibot.comms import threadedhttp from pywikibot import config @@ -641,6 +647,8 @@ command.insert(1, '-W ignore:{0}:DeprecationWarning'.format( 'Pywikibot will soon drop support for Python 2.7.2 and 2.7.3, ' 'please update your Python.')) + if cryptography_version and cryptography_version < [1, 3, 4]: + command.insert(1, '-W ignore:Old version of cryptography:Warning') # Any environment variables added on Windows must be of type # str() on Python 2. if OSWIN32 and PY2:
pywikibot-commits@lists.wikimedia.org