@@ -93,6 +93,13 @@ def create(self) -> bool:
9393 Returns True if the environment is new, and False if it was reused.
9494 """
9595
96+ @property
97+ @abc .abstractmethod
98+ def venv_backend (self ) -> str :
99+ """
100+ Returns the string used to select this environment.
101+ """
102+
96103
97104def locate_via_py (version : str ) -> str | None :
98105 """Find the Python executable using the Windows Launcher.
@@ -180,6 +187,10 @@ def create(self) -> bool:
180187 False since it's always reused."""
181188 return False
182189
190+ @property
191+ def venv_backend (self ) -> str :
192+ return "none"
193+
183194
184195class CondaEnv (ProcessEnv ):
185196 """Conda environment management class.
@@ -303,6 +314,10 @@ def is_offline() -> bool:
303314 except BaseException : # pragma: no cover
304315 return True
305316
317+ @property
318+ def venv_backend (self ) -> str :
319+ return self .conda_cmd
320+
306321
307322class VirtualEnv (ProcessEnv ):
308323 """Virtualenv management class.
@@ -341,7 +356,7 @@ def __init__(
341356 self .interpreter = interpreter
342357 self ._resolved : None | str | InterpreterNotFound = None
343358 self .reuse_existing = reuse_existing
344- self .venv_backend = venv_backend
359+ self ._venv_backend = venv_backend
345360 self .venv_params = venv_params or []
346361 if venv_backend not in {"virtualenv" , "venv" , "uv" }:
347362 msg = f"venv_backend { venv_backend } not recognized"
@@ -544,6 +559,10 @@ def create(self) -> bool:
544559
545560 return True
546561
562+ @property
563+ def venv_backend (self ) -> str :
564+ return self ._venv_backend
565+
547566
548567ALL_VENVS : dict [str , Callable [..., ProcessEnv ]] = {
549568 "conda" : functools .partial (CondaEnv , conda_cmd = "conda" ),
0 commit comments