@@ -159,20 +159,12 @@ def cleanup_python_environments(self):
159159 cache2 = os .path .join (sys_path .cache_path (), "__pycache__" , "data" , "Lib" , "python" )
160160
161161 supported_versions = sys_path .python_versions ()
162- if "3.3" not in supported_versions :
163- # Python folder is re-created at each startup, hence just clear it for now.
164- clear_directory (libdir + "33" )
165- # Python 3.3 itself doesn't support nor create compiled cache modules,
166- # ST's fallback mechanism might however have created some py38 or py313 cache files
167- # in those directories, which need to be cleared out.
168- delete_directory (cache1 + "33" )
169- delete_directory (cache2 + "33" )
170-
171- if "3.8" not in supported_versions :
172- # if 3.8 is not supported it is not present, delete all folders
173- delete_directory (libdir + "38" )
174- delete_directory (cache1 + "38" )
175- delete_directory (cache2 + "38" )
162+ for pyver in ("3.3" , "3.8" , "3.13" , "3.14" ):
163+ if pyver not in supported_versions :
164+ pyver = pyver .replace ("." , "" )
165+ clear_directory (libdir + pyver )
166+ delete_directory (cache1 + pyver )
167+ delete_directory (cache2 + pyver )
176168
177169 def cleanup_pending_packages (self ):
178170 """
0 commit comments