diff --git a/src/virtualenv/app_data/via_disk_folder.py b/src/virtualenv/app_data/via_disk_folder.py index 98cf2886b..1c98a90da 100644 --- a/src/virtualenv/app_data/via_disk_folder.py +++ b/src/virtualenv/app_data/via_disk_folder.py @@ -79,7 +79,7 @@ def extract(self, path, to_folder): @property def py_info_at(self): - return self.lock / "py_info" / "1" + return self.lock / "py_info" / "2" def py_info(self, path): return PyInfoStoreDisk(self.py_info_at, path) diff --git a/src/virtualenv/discovery/cached_py_info.py b/src/virtualenv/discovery/cached_py_info.py index d0b65676b..4f3ee5e90 100644 --- a/src/virtualenv/discovery/cached_py_info.py +++ b/src/virtualenv/discovery/cached_py_info.py @@ -24,7 +24,6 @@ _CACHE = OrderedDict() _CACHE[Path(sys.executable)] = PythonInfo() LOGGER = logging.getLogger(__name__) -_CACHE_FILE_VERSION = 1 def from_exe(cls, app_data, exe, env=None, raise_on_error=True, ignore_cache=False): # noqa: FBT002, PLR0913 @@ -65,13 +64,8 @@ def _get_via_file_cache(cls, app_data, path, exe, env): with py_info_store.locked(): if py_info_store.exists(): # if exists and matches load data = py_info_store.read() - of_path, of_st_mtime, of_content, version = ( - data["path"], - data["st_mtime"], - data["content"], - data.get("version"), - ) - if of_path == path_text and of_st_mtime == path_modified and version == _CACHE_FILE_VERSION: + of_path, of_st_mtime, of_content = data["path"], data["st_mtime"], data["content"] + if of_path == path_text and of_st_mtime == path_modified: py_info = cls._from_dict(of_content.copy()) sys_exe = py_info.system_executable if sys_exe is not None and not os.path.exists(sys_exe): @@ -86,7 +80,6 @@ def _get_via_file_cache(cls, app_data, path, exe, env): "st_mtime": path_modified, "path": path_text, "content": py_info._to_dict(), # noqa: SLF001 - "version": _CACHE_FILE_VERSION, } py_info_store.write(data) else: