File tree Expand file tree Collapse file tree 4 files changed +32
-20
lines changed
Expand file tree Collapse file tree 4 files changed +32
-20
lines changed Original file line number Diff line number Diff line change 11Pending removal in Python 3.17
22------------------------------
33
4- * :mod: `hashlib `:
5-
6- - Supporting the undocumented ``string `` keyword parameter in :func: `~hashlib.new `
7- and hash function constructors such as :func: `~hashlib.md5 ` is deprecated.
8- Use the ``data `` keyword parameter instead, or simply pass the data to hash
9- as a positional argument.
10-
11- Before Python 3.13, the ``string `` keyword parameter was not correctly
12- supported depending on the backend implementation of hash functions, and
13- users should prefer passing the data to hash as a positional argument.
14-
154* :mod: `typing `:
165
176 - Before Python 3.14, old-style unions were implemented using the private class
Original file line number Diff line number Diff line change @@ -6,3 +6,19 @@ Pending removal in Python 3.19
66 * Implicitly switching to the MSVC-compatible struct layout by setting
77 :attr: `~ctypes.Structure._pack_ ` but not :attr: `~ctypes.Structure._layout_ `
88 on non-Windows platforms.
9+
10+ * :mod: `hashlib `:
11+
12+ - In hash function constructors such as :func: `~hashlib.new ` or the
13+ direct hash-named constructors such as :func: `~hashlib.md5 ` and
14+ :func: `~hashlib.sha256 `, their optional initial data parameter could
15+ also be passed a keyword argument named ``data= `` or ``string= `` in
16+ various :mod: `!hashlib ` implementations.
17+
18+ Support for the ``string `` keyword argument name is now deprecated
19+ and slated for removal in Python 3.19.
20+
21+ Before Python 3.13, the ``string `` keyword parameter was not correctly
22+ supported depending on the backend implementation of hash functions.
23+ Prefer passing the initial data as a positional argument for maximum
24+ backwards compatibility.
Original file line number Diff line number Diff line change @@ -132,11 +132,16 @@ Deprecated
132132hashlib
133133-------
134134
135- * Supporting the undocumented ``string `` keyword parameter in
136- :func: `~hashlib.new ` and hash function constructors such as
137- :func: `~hashlib.md5 ` is deprecated and slated for removal in Python 3.17.
138- Use the ``data `` keyword parameter instead, or simply pass the data to hash
139- as a positional argument.
135+ * In hash function constructors such as :func: `~hashlib.new ` or the
136+ direct hash-named constructors such as :func: `~hashlib.md5 ` and
137+ :func: `~hashlib.sha256 `, their optional initial data parameter could
138+ also be passed a keyword argument named ``data= `` or ``string= `` in
139+ various :mod: `hashlib ` implementations.
140+
141+ Support for the ``string `` keyword argument name is now deprecated and
142+ is slated for removal in Python 3.19. Prefer passing the initial data as
143+ a positional argument for maximum backwards compatibility.
144+
140145 (Contributed by Bénédikt Tran in :gh: `134978 `.)
141146
142147
Original file line number Diff line number Diff line change 1- Supporting the undocumented ``string `` keyword parameter in :func: `hashlib.new `
2- and hash function constructors such as :func: `hashlib.md5 ` is deprecated and
3- slated for removal in Python 3.17. Use the ``data `` keyword parameter instead,
4- or simply pass the data to hash as a positional argument.
1+ :mod: `hashlib `: Supporting the ``string `` keyword parameter in hash function
2+ constructors such as :func: `~hashlib.new ` or the direct hash-named constructors
3+ such as :func: `~hashlib.md5 ` and :func: `~hashlib.sha256 ` is now deprecated and
4+ slated for removal in Python 3.19.
5+ Prefer passing the initial data as a positional argument for maximum backwards
6+ compatibility.
57Patch by Bénédikt Tran.
You can’t perform that action at this time.
0 commit comments