tests: dump the http server log after a clone in `test-static-http.t`
The 404 message lines don't match `$LOGDATE$`, because that tests for a pattern
from the first "-" through a "(GET|PUT|POST)", so glob the timestamp away
manually.
tests: force `dumbhttp.py` to write its log file with '\n' on Windows
This wasn't causing obvious test failures, but it's the same fix as
dbd2d56224d1
for `dummysmtpd.py`, and there's no sense in leaving this problem lying around.
(And upon further review, it might have been causing some non-obviously related
failures- see the next commit.)
rust: address 'error: unnecessarily eager cloning of iterator items'
Build failed with a reference to
https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned
which seems reasonable. There doesn't seem to be any reason to not follow the advice.
utils: fix resourceutil use of deprecated importlib.resources
Some importlib functionality was deprecated in 3.11 . The documentation on
https://docs.python.org/3.12/library/importlib.resources.html recommends using
the new .files() API that was introduced in 3.9.
utils: avoid using internal _imp.is_frozen()
imp has been deprecated for a long time, and were removed in Python 3.12 . As a
workaround, we started using the internal _imp. That is ugly and risky.
It seems less risky to get the functionality in some other way. Here, we just
inspect if 'origin' of the '__main__' module is set and 'frozen'. That seems to
work and do the same, and might be better than using the internal _imp
directly.
This way of inspecting module attributes seems to work in some test cases, but
it is a risky change. This level of importlib doesn't have much documentation,
a complicated implementation, and we are dealing with some odd use cases.