From 593fdc64a692286ea3be4a27daef1d3f8955a419 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 15 Jan 2026 13:43:07 -0500 Subject: [PATCH] Change hash example to use SHA-256 With the previous md5 example, building and testing this package with FIPS fails on doctest: ``` 809 >>> hash = hashlib.md5() UNEXPECTED EXCEPTION: UnsupportedDigestmodError('[digital envelope routines] unsupported') ``` So I updated example to use hashlib.sha256 instead of hashlib.md5. (ref our internal ticket DSP-63) --- path/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path/__init__.py b/path/__init__.py index 33dd979..4552eaf 100644 --- a/path/__init__.py +++ b/path/__init__.py @@ -806,7 +806,7 @@ def chunks(self, size, *args, **kwargs): :example: - >>> hash = hashlib.md5() + >>> hash = hashlib.sha256() >>> for chunk in Path("NEWS.rst").chunks(8192, mode='rb'): ... hash.update(chunk)