[Git][reproducible-builds/reproducible-website][master] Python sets are affected by PYTHONHASHSEED too

Roland Clobus (@rclobus-guest) gitlab at salsa.debian.org
Thu Mar 7 13:39:25 UTC 2024



Roland Clobus pushed to branch master at Reproducible Builds / reproducible-website


Commits:
e9cae80b by Roland Clobus at 2024-03-07T14:37:30+01:00
Python sets are affected by PYTHONHASHSEED too

Additionally some section separators were added for clarity.

- - - - -


1 changed file:

- _docs/stable_outputs.md


Changes:

=====================================
_docs/stable_outputs.md
=====================================
@@ -6,11 +6,15 @@ permalink: /docs/stable-outputs/
 
 Data structures such as [Perl
 hashes](http://perldoc.perl.org/functions/keys.html), [Python
-dictionaries](https://docs.python.org/2/library/stdtypes.html#mapping-types-dict),
+dictionaries](https://docs.python.org/3.8/library/stdtypes.html#mapping-types-dict)
+and [sets](https://docs.python.org/3.8/library/stdtypes.html#set-types-set-frozenset),
 or [Ruby Hash objects](https://ruby-doc.org/core/Hash.html) will list their keys
 in a different order on every run to limit [algorithmic complexity
 attacks](http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks).
 
+Perl
+----
+
 The following Perl code will output the list in a different order on every run:
 
 <div class="wrong">
@@ -35,10 +39,15 @@ For Perl, it is possible to set `PERL_HASH_SEED=0` in the environment. This
 will result in hash keys always being in the same order. See
 [perlrun(1)](http://perldoc.perl.org/perlrun.html) for more information.
 
+Python
+------
+
 Python users can similarly set the environment variable
-[PYTHONHASHSEED](https://docs.python.org/2/using/cmdline.html#envvar-PYTHONHASHSEED).
-When set to a given integer value, orders in dictionaries will be the same on
-every run.
+[PYTHONHASHSEED](https://docs.python.org/3.8/using/cmdline.html#envvar-PYTHONHASHSEED).
+When set to a given integer value, orders in dictionaries and sets will be the
+same on every run.
 
+General
+-------
 Beware that the [locale settings]({{ "/docs/locales/" | relative_url }})
 might affect the output of some sorting functions or the `sort` command.



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/e9cae80b3792ff97bf79d01c506a06ab7497eab3

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/e9cae80b3792ff97bf79d01c506a06ab7497eab3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20240307/00d55203/attachment.htm>


More information about the rb-commits mailing list