Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
gh-119132: Display free-threading information through -VV
  • Loading branch information
corona10 committed May 18, 2024
commit 1c1ab557b129ad31af22e4495d6092881ab86002
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
Comment thread
corona10 marked this conversation as resolved.
return _PyStatus_EXIT(0);
}

Expand Down