Bug 1826326 [wpt PR 39360] - Get rid of ResourceWarnings produced by the tests, a...
commitf9a8c66e41b9dec2a93e29d3a2bc0ee188caa475
authorSam Sneddon <gsnedders@apple.com>
Wed, 17 May 2023 12:54:42 +0000 (17 12:54 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sun, 21 May 2023 22:42:55 +0000 (21 22:42 +0000)
tree5a7d418f67873528036ee08db2ff9eb83915b44e
parent23cb3956ff569ca6869ec4e02abf49fee88d992e
Bug 1826326 [wpt PR 39360] - Get rid of ResourceWarnings produced by the tests, a=testonly

Automatic update from web-platform-tests
Close files opened within wptserve tests

--
Make wptserve.request.InputFile closeable

It creates temporary file objects which need closed, thus it needs to
be closeable, as does wptserve.request.Request which uses it.

--
Make wptserve.response.Response.iter_contents close self.content

This moves to always iterating over the file, as there doesn't seem to
be any handlers which require the full content at this point.

--
Explicitly destroy excinfo which hold on to sockets

It seems like explicitly destroying these avoids a ResourceWarning;
I'm not sure why, given it's just changing how the reference dies.

--

wpt-commits: 187cabef589e6080655b37cd7d5077eb13669231f22fbbb4b8b8ead1b742da219d3114dc5c9010fbe72e622c4f31bb412ba23f1d80ccb2bc0aa450790ffeb402039dbb8275e9e16ba6e367866437f960
wpt-pr: 39360
testing/web-platform/tests/tools/wptserve/tests/functional/test_handlers.py
testing/web-platform/tests/tools/wptserve/tests/functional/test_input_file.py
testing/web-platform/tests/tools/wptserve/tests/functional/test_pipes.py
testing/web-platform/tests/tools/wptserve/wptserve/request.py
testing/web-platform/tests/tools/wptserve/wptserve/response.py
testing/web-platform/tests/tools/wptserve/wptserve/server.py