blob: 8ae86ec2c37bf13cde31978b37d8586feb877dbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from __future__ import annotations
import logging
from tempfile import mkdtemp
from virtualenv.util.path import safe_delete
from .via_disk_folder import AppDataDiskFolder
class TempAppData(AppDataDiskFolder):
transient = True
can_update = False
def __init__(self):
super().__init__(folder=mkdtemp())
logging.debug("created temporary app data folder %s", self.lock.path)
def reset(self):
"""this is a temporary folder, is already empty to start with"""
def close(self):
logging.debug("remove temporary app data folder %s", self.lock.path)
safe_delete(self.lock.path)
def embed_update_log(self, distribution, for_py_version): # noqa: U100
raise NotImplementedError
__all__ = [
"TempAppData",
]
|