annotate tests/artifacts/PURPOSE @ 45034:b1a1702262c9 stable

py3: fix crash when server address is 0.0.0.0 (issue6362) `socket.getfqdn()` assumes that the name is passed as `str` on Python 3 and always returns `str` in this case. Mercurial passed `bytes` (but still expected a `str` result), which worked by chance in many cases, except for e.g. b'0.0.0.0', which was returned unchanged, breaking later code. Instead of calling `socket.getfqdn()`, we can also use `self.server_name` from the base `HTTPServer` class, which already stores the FQDN of the locally-bound socket name (see `BaseHTTPServer.py` in the Python 2 stdlib and `http/server.py` in the Python 3 stdlib).
author Manuel Jacob <me@manueljacob.de>
date Fri, 03 Jul 2020 23:25:19 +0200
parents 966950954fda
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39490
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
1 This directory is meant to cache artifacts useful for tests (such as bundle).
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
2
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
3 Those artifacts need to be cached because they are slow to regenerate on each
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
4 test but too large to be tracked within the repository. They are not expected
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
5 to change between each run and can be cached.
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
6
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
7 The `./scripts/` contains code to generate the artifact while the `cache`
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
8 directory contains resulting artifact.
966950954fda tests: add a `tests/artifacts/` directory
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
9