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/57d7284c1a245cf9fbcecb594f50471d86e879f7/requests/__init__.py#L81

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:

--
To view, visit https://gerrit.wikimedia.org/r/474637
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8dd4c4f85e51907bbcfcb38d6d0569aaf55326e8
Gerrit-Change-Number: 474637
Gerrit-PatchSet: 2
Gerrit-Owner: Dalba <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to