From aa95718ce62e55546069e4dbf7eeb887856a0714 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 2 Oct 2025 11:54:26 +0100 Subject: [PATCH 1/3] Fix `hashlib.file_digest()` versionchanged description of `BlockingIOError` The sentence was missing a negation and contradicted the other two descriptions in the same commit. I believe code behaviour is correct. --- Doc/library/hashlib.rst | 2 +- .../2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index 8bba6700930bf4..b21ecdaede622a 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -310,7 +310,7 @@ a file or file-like object. .. versionadded:: 3.11 .. versionchanged:: 3.14 - Now raises a :exc:`BlockingIOError` if the file is opened in blocking + Now raises a :exc:`BlockingIOError` if the file is opened in non-blocking mode. Previously, spurious null bytes were added to the digest. diff --git a/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst b/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst new file mode 100644 index 00000000000000..d5db1aa243a1e0 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst @@ -0,0 +1,2 @@ +Fix :func:`hashlib.file_digest()` versionchanged description of +:exc:`BlockingIOError` From ca84a7a2dd3161c56b73f34f384948f90ee03d3e Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 2 Oct 2025 12:01:28 +0100 Subject: [PATCH 2/3] fixup! Fix `hashlib.file_digest()` versionchanged description of `BlockingIOError` --- .../2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst b/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst index d5db1aa243a1e0..5c21f69ab89025 100644 --- a/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst +++ b/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst @@ -1,2 +1,2 @@ -Fix :func:`hashlib.file_digest()` versionchanged description of +Fix :func:`hashlib.file_digest` versionchanged description of :exc:`BlockingIOError` From badc2e5848753fb04b7cdbdd0b2400b11e9a6ba5 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 2 Oct 2025 12:15:02 +0100 Subject: [PATCH 3/3] Remove unncessary NEWS.d entry --- .../2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst diff --git a/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst b/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst deleted file mode 100644 index 5c21f69ab89025..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2025-10-02-11-51-34.gh-issue-139495.y4Orqf.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix :func:`hashlib.file_digest` versionchanged description of -:exc:`BlockingIOError`