mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Merge 3.2: Issue #13703 plus some related test suite fixes.
This commit is contained in:
commit
2fb477c0f0
38 changed files with 706 additions and 174 deletions
|
@ -47,7 +47,7 @@ static wchar_t **orig_argv;
|
|||
static int orig_argc;
|
||||
|
||||
/* command line options */
|
||||
#define BASE_OPTS L"bBc:dEhiJm:OqsStuvVW:xX:?"
|
||||
#define BASE_OPTS L"bBc:dEhiJm:OqRsStuvVW:xX:?"
|
||||
|
||||
#define PROGRAM_OPTS BASE_OPTS
|
||||
|
||||
|
@ -73,6 +73,9 @@ static char *usage_2 = "\
|
|||
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
|
||||
-OO : remove doc-strings in addition to the -O optimizations\n\
|
||||
-q : don't print version and copyright messages on interactive startup\n\
|
||||
-R : use a pseudo-random salt to make hash() values of various types be\n\
|
||||
unpredictable between separate invocations of the interpreter, as\n\
|
||||
a defence against denial-of-service attacks\n\
|
||||
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
|
||||
-S : don't imply 'import site' on initialization\n\
|
||||
";
|
||||
|
@ -101,8 +104,14 @@ static char *usage_5 =
|
|||
" The default module search path uses %s.\n"
|
||||
"PYTHONCASEOK : ignore case in 'import' statements (Windows).\n"
|
||||
"PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"
|
||||
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n"
|
||||
;
|
||||
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n\
|
||||
";
|
||||
static char *usage_6 = "\
|
||||
PYTHONHASHSEED: if this variable is set to ``random``, the effect is the same \n\
|
||||
as specifying the :option:`-R` option: a random value is used to seed the\n\
|
||||
hashes of str, bytes and datetime objects. It can also be set to an integer\n\
|
||||
in the range [0,4294967295] to get hash values with a predictable seed.\n\
|
||||
";
|
||||
|
||||
static int
|
||||
usage(int exitcode, wchar_t* program)
|
||||
|
@ -118,6 +127,7 @@ usage(int exitcode, wchar_t* program)
|
|||
fputs(usage_3, f);
|
||||
fprintf(f, usage_4, DELIM);
|
||||
fprintf(f, usage_5, DELIM, PYTHONHOMEHELP);
|
||||
fputs(usage_6, f);
|
||||
}
|
||||
#if defined(__VMS)
|
||||
if (exitcode == 0) {
|
||||
|
@ -431,6 +441,10 @@ Py_Main(int argc, wchar_t **argv)
|
|||
Py_QuietFlag++;
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
Py_HashRandomizationFlag++;
|
||||
break;
|
||||
|
||||
/* This space reserved for other options */
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue