Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
9 changes: 7 additions & 2 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) {
printf("Python %s\n",
(print_version >= 2) ? Py_GetVersion() : PY_VERSION);
const char *version;
version = (print_version >= 2) ? Py_GetVersion() : PY_VERSION;
#ifdef Py_GIL_DISABLED
printf("Python %s free-threading\n", version);
#else
printf("Python %s\n", version);
#endif
return _PyStatus_EXIT(0);
}

Expand Down