jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/735671 )
Change subject: [cleanup] Remove disable_ssl_certificate_validation kwargs in http functions ......................................................................
[cleanup] Remove disable_ssl_certificate_validation kwargs in http functions
Bug: T265206 Change-Id: I7507e70f0b07606fa67a07bb9642a0810c2642a2 --- M pywikibot/comms/http.py M tests/http_tests.py 2 files changed, 1 insertion(+), 15 deletions(-)
Approvals: Matěj Suchánek: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 23c1bce..b248ff7 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -51,7 +51,6 @@ from pywikibot.tools import ( deprecated, file_mode_checker, - issue_deprecation_warning, )
@@ -243,13 +242,6 @@ :return: The received data Response """ kwargs.setdefault('verify', site.verify_SSL_certificate()) - old_validation = kwargs.pop('disable_ssl_certificate_validation', None) - if old_validation is not None: - issue_deprecation_warning('disable_ssl_certificate_validation', - instead='verify', - since='20201220') - kwargs.update(verify=not old_validation) - if not headers: headers = {} format_string = None @@ -399,12 +391,6 @@ auth = requests_oauthlib.OAuth1(*auth)
timeout = config.socket_timeout - old_validation = kwargs.pop('disable_ssl_certificate_validation', None) - if old_validation is not None: - issue_deprecation_warning('disable_ssl_certificate_validation', - instead='verify', - since='20201220') - kwargs.update(verify=not old_validation)
try: # Note that the connections are pooled which mean that a future diff --git a/tests/http_tests.py b/tests/http_tests.py index b346ceb..246e225 100644 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -89,7 +89,7 @@ hostname = 'testssl-expire-r2i2.disig.sk'
def test_https_cert_error(self): - """Test if http.fetch respects disable_ssl_certificate_validation.""" + """Test if http.fetch respects disabled ssl certificate validation.""" with self.assertRaisesRegex( FatalServerError, self.CERT_VERIFY_FAILED_RE):
pywikibot-commits@lists.wikimedia.org