]> git.ipfire.org Git - thirdparty/curl.git/commit
tests: address mutable class vars and naive datetime in Python code
authorDan Fandrich <dan@coneharvesters.com>
Sat, 25 Jul 2026 20:23:21 +0000 (13:23 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 28 Jul 2026 15:52:01 +0000 (08:52 -0700)
commite13362c20accd210de60035825f7195f9679570b
treec33d32eff8b5b7b21bef4c090ca2e9290a88f44d
parentb151a0bb901b8740c0025483c7fe375e65466dae
tests: address mutable class vars and naive datetime in Python code

Mark Python mutable class variables with ClassVar, to denote that the
danger this can cause has been considered.  Since any change made to
these in any object affects all other objects, this can cause locality
errors. However, as used in the test suite, they are are never modified
and so they are annotated as being intended.

Always set a timezone in datetime objects, as mixing naive and
timezone-aware object can cause errors.

These fix ruff rules DTZ005, RUF012.
13 files changed:
tests/http/test_17_ssl_use.py
tests/http/test_20_websockets.py
tests/http/testenv/caddy.py
tests/http/testenv/certs.py
tests/http/testenv/client.py
tests/http/testenv/curl.py
tests/http/testenv/dante.py
tests/http/testenv/dnsd.py
tests/http/testenv/h2o.py
tests/http/testenv/httpd.py
tests/http/testenv/nghttpx.py
tests/http/testenv/sshd.py
tests/http/testenv/vsftpd.py