jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/831510 )
Change subject: [cleanup] Remove cryptography warning filter from utils.execute ......................................................................
[cleanup] Remove cryptography warning filter from utils.execute
cryptography was dropped with Python 2.7.9 and is no longer required for Pywikibot framework. Therefore the warning filter can be removed.
Change-Id: I827ddffd049b5ee30b04395de36dd2d6278b605a --- M tests/utils.py 1 file changed, 2 insertions(+), 11 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index 9d1d86b..536adcb 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -15,6 +15,7 @@
import pywikibot from pywikibot import config +from pywikibot.backports import List from pywikibot.data.api import CachedRequest from pywikibot.data.api import Request as _original_Request from pywikibot.exceptions import APIError @@ -25,13 +26,6 @@ from tests import _pwb_py
-try: - from cryptography import __version__ as cryptography_version - cryptography_version = list(map(int, cryptography_version.split('.'))) -except ImportError: - cryptography_version = None - - OSWIN32 = (sys.platform == 'win32')
@@ -434,17 +428,14 @@ """Ignore password changes."""
-def execute(command, data_in=None, timeout=None, error=None): +def execute(command: List[str], data_in=None, timeout=None, error=None): """ Execute a command and capture outputs.
:param command: executable to run and arguments to use - :type command: list of str """ if PYTHON_VERSION < (3, 6): command.insert(1, '-W ignore::FutureWarning:pywikibot:103') - if cryptography_version and cryptography_version < [1, 3, 4]: - command.insert(1, '-W ignore:Old version of cryptography:Warning')
env = os.environ.copy()
pywikibot-commits@lists.wikimedia.org