Xqt has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405559 )

Change subject: utils.WarningSourceSkipContextManager: Ignore unclosed socket 
ResourceWarnings
......................................................................


utils.WarningSourceSkipContextManager: Ignore unclosed socket ResourceWarnings

Ignore unclosed socket ResourceWarnings from any file during
DeprecationTestCase run.
Python ResourceWarning happens when garbage collection is triggered which may
happen at any point during runtime. Therefore the source of the warning
is rather arbitrary.

See https://bugs.python.org/issue29564 for more info.

Bug: T185401
Change-Id: Ie15e5aebf4ebec2fd27831399762e5812916f939
---
M tests/utils.py
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/tests/utils.py b/tests/utils.py
index eaf68c4..e3c6526 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -260,9 +260,7 @@
             if (PYTHON_VERSION >= (3, 2)
                     and issubclass(warn_msg.category, ResourceWarning)
                     and any(str(warn_msg.message).startswith(msg) for msg in (
-                        'unclosed <ssl.SSLSocket', 'unclosed <socket.socket'))
-                    and warn_msg.filename.rpartition('/')[2] in (
-                        'cookiejar.py', 'inspect.py', 'socket.py')):
+                    'unclosed <ssl.SSLSocket', 'unclosed <socket.socket'))):
                 return
 
             log.append(warn_msg)

-- 
To view, visit https://gerrit.wikimedia.org/r/405559
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie15e5aebf4ebec2fd27831399762e5812916f939
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to