Skip to content
Open
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
Prev Previous commit
Next Next commit
this?
  • Loading branch information
maurycy committed Oct 24, 2025
commit 666225a40b33332825d3ab5d421414446ee7abc8
5 changes: 3 additions & 2 deletions pyperformance/tests/test_pythoninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
from pyperformance import _pythoninfo, tests

IS_VENV = sys.prefix != sys.base_prefix
_BASE_EXECUTABLE = getattr(sys, "_base_executable", None)
CURRENT = {
"executable (sys)": sys.executable,
"executable (sys;realpath)": os.path.realpath(sys.executable),
"base_executable": sys.executable,
"base_executable (sys)": getattr(sys, "_base_executable", None),
"base_executable": _BASE_EXECUTABLE or sys.executable,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_executable = getattr(sys, "_base_executable", None)
if is_venv:
# XXX There is probably a bug related to venv, since
# sys._base_executable should be different.
if base_executable == sys.executable:
# Indicate that we don't know.
base_executable = None
elif not base_executable:
base_executable = sys.executable

"base_executable (sys)": _BASE_EXECUTABLE,
"version_str (sys)": sys.version,
"version_info (sys)": sys.version_info,
"hexversion (sys)": sys.hexversion,
Expand Down
Loading