Skip to content

Commit 076d0b9

Browse files
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269)
(cherry picked from commit e9c90aa) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent ef3ccd7 commit 076d0b9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Doc/reference/datamodel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,8 @@ Basic customization
14451445

14461446
.. note::
14471447

1448-
By default, the :meth:`__hash__` values of str, bytes and datetime
1449-
objects are "salted" with an unpredictable random value. Although they
1448+
By default, the :meth:`__hash__` values of str and bytes objects are
1449+
"salted" with an unpredictable random value. Although they
14501450
remain constant within an individual Python process, they are not
14511451
predictable between repeated invocations of Python.
14521452

Doc/using/cmdline.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Miscellaneous options
302302
randomization is enabled by default.
303303

304304
On previous versions of Python, this option turns on hash randomization,
305-
so that the :meth:`__hash__` values of str, bytes and datetime
305+
so that the :meth:`__hash__` values of str and bytes objects
306306
are "salted" with an unpredictable random value. Although they remain
307307
constant within an individual Python process, they are not predictable
308308
between repeated invocations of Python.
@@ -618,7 +618,7 @@ conflict.
618618
.. envvar:: PYTHONHASHSEED
619619

620620
If this variable is not set or set to ``random``, a random value is used
621-
to seed the hashes of str, bytes and datetime objects.
621+
to seed the hashes of str and bytes objects.
622622

623623
If :envvar:`PYTHONHASHSEED` is set to an integer value, it is used as a fixed
624624
seed for generating the hash() of the types covered by the hash

Misc/python.man

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ If this is set to a comma-separated string it is equivalent to
431431
specifying the \fB\-W\fP option for each separate value.
432432
.IP PYTHONHASHSEED
433433
If this variable is set to "random", a random value is used to seed the hashes
434-
of str, bytes and datetime objects.
434+
of str and bytes objects.
435435

436436
If PYTHONHASHSEED is set to an integer value, it is used as a fixed seed for
437437
generating the hash() of the types covered by the hash randomization. Its

Python/initconfig.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ static const char usage_5[] =
8383
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n";
8484
static const char usage_6[] =
8585
"PYTHONHASHSEED: if this variable is set to 'random', a random value is used\n"
86-
" to seed the hashes of str, bytes and datetime objects. It can also be\n"
87-
" set to an integer in the range [0,4294967295] to get hash values with a\n"
86+
" to seed the hashes of str and bytes objects. It can also be set to an\n"
87+
" integer in the range [0,4294967295] to get hash values with a\n"
8888
" predictable seed.\n"
8989
"PYTHONMALLOC: set the Python memory allocators and/or install debug hooks\n"
9090
" on Python memory allocators. Use PYTHONMALLOC=debug to install debug\n"

0 commit comments

Comments
 (0)