jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404449 )
Change subject: [bugfix] Ignore unclosed socket warnings for py3 ......................................................................
[bugfix] Ignore unclosed socket warnings for py3
Bug: T184996 Change-Id: I3b979329780af4c75191607d2db900cfe154a763 --- M tests/utils.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index ea9d420..dde0993 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -256,11 +256,12 @@ else: skip_frames -= 1
- # Ignore socket IO warnings (T183696) + # Ignore socket IO warnings (T183696, T184996) if (PYTHON_VERSION >= (3, 2) and issubclass(warn_msg.category, ResourceWarning) and 'unclosed <socket.socket' in str(warn_msg.message) - and warn_msg.filename.endswith('socket.py')): + and warn_msg.filename.rpartition('/')[2] in ( + 'cookiejar.py', 'inspect.py', 'socket.py')): return
log.append(warn_msg)