https://github.com/python/cpython/commit/06a3a85f15d482b5a6880925417bc66f481efedc
commit: 06a3a85f15d482b5a6880925417bc66f481efedc
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: gpshead <[email protected]>
date: 2025-05-22T21:37:52Z
summary:

[3.14] Avoid `__file__` in `hashlib` example (GH-134540) (#134549)

Avoid `__file__` in `hashlib` example (GH-134540)
(cherry picked from commit 9b292ff0223dab0f999d5c1e13355552fd7cd528)

Co-authored-by: Josh Cannon <[email protected]>

files:
M Doc/library/hashlib.rst

diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index bb2d2fad23bdb8..4818a4944a512a 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -284,7 +284,7 @@ a file or file-like object.
    Example:
 
       >>> import io, hashlib, hmac
-      >>> with open(hashlib.__file__, "rb") as f:
+      >>> with open("library/hashlib.rst", "rb") as f:
       ...     digest = hashlib.file_digest(f, "sha256")
       ...
       >>> digest.hexdigest()  # doctest: +ELLIPSIS

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to