Skip to content

Commit

Permalink
pythongh-119132: Display free-threading information through -VV
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed May 18, 2024
1 parent 74072a3 commit 1c1ab55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python -VV now display whether it is the free-threaded or not. Patch By
Donghee Na.
5 changes: 5 additions & 0 deletions Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -2596,8 +2596,13 @@ config_parse_cmdline(PyConfig *config, PyWideStringList *warnoptions,
} while (1);

if (print_version) {
#ifdef Py_GIL_DISABLED
printf("Python %s (free-threading)\n",
(print_version >= 2) ? Py_GetVersion() : PY_VERSION);
#else
printf("Python %s\n",
(print_version >= 2) ? Py_GetVersion() : PY_VERSION);
#endif
return _PyStatus_EXIT(0);
}

Expand Down

0 comments on commit 1c1ab55

Please sign in to comment.