comparison env/lib/python3.9/site-packages/virtualenv/app_data/na.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 from __future__ import absolute_import, unicode_literals
2
3 from contextlib import contextmanager
4
5 from .base import AppData, ContentStore
6
7
8 class AppDataDisabled(AppData):
9 """No application cache available (most likely as we don't have write permissions)"""
10
11 transient = True
12 can_update = False
13
14 def __init__(self):
15 pass
16
17 error = RuntimeError("no app data folder available, probably no write access to the folder")
18
19 def close(self):
20 """do nothing"""
21
22 def reset(self):
23 """do nothing"""
24
25 def py_info(self, path):
26 return ContentStoreNA()
27
28 def embed_update_log(self, distribution, for_py_version):
29 return ContentStoreNA()
30
31 def extract(self, path, to_folder):
32 raise self.error
33
34 @contextmanager
35 def locked(self, path):
36 """do nothing"""
37 yield
38
39 @property
40 def house(self):
41 raise self.error
42
43 def wheel_image(self, for_py_version, name):
44 raise self.error
45
46 def py_info_clear(self):
47 """"""
48
49
50 class ContentStoreNA(ContentStore):
51 def exists(self):
52 return False
53
54 def read(self):
55 """"""
56 return None
57
58 def write(self, content):
59 """"""
60
61 def remove(self):
62 """"""
63
64 @contextmanager
65 def locked(self):
66 yield