mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-32101: Add PYTHONDEVMODE environment variable (#4624)
* bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
This commit is contained in:
parent
706e10b186
commit
5e3806f8cf
10 changed files with 78 additions and 16 deletions
|
|
@ -124,7 +124,8 @@ static const char usage_6[] =
|
|||
" hooks.\n"
|
||||
"PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale\n"
|
||||
" coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of\n"
|
||||
" locale coercion and locale compatibility warnings on stderr.\n";
|
||||
" locale coercion and locale compatibility warnings on stderr.\n"
|
||||
"PYTHONDEVMODE: enable the development mode.\n";
|
||||
|
||||
static void
|
||||
pymain_usage(int error, const wchar_t* program)
|
||||
|
|
@ -1520,7 +1521,9 @@ pymain_parse_envvars(_PyMain *pymain)
|
|||
if (pymain_init_tracemalloc(pymain) < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (pymain_get_xoption(pymain, L"dev")) {
|
||||
if (pymain_get_xoption(pymain, L"dev" ) ||
|
||||
pymain_get_env_var("PYTHONDEVMODE"))
|
||||
{
|
||||
core_config->dev_mode = 1;
|
||||
core_config->faulthandler = 1;
|
||||
core_config->allocator = "debug";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue