[New-bugs-announce] [issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

Erwan Le Pape report at bugs.python.org
Fri Sep 14 13:42:00 EDT 2018


New submission from Erwan Le Pape <lepaperwan3 at gmail.com>:

I'm attempting to leverage PEP 552 to make the core interpreter build process more deterministic. However, the standard Python Makefile uses `python -E` when calling the compileall (and all other setup scripts), which forces randomization since it can only be turned off through environment variables (which in turn leads to nondeterministic behaviour as noted in PEP 552 [1],[2]).

Also, is adding a flag that disables randomization something that would be acceptable? Or are options to the core interpreter to be kept to a minimum and this does not represent a large enough use-case?

This would basically hold in Modules/main.c in something as short as:
+ case 'r':
+     config->use_hash_seed = 1;
+     config->hash_seed = 0;
+     break;

----------
components: Interpreter Core
messages: 325371
nosy: lepaperwan
priority: normal
severity: normal
status: open
title: Add `-r`, as opposed to `-R` to Python core interpreter
type: enhancement
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34686>
_______________________________________


More information about the New-bugs-announce mailing list