54
54
)
55
55
from distributed .deploy import SpecCluster
56
56
from distributed .diagnostics .plugin import WorkerPlugin
57
- from distributed .metrics import context_meter , time
57
+ from distributed .metrics import _WindowsTime , context_meter , time
58
58
from distributed .nanny import Nanny
59
59
from distributed .node import ServerNode
60
60
from distributed .proctitle import enable_proctitle_on_children
@@ -1541,6 +1541,7 @@ def get_server_ssl_context(
1541
1541
ctx = ssl .create_default_context (ssl .Purpose .CLIENT_AUTH , cafile = get_cert (ca_file ))
1542
1542
ctx .check_hostname = False
1543
1543
ctx .verify_mode = ssl .CERT_REQUIRED
1544
+ ctx .verify_flags &= ~ ssl .VERIFY_X509_STRICT
1544
1545
ctx .load_cert_chain (get_cert (certfile ), get_cert (keyfile ))
1545
1546
return ctx
1546
1547
@@ -1551,6 +1552,7 @@ def get_client_ssl_context(
1551
1552
ctx = ssl .create_default_context (ssl .Purpose .SERVER_AUTH , cafile = get_cert (ca_file ))
1552
1553
ctx .check_hostname = False
1553
1554
ctx .verify_mode = ssl .CERT_REQUIRED
1555
+ ctx .verify_flags &= ~ ssl .VERIFY_X509_STRICT
1554
1556
ctx .load_cert_chain (get_cert (certfile ), get_cert (keyfile ))
1555
1557
return ctx
1556
1558
@@ -2605,14 +2607,14 @@ def no_time_resync():
2605
2607
"""Temporarily disable the automatic resync of distributed.metrics._WindowsTime
2606
2608
which, every 10 minutes, can cause time() to go backwards a few milliseconds.
2607
2609
2608
- On Linux and MacOSX, this fixture is a no-op.
2610
+ On Linux, MacOSX, and Windows with Python 3.13+ this fixture is a no-op.
2609
2611
2610
2612
See also
2611
2613
--------
2612
2614
NoSchedulerDelayWorker
2613
2615
padded_time
2614
2616
"""
2615
- if WINDOWS :
2617
+ if isinstance ( time , _WindowsTime ) :
2616
2618
time () # Initialize or refresh delta
2617
2619
bak = time .__self__ .next_resync
2618
2620
time .__self__ .next_resync = float ("inf" )
0 commit comments