wool 0.1rc7__py3-none-any.whl → 0.1rc8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wool might be problematic. Click here for more details.
- wool/_mempool/__init__.py +2 -1
- wool/_mempool/_mempool.py +214 -107
- wool/_mempool/{_metadata/__init__.py → _metadata.py} +1 -3
- wool/_mempool/_service.py +225 -0
- wool/_protobuf/__init__.py +4 -0
- wool/_protobuf/mempool/mempool_pb2.py +66 -0
- wool/_protobuf/mempool/mempool_pb2.pyi +108 -0
- wool/_protobuf/mempool/mempool_pb2_grpc.py +312 -0
- wool/_protobuf/{_mempool/_metadata/_metadata_pb2.py → mempool/metadata/metadata_pb2.py} +8 -8
- wool/_protobuf/mempool/metadata/metadata_pb2_grpc.py +24 -0
- {wool-0.1rc7.dist-info → wool-0.1rc8.dist-info}/METADATA +7 -2
- wool-0.1rc8.dist-info/RECORD +28 -0
- wool/_protobuf/.gitkeep +0 -0
- wool-0.1rc7.dist-info/RECORD +0 -23
- /wool/_protobuf/{_mempool/_metadata/_metadata_pb2.pyi → mempool/metadata/metadata_pb2.pyi} +0 -0
- {wool-0.1rc7.dist-info → wool-0.1rc8.dist-info}/WHEEL +0 -0
- {wool-0.1rc7.dist-info → wool-0.1rc8.dist-info}/entry_points.txt +0 -0
wool/_mempool/__init__.py
CHANGED
wool/_mempool/_mempool.py
CHANGED
|
@@ -1,34 +1,141 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import asyncio
|
|
2
4
|
import hashlib
|
|
3
5
|
import mmap
|
|
4
6
|
import os
|
|
5
7
|
import pathlib
|
|
6
8
|
import shutil
|
|
7
|
-
from collections import namedtuple
|
|
8
9
|
from contextlib import asynccontextmanager
|
|
9
|
-
from
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
from typing import BinaryIO
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from typing import Self
|
|
14
|
+
except ImportError:
|
|
15
|
+
from typing_extensions import Self
|
|
12
16
|
|
|
13
17
|
import shortuuid
|
|
14
18
|
|
|
15
19
|
from wool._mempool._metadata import MetadataMessage
|
|
16
20
|
|
|
17
|
-
Metadata = namedtuple(
|
|
18
|
-
"Metadata",
|
|
19
|
-
[field.name for field in fields(MetadataMessage)],
|
|
20
|
-
)
|
|
21
21
|
|
|
22
|
+
class SharedObject:
|
|
23
|
+
_id: str
|
|
24
|
+
_mempool: MemoryPool
|
|
25
|
+
_file: BinaryIO
|
|
26
|
+
_mmap: mmap.mmap
|
|
27
|
+
_size: int
|
|
28
|
+
_md5: bytes
|
|
29
|
+
|
|
30
|
+
def __init__(self, id: str, *, mempool: MemoryPool):
|
|
31
|
+
self._id = id
|
|
32
|
+
self._mempool = mempool
|
|
33
|
+
self._file = open(self._path / "dump", "r+b")
|
|
34
|
+
self._mmap = mmap.mmap(self._file.fileno(), 0)
|
|
35
|
+
self._size = self.metadata.size
|
|
36
|
+
self._md5 = self.metadata.md5
|
|
37
|
+
|
|
38
|
+
def __del__(self):
|
|
39
|
+
try:
|
|
40
|
+
self.close()
|
|
41
|
+
except Exception:
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def id(self) -> str:
|
|
46
|
+
return self._id
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def metadata(self) -> SharedObjectMetadata:
|
|
50
|
+
return SharedObjectMetadata(self.id, mempool=self._mempool)
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def mmap(self) -> mmap.mmap:
|
|
54
|
+
return self._mmap
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def _path(self) -> pathlib.Path:
|
|
58
|
+
return pathlib.Path(self._mempool.path, self.id)
|
|
59
|
+
|
|
60
|
+
def close(self):
|
|
61
|
+
self.metadata.close()
|
|
62
|
+
self._mmap.close()
|
|
63
|
+
self._file.close()
|
|
64
|
+
|
|
65
|
+
def refresh(self) -> Self:
|
|
66
|
+
if self._size != self.metadata.size or self._md5 != self.metadata.md5:
|
|
67
|
+
self._mmap.close()
|
|
68
|
+
self._file.close()
|
|
69
|
+
self._file = open(self._path / "dump", "r+b")
|
|
70
|
+
self._mmap = mmap.mmap(self._file.fileno(), 0)
|
|
71
|
+
self._size = self.metadata.size
|
|
72
|
+
self._md5 = self.metadata.md5
|
|
73
|
+
return self
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class SharedObjectMetadata:
|
|
77
|
+
_id: str
|
|
78
|
+
_mempool: MemoryPool
|
|
79
|
+
_file: BinaryIO
|
|
80
|
+
_mmap: mmap.mmap
|
|
81
|
+
_instances: dict[str, SharedObjectMetadata] = {}
|
|
82
|
+
|
|
83
|
+
def __new__(cls, id: str, *, mempool: MemoryPool):
|
|
84
|
+
if id in cls._instances:
|
|
85
|
+
return cls._instances[id]
|
|
86
|
+
return super().__new__(cls)
|
|
87
|
+
|
|
88
|
+
def __init__(self, id: str, mempool: MemoryPool):
|
|
89
|
+
self._id = id
|
|
90
|
+
self._mempool = mempool
|
|
91
|
+
self._file = open(self._path / "meta", "r+b")
|
|
92
|
+
self._mmap = mmap.mmap(self._file.fileno(), 0)
|
|
93
|
+
self._instances[id] = self
|
|
94
|
+
|
|
95
|
+
def __del__(self):
|
|
96
|
+
try:
|
|
97
|
+
self.close()
|
|
98
|
+
except Exception:
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def id(self) -> str:
|
|
103
|
+
return self._id
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def mutable(self) -> bool:
|
|
107
|
+
return self._metadata.mutable
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def size(self) -> int:
|
|
111
|
+
return self._metadata.size
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def md5(self) -> bytes:
|
|
115
|
+
return self._metadata.md5
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def mmap(self) -> mmap.mmap:
|
|
119
|
+
return self._mmap
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def _path(self) -> pathlib.Path:
|
|
123
|
+
return pathlib.Path(self._mempool.path, self.id)
|
|
22
124
|
|
|
23
|
-
|
|
24
|
-
def
|
|
25
|
-
self.
|
|
125
|
+
@property
|
|
126
|
+
def _metadata(self) -> MetadataMessage:
|
|
127
|
+
return MetadataMessage.loads(bytes(self._mmap))
|
|
26
128
|
|
|
27
|
-
def
|
|
28
|
-
|
|
129
|
+
def close(self):
|
|
130
|
+
self._mmap.close()
|
|
131
|
+
self._file.close()
|
|
132
|
+
del self._instances[self.id]
|
|
29
133
|
|
|
30
134
|
|
|
31
135
|
class MemoryPool:
|
|
136
|
+
_objects: dict[str, SharedObject]
|
|
137
|
+
_path: pathlib.Path
|
|
138
|
+
|
|
32
139
|
def __init__(self, path: str | pathlib.Path = pathlib.Path(".mempool")):
|
|
33
140
|
if isinstance(path, str):
|
|
34
141
|
self._path = pathlib.Path(path)
|
|
@@ -36,89 +143,86 @@ class MemoryPool:
|
|
|
36
143
|
self._path = path
|
|
37
144
|
self._lockdir = self._path / "locks"
|
|
38
145
|
os.makedirs(self._lockdir, exist_ok=True)
|
|
39
|
-
self.
|
|
40
|
-
self.
|
|
41
|
-
self._metadata: dict[str, MetadataMessage] = {}
|
|
146
|
+
self._acquire(f"pid-{os.getpid()}")
|
|
147
|
+
self._objects = dict()
|
|
42
148
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
149
|
+
def __contains__(self, ref: str) -> bool:
|
|
150
|
+
return ref in self._objects
|
|
151
|
+
|
|
152
|
+
def __del__(self):
|
|
153
|
+
self._release(f"pid-{os.getpid()}")
|
|
46
154
|
|
|
47
155
|
@property
|
|
48
156
|
def path(self) -> pathlib.Path:
|
|
49
157
|
return self._path
|
|
50
158
|
|
|
51
|
-
async def map(self):
|
|
52
|
-
|
|
53
|
-
if
|
|
54
|
-
|
|
55
|
-
|
|
159
|
+
async def map(self, ref: str | None = None):
|
|
160
|
+
if ref is not None and ref not in self._objects:
|
|
161
|
+
if self._locked(f"delete-{ref}"):
|
|
162
|
+
raise RuntimeError(
|
|
163
|
+
f"Reference {ref} is currently locked for deletion"
|
|
164
|
+
)
|
|
165
|
+
async with self._reference_lock(ref):
|
|
166
|
+
self._map(ref)
|
|
167
|
+
else:
|
|
168
|
+
for entry in os.scandir(self._path):
|
|
169
|
+
if entry.is_dir() and (ref := entry.name) != "locks":
|
|
170
|
+
if not self._locked(f"delete-{ref}"):
|
|
171
|
+
async with self._reference_lock(ref):
|
|
172
|
+
self._map(ref)
|
|
56
173
|
|
|
57
174
|
async def put(
|
|
58
175
|
self, dump: bytes, *, mutable: bool = False, ref: str | None = None
|
|
59
176
|
) -> str:
|
|
60
|
-
|
|
177
|
+
ref = ref or str(shortuuid.uuid())
|
|
178
|
+
async with self._reference_lock(ref):
|
|
61
179
|
self._put(ref, dump, mutable=mutable, exist_ok=False)
|
|
62
180
|
return ref
|
|
63
181
|
|
|
64
|
-
async def post(self, ref: str, dump: bytes):
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
metamap, dumpmap = self._mmaps[ref]
|
|
69
|
-
metamap.seek(0)
|
|
70
|
-
metadata = self._metadata.setdefault(
|
|
71
|
-
ref, MetadataMessage.loads(metamap.read())
|
|
182
|
+
async def post(self, ref: str, dump: bytes) -> bool:
|
|
183
|
+
if self._locked(f"delete-{ref}"):
|
|
184
|
+
raise RuntimeError(
|
|
185
|
+
f"Reference {ref} is currently locked for deletion"
|
|
72
186
|
)
|
|
73
|
-
|
|
187
|
+
async with self._reference_lock(ref):
|
|
188
|
+
if ref not in self._objects:
|
|
189
|
+
self._map(ref)
|
|
190
|
+
obj = self._objects[ref]
|
|
191
|
+
if not obj.metadata.mutable:
|
|
74
192
|
raise ValueError("Cannot modify an immutable reference")
|
|
75
|
-
if (size := len(dump)) != metadata.size:
|
|
193
|
+
if (size := len(dump)) != obj.metadata.size:
|
|
76
194
|
try:
|
|
77
|
-
|
|
78
|
-
self._post(ref,
|
|
195
|
+
obj.mmap.resize(size)
|
|
196
|
+
self._post(ref, obj, dump)
|
|
79
197
|
except SystemError:
|
|
80
198
|
self._put(ref, dump, mutable=True, exist_ok=True)
|
|
81
199
|
return True
|
|
82
|
-
elif hashlib.md5(dump).digest() != metadata.md5:
|
|
83
|
-
self._post(ref,
|
|
200
|
+
elif hashlib.md5(dump).digest() != obj.metadata.md5:
|
|
201
|
+
self._post(ref, obj, dump)
|
|
84
202
|
return True
|
|
85
203
|
else:
|
|
86
204
|
return False
|
|
87
205
|
|
|
88
206
|
async def get(self, ref: str) -> bytes:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
cached_metadata = self._metadata.setdefault(ref, metadata)
|
|
96
|
-
if metadata.mutable and metadata.size != cached_metadata.size:
|
|
97
|
-
# Dump size has changed, so we need to re-map it
|
|
207
|
+
if self._locked(f"delete-{ref}"):
|
|
208
|
+
raise RuntimeError(
|
|
209
|
+
f"Reference {ref} is currently locked for deletion"
|
|
210
|
+
)
|
|
211
|
+
async with self._reference_lock(ref):
|
|
212
|
+
if ref not in self._objects:
|
|
98
213
|
self._map(ref)
|
|
99
|
-
|
|
100
|
-
return dumpmap.read()
|
|
214
|
+
return bytes(self._objects[ref].refresh().mmap)
|
|
101
215
|
|
|
102
216
|
async def delete(self, ref: str):
|
|
103
|
-
async with self.
|
|
104
|
-
|
|
105
|
-
self.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if dumpmap:
|
|
113
|
-
dumpmap.close()
|
|
114
|
-
if metafile:
|
|
115
|
-
metafile.close()
|
|
116
|
-
if dumpfile:
|
|
117
|
-
dumpfile.close()
|
|
118
|
-
try:
|
|
119
|
-
shutil.rmtree(self.path / ref)
|
|
120
|
-
except FileNotFoundError:
|
|
121
|
-
pass
|
|
217
|
+
async with self._delete_lock(ref):
|
|
218
|
+
async with self._reference_lock(ref):
|
|
219
|
+
if ref not in self._objects:
|
|
220
|
+
self._map(ref)
|
|
221
|
+
self._objects.pop(ref).close()
|
|
222
|
+
try:
|
|
223
|
+
shutil.rmtree(self.path / ref)
|
|
224
|
+
except FileNotFoundError:
|
|
225
|
+
pass
|
|
122
226
|
|
|
123
227
|
def _put(
|
|
124
228
|
self,
|
|
@@ -145,60 +249,63 @@ class MemoryPool:
|
|
|
145
249
|
dumpfile.write(dump)
|
|
146
250
|
|
|
147
251
|
self._map(ref)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
metadata
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
252
|
+
|
|
253
|
+
def _post(self, ref: str, obj: SharedObject, dump: bytes):
|
|
254
|
+
if not obj.metadata.mutable:
|
|
255
|
+
raise ValueError("Cannot modify an immutable reference")
|
|
256
|
+
metadata = MetadataMessage(
|
|
257
|
+
ref=ref,
|
|
258
|
+
mutable=True,
|
|
259
|
+
size=len(dump),
|
|
260
|
+
md5=hashlib.md5(dump).digest(),
|
|
261
|
+
)
|
|
262
|
+
obj.metadata.mmap[:] = metadata.dumps()
|
|
263
|
+
obj.metadata.mmap.flush()
|
|
264
|
+
obj.mmap.seek(0)
|
|
265
|
+
obj.mmap.write(dump)
|
|
160
266
|
|
|
161
267
|
def _map(self, ref: str):
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
cached_dumpfile.close()
|
|
172
|
-
cached_metamap, cached_dumpmap = self._mmaps.pop(ref, (None, None))
|
|
173
|
-
if cached_metamap is not None and not cached_metamap.closed:
|
|
174
|
-
cached_metamap.close()
|
|
175
|
-
if cached_dumpmap is not None and not cached_dumpmap.closed:
|
|
176
|
-
cached_dumpmap.close()
|
|
177
|
-
self._files[ref] = (metafile, dumpfile)
|
|
178
|
-
self._mmaps[ref] = (metamap, dumpmap)
|
|
179
|
-
|
|
180
|
-
def _lockpath(self, ref: str):
|
|
181
|
-
return pathlib.Path(self._lockdir, f"{ref}.lock")
|
|
182
|
-
|
|
183
|
-
def _acquire(self, ref: str):
|
|
268
|
+
obj = self._objects.pop(ref, None)
|
|
269
|
+
if obj:
|
|
270
|
+
obj.close()
|
|
271
|
+
self._objects[ref] = SharedObject(id=ref, mempool=self)
|
|
272
|
+
|
|
273
|
+
def _lockpath(self, key: str) -> pathlib.Path:
|
|
274
|
+
return pathlib.Path(self._lockdir, f"{key}.lock")
|
|
275
|
+
|
|
276
|
+
def _acquire(self, key: str) -> bool:
|
|
184
277
|
try:
|
|
185
|
-
os.symlink(f"{
|
|
278
|
+
os.symlink(f"{key}", self._lockpath(key))
|
|
186
279
|
return True
|
|
187
280
|
except FileExistsError:
|
|
188
281
|
return False
|
|
189
282
|
|
|
190
|
-
def _release(self,
|
|
283
|
+
def _release(self, key: str):
|
|
191
284
|
try:
|
|
192
|
-
if os.path.islink(lock_path := self._lockpath(
|
|
285
|
+
if os.path.islink(lock_path := self._lockpath(key)):
|
|
193
286
|
os.unlink(lock_path)
|
|
194
287
|
except FileNotFoundError:
|
|
195
288
|
pass
|
|
196
289
|
|
|
290
|
+
def _locked(self, key: str) -> bool:
|
|
291
|
+
return os.path.islink(self._lockpath(key))
|
|
292
|
+
|
|
197
293
|
@asynccontextmanager
|
|
198
|
-
async def
|
|
294
|
+
async def _reference_lock(self, ref: str):
|
|
199
295
|
try:
|
|
200
296
|
while not self._acquire(ref):
|
|
201
297
|
await asyncio.sleep(0)
|
|
202
298
|
yield
|
|
203
299
|
finally:
|
|
204
300
|
self._release(ref)
|
|
301
|
+
|
|
302
|
+
@asynccontextmanager
|
|
303
|
+
async def _delete_lock(self, ref: str):
|
|
304
|
+
key = f"delete-{ref}"
|
|
305
|
+
if not self._acquire(f"delete-{ref}"):
|
|
306
|
+
raise RuntimeError(
|
|
307
|
+
f"Reference {ref} is currently locked for deletion"
|
|
308
|
+
)
|
|
309
|
+
else:
|
|
310
|
+
yield
|
|
311
|
+
self._release(key)
|
|
@@ -4,9 +4,7 @@ import logging
|
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
|
|
6
6
|
try:
|
|
7
|
-
from wool._protobuf.
|
|
8
|
-
_MetadataMessage,
|
|
9
|
-
)
|
|
7
|
+
from wool._protobuf.mempool.metadata.metadata_pb2 import _MetadataMessage
|
|
10
8
|
except ImportError:
|
|
11
9
|
logging.error(
|
|
12
10
|
"Failed to import _MetadataMessage. "
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import AsyncGenerator
|
|
5
|
+
from typing import Final
|
|
6
|
+
from weakref import WeakSet
|
|
7
|
+
from weakref import WeakValueDictionary
|
|
8
|
+
|
|
9
|
+
import shortuuid
|
|
10
|
+
from grpc.aio import ServicerContext
|
|
11
|
+
|
|
12
|
+
from wool._mempool import MemoryPool
|
|
13
|
+
from wool._protobuf.mempool import mempool_pb2 as proto
|
|
14
|
+
from wool._protobuf.mempool import mempool_pb2_grpc as rpc
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Session:
|
|
18
|
+
"""
|
|
19
|
+
A session represents a client connection to the memory pool service and
|
|
20
|
+
serves as the scope for any shared references acquired over its duration.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
id: Final[str]
|
|
24
|
+
queue: Final[asyncio.Queue[proto.SessionResponse]]
|
|
25
|
+
references: Final[set[Reference]]
|
|
26
|
+
sessions: Final[WeakValueDictionary[str, Session]] = WeakValueDictionary()
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def get(cls, id: str) -> Session | None:
|
|
30
|
+
return cls.sessions.get(id)
|
|
31
|
+
|
|
32
|
+
def __init__(self):
|
|
33
|
+
self.id = shortuuid.uuid()
|
|
34
|
+
self.queue = asyncio.Queue()
|
|
35
|
+
self.references = set()
|
|
36
|
+
self.sessions[self.id] = self
|
|
37
|
+
|
|
38
|
+
def __eq__(self, other) -> bool:
|
|
39
|
+
if isinstance(other, Session):
|
|
40
|
+
return self.id == other.id
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
def __hash__(self) -> int:
|
|
44
|
+
return hash(self.id)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Reference:
|
|
48
|
+
id: Final[str]
|
|
49
|
+
mempool: Final[MemoryPool]
|
|
50
|
+
sessions: Final[WeakSet[Session]]
|
|
51
|
+
|
|
52
|
+
_references: Final[WeakValueDictionary[str, Reference]] = (
|
|
53
|
+
WeakValueDictionary()
|
|
54
|
+
)
|
|
55
|
+
_to_delete: Final[set[str]] = set()
|
|
56
|
+
_initialized: bool = False
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def get(cls, id: str) -> Reference | None:
|
|
60
|
+
return cls._references.get(id)
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def new(cls, id: str, *, mempool: MemoryPool) -> Reference:
|
|
64
|
+
if id in cls._references:
|
|
65
|
+
raise ValueError(f"Reference {id} already exists")
|
|
66
|
+
return cls(id, mempool=mempool)
|
|
67
|
+
|
|
68
|
+
def __new__(cls, id: str, *, mempool: MemoryPool):
|
|
69
|
+
if id in cls._references:
|
|
70
|
+
if id in cls._to_delete:
|
|
71
|
+
cls._to_delete.remove(id)
|
|
72
|
+
return cls._references[id]
|
|
73
|
+
return super().__new__(cls)
|
|
74
|
+
|
|
75
|
+
def __init__(self, id: str, *, mempool: MemoryPool):
|
|
76
|
+
if not self._initialized:
|
|
77
|
+
self.id = id
|
|
78
|
+
self.mempool = mempool
|
|
79
|
+
self.sessions = WeakSet()
|
|
80
|
+
self._references[id] = self
|
|
81
|
+
self._initialized = True
|
|
82
|
+
|
|
83
|
+
def __eq__(self, other) -> bool:
|
|
84
|
+
if isinstance(other, Reference):
|
|
85
|
+
return self.id == other.id
|
|
86
|
+
return False
|
|
87
|
+
|
|
88
|
+
def __hash__(self) -> int:
|
|
89
|
+
return hash(self.id)
|
|
90
|
+
|
|
91
|
+
def __del__(self):
|
|
92
|
+
self._to_delete.add(self.id)
|
|
93
|
+
|
|
94
|
+
id = self.id
|
|
95
|
+
to_delete = self._to_delete
|
|
96
|
+
mempool = self.mempool
|
|
97
|
+
|
|
98
|
+
async def _delete():
|
|
99
|
+
if id in to_delete:
|
|
100
|
+
try:
|
|
101
|
+
to_delete.remove(id)
|
|
102
|
+
await mempool.delete(id)
|
|
103
|
+
except FileNotFoundError:
|
|
104
|
+
pass
|
|
105
|
+
|
|
106
|
+
try:
|
|
107
|
+
asyncio.get_running_loop().create_task(_delete())
|
|
108
|
+
except RuntimeError:
|
|
109
|
+
asyncio.new_event_loop().run_until_complete(_delete())
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class MemoryPoolService(rpc.MemoryPoolServicer):
|
|
113
|
+
def __init__(self, mempool: MemoryPool | None = None):
|
|
114
|
+
self._mempool = mempool or MemoryPool()
|
|
115
|
+
self._shutdown = asyncio.Event()
|
|
116
|
+
|
|
117
|
+
async def session(
|
|
118
|
+
self, request: proto.SessionRequest, context: ServicerContext
|
|
119
|
+
) -> AsyncGenerator[proto.SessionResponse]:
|
|
120
|
+
session = Session()
|
|
121
|
+
yield proto.SessionResponse(session=proto.Session(id=session.id))
|
|
122
|
+
while True:
|
|
123
|
+
yield await session.queue.get()
|
|
124
|
+
|
|
125
|
+
async def acquire(
|
|
126
|
+
self, request: proto.AcquireRequest, context: ServicerContext
|
|
127
|
+
) -> proto.AcquireResponse:
|
|
128
|
+
if not (session := Session.get(request.session.id)):
|
|
129
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
130
|
+
if not (reference := Reference.get(request.reference.id)):
|
|
131
|
+
raise ValueError(f"Reference {request.reference.id} not found")
|
|
132
|
+
session.references.add(reference)
|
|
133
|
+
reference.sessions.add(session)
|
|
134
|
+
return proto.AcquireResponse()
|
|
135
|
+
|
|
136
|
+
async def map(
|
|
137
|
+
self, request: proto.AcquireRequest, context: ServicerContext
|
|
138
|
+
) -> proto.AcquireResponse:
|
|
139
|
+
if not (session := Session.get(request.session.id)):
|
|
140
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
141
|
+
await self._mempool.map(request.reference.id)
|
|
142
|
+
reference = Reference(request.reference.id, mempool=self._mempool)
|
|
143
|
+
await self.acquire(
|
|
144
|
+
proto.AcquireRequest(
|
|
145
|
+
session=proto.Session(id=session.id),
|
|
146
|
+
reference=proto.Reference(id=reference.id),
|
|
147
|
+
),
|
|
148
|
+
context,
|
|
149
|
+
)
|
|
150
|
+
return proto.AcquireResponse()
|
|
151
|
+
|
|
152
|
+
async def put(
|
|
153
|
+
self, request: proto.PutRequest, context: ServicerContext
|
|
154
|
+
) -> proto.PutResponse:
|
|
155
|
+
if not (session := Session.get(request.session.id)):
|
|
156
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
157
|
+
reference = Reference(
|
|
158
|
+
id=await self._mempool.put(request.dump, mutable=request.mutable),
|
|
159
|
+
mempool=self._mempool,
|
|
160
|
+
)
|
|
161
|
+
await self.acquire(
|
|
162
|
+
proto.AcquireRequest(
|
|
163
|
+
session=proto.Session(id=session.id),
|
|
164
|
+
reference=proto.Reference(id=reference.id),
|
|
165
|
+
),
|
|
166
|
+
context,
|
|
167
|
+
)
|
|
168
|
+
return proto.PutResponse(reference=proto.Reference(id=reference.id))
|
|
169
|
+
|
|
170
|
+
async def get(
|
|
171
|
+
self, request: proto.GetRequest, context: ServicerContext
|
|
172
|
+
) -> proto.GetResponse:
|
|
173
|
+
if not (session := Session.get(request.session.id)):
|
|
174
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
175
|
+
if not (reference := Reference.get(request.reference.id)):
|
|
176
|
+
raise ValueError(f"Reference {request.reference.id} not found")
|
|
177
|
+
if reference not in session.references:
|
|
178
|
+
await self.acquire(
|
|
179
|
+
proto.AcquireRequest(
|
|
180
|
+
session=proto.Session(id=session.id),
|
|
181
|
+
reference=proto.Reference(id=reference.id),
|
|
182
|
+
),
|
|
183
|
+
context,
|
|
184
|
+
)
|
|
185
|
+
dump = await self._mempool.get(reference.id)
|
|
186
|
+
return proto.GetResponse(dump=dump)
|
|
187
|
+
|
|
188
|
+
async def post(
|
|
189
|
+
self, request: proto.PostRequest, context: ServicerContext
|
|
190
|
+
) -> proto.PostResponse:
|
|
191
|
+
if not (session := Session.get(request.session.id)):
|
|
192
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
193
|
+
if not (reference := Reference.get(request.reference.id)):
|
|
194
|
+
raise ValueError(f"Reference {request.reference.id} not found")
|
|
195
|
+
if reference not in session.references:
|
|
196
|
+
await self.acquire(
|
|
197
|
+
proto.AcquireRequest(
|
|
198
|
+
session=proto.Session(id=session.id),
|
|
199
|
+
reference=proto.Reference(id=reference.id),
|
|
200
|
+
),
|
|
201
|
+
context,
|
|
202
|
+
)
|
|
203
|
+
updated = await self._mempool.post(request.reference.id, request.dump)
|
|
204
|
+
if updated:
|
|
205
|
+
for session in Reference(
|
|
206
|
+
id=request.reference.id, mempool=self._mempool
|
|
207
|
+
).sessions:
|
|
208
|
+
if session.id is not request.session.id:
|
|
209
|
+
event = proto.Event(
|
|
210
|
+
reference=request.reference,
|
|
211
|
+
event_type="post",
|
|
212
|
+
)
|
|
213
|
+
await session.queue.put(proto.SessionResponse(event=event))
|
|
214
|
+
return proto.PostResponse(updated=updated)
|
|
215
|
+
|
|
216
|
+
async def release(
|
|
217
|
+
self, request: proto.ReleaseRequest, context: ServicerContext
|
|
218
|
+
) -> proto.ReleaseResponse:
|
|
219
|
+
if not (session := Session.get(request.session.id)):
|
|
220
|
+
raise ValueError(f"Session {request.session.id} not found")
|
|
221
|
+
if not (reference := Reference.get(request.reference.id)):
|
|
222
|
+
raise ValueError(f"Reference {request.reference.id} not found")
|
|
223
|
+
session.references.remove(reference)
|
|
224
|
+
reference.sessions.remove(session)
|
|
225
|
+
return proto.ReleaseResponse()
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: mempool/mempool.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.0
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
0,
|
|
17
|
+
'',
|
|
18
|
+
'mempool/mempool.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15mempool/mempool.proto\x12\x16wool._protobuf.mempool\"\x10\n\x0eSessionRequest\"\x81\x01\n\x0fSessionResponse\x12\x32\n\x07session\x18\x01 \x01(\x0b\x32\x1f.wool._protobuf.mempool.SessionH\x00\x12.\n\x05\x65vent\x18\x02 \x01(\x0b\x32\x1d.wool._protobuf.mempool.EventH\x00\x42\n\n\x08response\"x\n\x0e\x41\x63quireRequest\x12\x34\n\treference\x18\x01 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1f.wool._protobuf.mempool.Session\"\x11\n\x0f\x41\x63quireResponse\"]\n\nPutRequest\x12\x30\n\x07session\x18\x01 \x01(\x0b\x32\x1f.wool._protobuf.mempool.Session\x12\x0f\n\x07mutable\x18\x02 \x01(\x08\x12\x0c\n\x04\x64ump\x18\x03 \x01(\x0c\"C\n\x0bPutResponse\x12\x34\n\treference\x18\x01 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\"\x83\x01\n\x0bPostRequest\x12\x30\n\x07session\x18\x01 \x01(\x0b\x32\x1f.wool._protobuf.mempool.Session\x12\x34\n\treference\x18\x02 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\x12\x0c\n\x04\x64ump\x18\x03 \x01(\x0c\"\x1f\n\x0cPostResponse\x12\x0f\n\x07updated\x18\x01 \x01(\x08\"t\n\nGetRequest\x12\x34\n\treference\x18\x01 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1f.wool._protobuf.mempool.Session\"\x1b\n\x0bGetResponse\x12\x0c\n\x04\x64ump\x18\x01 \x01(\x0c\"x\n\x0eReleaseRequest\x12\x34\n\treference\x18\x01 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1f.wool._protobuf.mempool.Session\"\x11\n\x0fReleaseResponse\"\x17\n\tReference\x12\n\n\x02id\x18\x01 \x01(\t\"\x15\n\x07Session\x12\n\n\x02id\x18\x01 \x01(\t\"Q\n\x05\x45vent\x12\x34\n\treference\x18\x01 \x01(\x0b\x32!.wool._protobuf.mempool.Reference\x12\x12\n\nevent_type\x18\x02 \x01(\t2\x95\x04\n\nMemoryPool\x12\\\n\x07session\x12&.wool._protobuf.mempool.SessionRequest\x1a\'.wool._protobuf.mempool.SessionResponse0\x01\x12Z\n\x07\x61\x63quire\x12&.wool._protobuf.mempool.AcquireRequest\x1a\'.wool._protobuf.mempool.AcquireResponse\x12N\n\x03put\x12\".wool._protobuf.mempool.PutRequest\x1a#.wool._protobuf.mempool.PutResponse\x12Q\n\x04post\x12#.wool._protobuf.mempool.PostRequest\x1a$.wool._protobuf.mempool.PostResponse\x12N\n\x03get\x12\".wool._protobuf.mempool.GetRequest\x1a#.wool._protobuf.mempool.GetResponse\x12Z\n\x07release\x12&.wool._protobuf.mempool.ReleaseRequest\x1a\'.wool._protobuf.mempool.ReleaseResponseb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mempool.mempool_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_SESSIONREQUEST']._serialized_start=49
|
|
35
|
+
_globals['_SESSIONREQUEST']._serialized_end=65
|
|
36
|
+
_globals['_SESSIONRESPONSE']._serialized_start=68
|
|
37
|
+
_globals['_SESSIONRESPONSE']._serialized_end=197
|
|
38
|
+
_globals['_ACQUIREREQUEST']._serialized_start=199
|
|
39
|
+
_globals['_ACQUIREREQUEST']._serialized_end=319
|
|
40
|
+
_globals['_ACQUIRERESPONSE']._serialized_start=321
|
|
41
|
+
_globals['_ACQUIRERESPONSE']._serialized_end=338
|
|
42
|
+
_globals['_PUTREQUEST']._serialized_start=340
|
|
43
|
+
_globals['_PUTREQUEST']._serialized_end=433
|
|
44
|
+
_globals['_PUTRESPONSE']._serialized_start=435
|
|
45
|
+
_globals['_PUTRESPONSE']._serialized_end=502
|
|
46
|
+
_globals['_POSTREQUEST']._serialized_start=505
|
|
47
|
+
_globals['_POSTREQUEST']._serialized_end=636
|
|
48
|
+
_globals['_POSTRESPONSE']._serialized_start=638
|
|
49
|
+
_globals['_POSTRESPONSE']._serialized_end=669
|
|
50
|
+
_globals['_GETREQUEST']._serialized_start=671
|
|
51
|
+
_globals['_GETREQUEST']._serialized_end=787
|
|
52
|
+
_globals['_GETRESPONSE']._serialized_start=789
|
|
53
|
+
_globals['_GETRESPONSE']._serialized_end=816
|
|
54
|
+
_globals['_RELEASEREQUEST']._serialized_start=818
|
|
55
|
+
_globals['_RELEASEREQUEST']._serialized_end=938
|
|
56
|
+
_globals['_RELEASERESPONSE']._serialized_start=940
|
|
57
|
+
_globals['_RELEASERESPONSE']._serialized_end=957
|
|
58
|
+
_globals['_REFERENCE']._serialized_start=959
|
|
59
|
+
_globals['_REFERENCE']._serialized_end=982
|
|
60
|
+
_globals['_SESSION']._serialized_start=984
|
|
61
|
+
_globals['_SESSION']._serialized_end=1005
|
|
62
|
+
_globals['_EVENT']._serialized_start=1007
|
|
63
|
+
_globals['_EVENT']._serialized_end=1088
|
|
64
|
+
_globals['_MEMORYPOOL']._serialized_start=1091
|
|
65
|
+
_globals['_MEMORYPOOL']._serialized_end=1624
|
|
66
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
from google.protobuf import descriptor as _descriptor
|
|
2
|
+
from google.protobuf import message as _message
|
|
3
|
+
from collections.abc import Mapping as _Mapping
|
|
4
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
5
|
+
|
|
6
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
|
+
|
|
8
|
+
class SessionRequest(_message.Message):
|
|
9
|
+
__slots__ = ()
|
|
10
|
+
def __init__(self) -> None: ...
|
|
11
|
+
|
|
12
|
+
class SessionResponse(_message.Message):
|
|
13
|
+
__slots__ = ("session", "event")
|
|
14
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
EVENT_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
session: Session
|
|
17
|
+
event: Event
|
|
18
|
+
def __init__(self, session: _Optional[_Union[Session, _Mapping]] = ..., event: _Optional[_Union[Event, _Mapping]] = ...) -> None: ...
|
|
19
|
+
|
|
20
|
+
class AcquireRequest(_message.Message):
|
|
21
|
+
__slots__ = ("reference", "session")
|
|
22
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
24
|
+
reference: Reference
|
|
25
|
+
session: Session
|
|
26
|
+
def __init__(self, reference: _Optional[_Union[Reference, _Mapping]] = ..., session: _Optional[_Union[Session, _Mapping]] = ...) -> None: ...
|
|
27
|
+
|
|
28
|
+
class AcquireResponse(_message.Message):
|
|
29
|
+
__slots__ = ()
|
|
30
|
+
def __init__(self) -> None: ...
|
|
31
|
+
|
|
32
|
+
class PutRequest(_message.Message):
|
|
33
|
+
__slots__ = ("session", "mutable", "dump")
|
|
34
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
MUTABLE_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
DUMP_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
session: Session
|
|
38
|
+
mutable: bool
|
|
39
|
+
dump: bytes
|
|
40
|
+
def __init__(self, session: _Optional[_Union[Session, _Mapping]] = ..., mutable: bool = ..., dump: _Optional[bytes] = ...) -> None: ...
|
|
41
|
+
|
|
42
|
+
class PutResponse(_message.Message):
|
|
43
|
+
__slots__ = ("reference",)
|
|
44
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
reference: Reference
|
|
46
|
+
def __init__(self, reference: _Optional[_Union[Reference, _Mapping]] = ...) -> None: ...
|
|
47
|
+
|
|
48
|
+
class PostRequest(_message.Message):
|
|
49
|
+
__slots__ = ("session", "reference", "dump")
|
|
50
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
DUMP_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
session: Session
|
|
54
|
+
reference: Reference
|
|
55
|
+
dump: bytes
|
|
56
|
+
def __init__(self, session: _Optional[_Union[Session, _Mapping]] = ..., reference: _Optional[_Union[Reference, _Mapping]] = ..., dump: _Optional[bytes] = ...) -> None: ...
|
|
57
|
+
|
|
58
|
+
class PostResponse(_message.Message):
|
|
59
|
+
__slots__ = ("updated",)
|
|
60
|
+
UPDATED_FIELD_NUMBER: _ClassVar[int]
|
|
61
|
+
updated: bool
|
|
62
|
+
def __init__(self, updated: bool = ...) -> None: ...
|
|
63
|
+
|
|
64
|
+
class GetRequest(_message.Message):
|
|
65
|
+
__slots__ = ("reference", "session")
|
|
66
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
67
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
reference: Reference
|
|
69
|
+
session: Session
|
|
70
|
+
def __init__(self, reference: _Optional[_Union[Reference, _Mapping]] = ..., session: _Optional[_Union[Session, _Mapping]] = ...) -> None: ...
|
|
71
|
+
|
|
72
|
+
class GetResponse(_message.Message):
|
|
73
|
+
__slots__ = ("dump",)
|
|
74
|
+
DUMP_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
dump: bytes
|
|
76
|
+
def __init__(self, dump: _Optional[bytes] = ...) -> None: ...
|
|
77
|
+
|
|
78
|
+
class ReleaseRequest(_message.Message):
|
|
79
|
+
__slots__ = ("reference", "session")
|
|
80
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
reference: Reference
|
|
83
|
+
session: Session
|
|
84
|
+
def __init__(self, reference: _Optional[_Union[Reference, _Mapping]] = ..., session: _Optional[_Union[Session, _Mapping]] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class ReleaseResponse(_message.Message):
|
|
87
|
+
__slots__ = ()
|
|
88
|
+
def __init__(self) -> None: ...
|
|
89
|
+
|
|
90
|
+
class Reference(_message.Message):
|
|
91
|
+
__slots__ = ("id",)
|
|
92
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
+
id: str
|
|
94
|
+
def __init__(self, id: _Optional[str] = ...) -> None: ...
|
|
95
|
+
|
|
96
|
+
class Session(_message.Message):
|
|
97
|
+
__slots__ = ("id",)
|
|
98
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
99
|
+
id: str
|
|
100
|
+
def __init__(self, id: _Optional[str] = ...) -> None: ...
|
|
101
|
+
|
|
102
|
+
class Event(_message.Message):
|
|
103
|
+
__slots__ = ("reference", "event_type")
|
|
104
|
+
REFERENCE_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
EVENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
106
|
+
reference: Reference
|
|
107
|
+
event_type: str
|
|
108
|
+
def __init__(self, reference: _Optional[_Union[Reference, _Mapping]] = ..., event_type: _Optional[str] = ...) -> None: ...
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from mempool import mempool_pb2 as mempool_dot_mempool__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.73.1'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in mempool/mempool_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class MemoryPoolStub(object):
|
|
29
|
+
"""Missing associated documentation comment in .proto file."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, channel):
|
|
32
|
+
"""Constructor.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
channel: A grpc.Channel.
|
|
36
|
+
"""
|
|
37
|
+
self.session = channel.unary_stream(
|
|
38
|
+
'/wool._protobuf.mempool.MemoryPool/session',
|
|
39
|
+
request_serializer=mempool_dot_mempool__pb2.SessionRequest.SerializeToString,
|
|
40
|
+
response_deserializer=mempool_dot_mempool__pb2.SessionResponse.FromString,
|
|
41
|
+
_registered_method=True)
|
|
42
|
+
self.acquire = channel.unary_unary(
|
|
43
|
+
'/wool._protobuf.mempool.MemoryPool/acquire',
|
|
44
|
+
request_serializer=mempool_dot_mempool__pb2.AcquireRequest.SerializeToString,
|
|
45
|
+
response_deserializer=mempool_dot_mempool__pb2.AcquireResponse.FromString,
|
|
46
|
+
_registered_method=True)
|
|
47
|
+
self.put = channel.unary_unary(
|
|
48
|
+
'/wool._protobuf.mempool.MemoryPool/put',
|
|
49
|
+
request_serializer=mempool_dot_mempool__pb2.PutRequest.SerializeToString,
|
|
50
|
+
response_deserializer=mempool_dot_mempool__pb2.PutResponse.FromString,
|
|
51
|
+
_registered_method=True)
|
|
52
|
+
self.post = channel.unary_unary(
|
|
53
|
+
'/wool._protobuf.mempool.MemoryPool/post',
|
|
54
|
+
request_serializer=mempool_dot_mempool__pb2.PostRequest.SerializeToString,
|
|
55
|
+
response_deserializer=mempool_dot_mempool__pb2.PostResponse.FromString,
|
|
56
|
+
_registered_method=True)
|
|
57
|
+
self.get = channel.unary_unary(
|
|
58
|
+
'/wool._protobuf.mempool.MemoryPool/get',
|
|
59
|
+
request_serializer=mempool_dot_mempool__pb2.GetRequest.SerializeToString,
|
|
60
|
+
response_deserializer=mempool_dot_mempool__pb2.GetResponse.FromString,
|
|
61
|
+
_registered_method=True)
|
|
62
|
+
self.release = channel.unary_unary(
|
|
63
|
+
'/wool._protobuf.mempool.MemoryPool/release',
|
|
64
|
+
request_serializer=mempool_dot_mempool__pb2.ReleaseRequest.SerializeToString,
|
|
65
|
+
response_deserializer=mempool_dot_mempool__pb2.ReleaseResponse.FromString,
|
|
66
|
+
_registered_method=True)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class MemoryPoolServicer(object):
|
|
70
|
+
"""Missing associated documentation comment in .proto file."""
|
|
71
|
+
|
|
72
|
+
def session(self, request, context):
|
|
73
|
+
"""Missing associated documentation comment in .proto file."""
|
|
74
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
75
|
+
context.set_details('Method not implemented!')
|
|
76
|
+
raise NotImplementedError('Method not implemented!')
|
|
77
|
+
|
|
78
|
+
def acquire(self, request, context):
|
|
79
|
+
"""Missing associated documentation comment in .proto file."""
|
|
80
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
81
|
+
context.set_details('Method not implemented!')
|
|
82
|
+
raise NotImplementedError('Method not implemented!')
|
|
83
|
+
|
|
84
|
+
def put(self, request, context):
|
|
85
|
+
"""Missing associated documentation comment in .proto file."""
|
|
86
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
87
|
+
context.set_details('Method not implemented!')
|
|
88
|
+
raise NotImplementedError('Method not implemented!')
|
|
89
|
+
|
|
90
|
+
def post(self, request, context):
|
|
91
|
+
"""Missing associated documentation comment in .proto file."""
|
|
92
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
93
|
+
context.set_details('Method not implemented!')
|
|
94
|
+
raise NotImplementedError('Method not implemented!')
|
|
95
|
+
|
|
96
|
+
def get(self, request, context):
|
|
97
|
+
"""Missing associated documentation comment in .proto file."""
|
|
98
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
99
|
+
context.set_details('Method not implemented!')
|
|
100
|
+
raise NotImplementedError('Method not implemented!')
|
|
101
|
+
|
|
102
|
+
def release(self, request, context):
|
|
103
|
+
"""Missing associated documentation comment in .proto file."""
|
|
104
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
105
|
+
context.set_details('Method not implemented!')
|
|
106
|
+
raise NotImplementedError('Method not implemented!')
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def add_MemoryPoolServicer_to_server(servicer, server):
|
|
110
|
+
rpc_method_handlers = {
|
|
111
|
+
'session': grpc.unary_stream_rpc_method_handler(
|
|
112
|
+
servicer.session,
|
|
113
|
+
request_deserializer=mempool_dot_mempool__pb2.SessionRequest.FromString,
|
|
114
|
+
response_serializer=mempool_dot_mempool__pb2.SessionResponse.SerializeToString,
|
|
115
|
+
),
|
|
116
|
+
'acquire': grpc.unary_unary_rpc_method_handler(
|
|
117
|
+
servicer.acquire,
|
|
118
|
+
request_deserializer=mempool_dot_mempool__pb2.AcquireRequest.FromString,
|
|
119
|
+
response_serializer=mempool_dot_mempool__pb2.AcquireResponse.SerializeToString,
|
|
120
|
+
),
|
|
121
|
+
'put': grpc.unary_unary_rpc_method_handler(
|
|
122
|
+
servicer.put,
|
|
123
|
+
request_deserializer=mempool_dot_mempool__pb2.PutRequest.FromString,
|
|
124
|
+
response_serializer=mempool_dot_mempool__pb2.PutResponse.SerializeToString,
|
|
125
|
+
),
|
|
126
|
+
'post': grpc.unary_unary_rpc_method_handler(
|
|
127
|
+
servicer.post,
|
|
128
|
+
request_deserializer=mempool_dot_mempool__pb2.PostRequest.FromString,
|
|
129
|
+
response_serializer=mempool_dot_mempool__pb2.PostResponse.SerializeToString,
|
|
130
|
+
),
|
|
131
|
+
'get': grpc.unary_unary_rpc_method_handler(
|
|
132
|
+
servicer.get,
|
|
133
|
+
request_deserializer=mempool_dot_mempool__pb2.GetRequest.FromString,
|
|
134
|
+
response_serializer=mempool_dot_mempool__pb2.GetResponse.SerializeToString,
|
|
135
|
+
),
|
|
136
|
+
'release': grpc.unary_unary_rpc_method_handler(
|
|
137
|
+
servicer.release,
|
|
138
|
+
request_deserializer=mempool_dot_mempool__pb2.ReleaseRequest.FromString,
|
|
139
|
+
response_serializer=mempool_dot_mempool__pb2.ReleaseResponse.SerializeToString,
|
|
140
|
+
),
|
|
141
|
+
}
|
|
142
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
143
|
+
'wool._protobuf.mempool.MemoryPool', rpc_method_handlers)
|
|
144
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
145
|
+
server.add_registered_method_handlers('wool._protobuf.mempool.MemoryPool', rpc_method_handlers)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# This class is part of an EXPERIMENTAL API.
|
|
149
|
+
class MemoryPool(object):
|
|
150
|
+
"""Missing associated documentation comment in .proto file."""
|
|
151
|
+
|
|
152
|
+
@staticmethod
|
|
153
|
+
def session(request,
|
|
154
|
+
target,
|
|
155
|
+
options=(),
|
|
156
|
+
channel_credentials=None,
|
|
157
|
+
call_credentials=None,
|
|
158
|
+
insecure=False,
|
|
159
|
+
compression=None,
|
|
160
|
+
wait_for_ready=None,
|
|
161
|
+
timeout=None,
|
|
162
|
+
metadata=None):
|
|
163
|
+
return grpc.experimental.unary_stream(
|
|
164
|
+
request,
|
|
165
|
+
target,
|
|
166
|
+
'/wool._protobuf.mempool.MemoryPool/session',
|
|
167
|
+
mempool_dot_mempool__pb2.SessionRequest.SerializeToString,
|
|
168
|
+
mempool_dot_mempool__pb2.SessionResponse.FromString,
|
|
169
|
+
options,
|
|
170
|
+
channel_credentials,
|
|
171
|
+
insecure,
|
|
172
|
+
call_credentials,
|
|
173
|
+
compression,
|
|
174
|
+
wait_for_ready,
|
|
175
|
+
timeout,
|
|
176
|
+
metadata,
|
|
177
|
+
_registered_method=True)
|
|
178
|
+
|
|
179
|
+
@staticmethod
|
|
180
|
+
def acquire(request,
|
|
181
|
+
target,
|
|
182
|
+
options=(),
|
|
183
|
+
channel_credentials=None,
|
|
184
|
+
call_credentials=None,
|
|
185
|
+
insecure=False,
|
|
186
|
+
compression=None,
|
|
187
|
+
wait_for_ready=None,
|
|
188
|
+
timeout=None,
|
|
189
|
+
metadata=None):
|
|
190
|
+
return grpc.experimental.unary_unary(
|
|
191
|
+
request,
|
|
192
|
+
target,
|
|
193
|
+
'/wool._protobuf.mempool.MemoryPool/acquire',
|
|
194
|
+
mempool_dot_mempool__pb2.AcquireRequest.SerializeToString,
|
|
195
|
+
mempool_dot_mempool__pb2.AcquireResponse.FromString,
|
|
196
|
+
options,
|
|
197
|
+
channel_credentials,
|
|
198
|
+
insecure,
|
|
199
|
+
call_credentials,
|
|
200
|
+
compression,
|
|
201
|
+
wait_for_ready,
|
|
202
|
+
timeout,
|
|
203
|
+
metadata,
|
|
204
|
+
_registered_method=True)
|
|
205
|
+
|
|
206
|
+
@staticmethod
|
|
207
|
+
def put(request,
|
|
208
|
+
target,
|
|
209
|
+
options=(),
|
|
210
|
+
channel_credentials=None,
|
|
211
|
+
call_credentials=None,
|
|
212
|
+
insecure=False,
|
|
213
|
+
compression=None,
|
|
214
|
+
wait_for_ready=None,
|
|
215
|
+
timeout=None,
|
|
216
|
+
metadata=None):
|
|
217
|
+
return grpc.experimental.unary_unary(
|
|
218
|
+
request,
|
|
219
|
+
target,
|
|
220
|
+
'/wool._protobuf.mempool.MemoryPool/put',
|
|
221
|
+
mempool_dot_mempool__pb2.PutRequest.SerializeToString,
|
|
222
|
+
mempool_dot_mempool__pb2.PutResponse.FromString,
|
|
223
|
+
options,
|
|
224
|
+
channel_credentials,
|
|
225
|
+
insecure,
|
|
226
|
+
call_credentials,
|
|
227
|
+
compression,
|
|
228
|
+
wait_for_ready,
|
|
229
|
+
timeout,
|
|
230
|
+
metadata,
|
|
231
|
+
_registered_method=True)
|
|
232
|
+
|
|
233
|
+
@staticmethod
|
|
234
|
+
def post(request,
|
|
235
|
+
target,
|
|
236
|
+
options=(),
|
|
237
|
+
channel_credentials=None,
|
|
238
|
+
call_credentials=None,
|
|
239
|
+
insecure=False,
|
|
240
|
+
compression=None,
|
|
241
|
+
wait_for_ready=None,
|
|
242
|
+
timeout=None,
|
|
243
|
+
metadata=None):
|
|
244
|
+
return grpc.experimental.unary_unary(
|
|
245
|
+
request,
|
|
246
|
+
target,
|
|
247
|
+
'/wool._protobuf.mempool.MemoryPool/post',
|
|
248
|
+
mempool_dot_mempool__pb2.PostRequest.SerializeToString,
|
|
249
|
+
mempool_dot_mempool__pb2.PostResponse.FromString,
|
|
250
|
+
options,
|
|
251
|
+
channel_credentials,
|
|
252
|
+
insecure,
|
|
253
|
+
call_credentials,
|
|
254
|
+
compression,
|
|
255
|
+
wait_for_ready,
|
|
256
|
+
timeout,
|
|
257
|
+
metadata,
|
|
258
|
+
_registered_method=True)
|
|
259
|
+
|
|
260
|
+
@staticmethod
|
|
261
|
+
def get(request,
|
|
262
|
+
target,
|
|
263
|
+
options=(),
|
|
264
|
+
channel_credentials=None,
|
|
265
|
+
call_credentials=None,
|
|
266
|
+
insecure=False,
|
|
267
|
+
compression=None,
|
|
268
|
+
wait_for_ready=None,
|
|
269
|
+
timeout=None,
|
|
270
|
+
metadata=None):
|
|
271
|
+
return grpc.experimental.unary_unary(
|
|
272
|
+
request,
|
|
273
|
+
target,
|
|
274
|
+
'/wool._protobuf.mempool.MemoryPool/get',
|
|
275
|
+
mempool_dot_mempool__pb2.GetRequest.SerializeToString,
|
|
276
|
+
mempool_dot_mempool__pb2.GetResponse.FromString,
|
|
277
|
+
options,
|
|
278
|
+
channel_credentials,
|
|
279
|
+
insecure,
|
|
280
|
+
call_credentials,
|
|
281
|
+
compression,
|
|
282
|
+
wait_for_ready,
|
|
283
|
+
timeout,
|
|
284
|
+
metadata,
|
|
285
|
+
_registered_method=True)
|
|
286
|
+
|
|
287
|
+
@staticmethod
|
|
288
|
+
def release(request,
|
|
289
|
+
target,
|
|
290
|
+
options=(),
|
|
291
|
+
channel_credentials=None,
|
|
292
|
+
call_credentials=None,
|
|
293
|
+
insecure=False,
|
|
294
|
+
compression=None,
|
|
295
|
+
wait_for_ready=None,
|
|
296
|
+
timeout=None,
|
|
297
|
+
metadata=None):
|
|
298
|
+
return grpc.experimental.unary_unary(
|
|
299
|
+
request,
|
|
300
|
+
target,
|
|
301
|
+
'/wool._protobuf.mempool.MemoryPool/release',
|
|
302
|
+
mempool_dot_mempool__pb2.ReleaseRequest.SerializeToString,
|
|
303
|
+
mempool_dot_mempool__pb2.ReleaseResponse.FromString,
|
|
304
|
+
options,
|
|
305
|
+
channel_credentials,
|
|
306
|
+
insecure,
|
|
307
|
+
call_credentials,
|
|
308
|
+
compression,
|
|
309
|
+
wait_for_ready,
|
|
310
|
+
timeout,
|
|
311
|
+
metadata,
|
|
312
|
+
_registered_method=True)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source:
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
4
|
+
# source: mempool/metadata/metadata.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.0
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,10 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
31,
|
|
16
16
|
0,
|
|
17
17
|
'',
|
|
18
|
-
'
|
|
18
|
+
'mempool/metadata/metadata.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
|
21
21
|
|
|
@@ -24,13 +24,13 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmempool/metadata/metadata.proto\x12\x16wool._mempool.metadata\"K\n\x10_MetadataMessage\x12\x0b\n\x03ref\x18\x01 \x01(\t\x12\x0f\n\x07mutable\x18\x02 \x01(\x08\x12\x0c\n\x04size\x18\x03 \x01(\x03\x12\x0b\n\x03md5\x18\x04 \x01(\x0c\x62\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, '
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mempool.metadata.metadata_pb2', _globals)
|
|
32
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
33
|
DESCRIPTOR._loaded_options = None
|
|
34
|
-
_globals['__METADATAMESSAGE']._serialized_start=
|
|
35
|
-
_globals['__METADATAMESSAGE']._serialized_end=
|
|
34
|
+
_globals['__METADATAMESSAGE']._serialized_start=59
|
|
35
|
+
_globals['__METADATAMESSAGE']._serialized_end=134
|
|
36
36
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.73.1'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in mempool/metadata/metadata_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wool
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1rc8
|
|
4
4
|
Summary: A Python framework for distributed multiprocessing.
|
|
5
5
|
Author-email: Conrad Bzura <conrad@wool.io>
|
|
6
6
|
Maintainer-email: maintainers@wool.io
|
|
@@ -206,19 +206,24 @@ License: Apache License
|
|
|
206
206
|
See the License for the specific language governing permissions and
|
|
207
207
|
limitations under the License.
|
|
208
208
|
Classifier: Intended Audience :: Developers
|
|
209
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
210
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
209
211
|
Requires-Python: >=3.10
|
|
210
212
|
Requires-Dist: annotated-types
|
|
211
213
|
Requires-Dist: click
|
|
212
214
|
Requires-Dist: debugpy
|
|
215
|
+
Requires-Dist: grpcio
|
|
213
216
|
Requires-Dist: protobuf
|
|
214
217
|
Requires-Dist: shortuuid
|
|
215
218
|
Requires-Dist: tblib
|
|
219
|
+
Requires-Dist: typing-extensions
|
|
216
220
|
Provides-Extra: dev
|
|
217
221
|
Requires-Dist: pytest; extra == 'dev'
|
|
218
222
|
Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
223
|
+
Requires-Dist: pytest-grpc-aio~=0.2.0; extra == 'dev'
|
|
219
224
|
Requires-Dist: ruff; extra == 'dev'
|
|
220
225
|
Provides-Extra: locking
|
|
221
|
-
Requires-Dist: wool-locking==0.
|
|
226
|
+
Requires-Dist: wool-locking==0.1rc8; extra == 'locking'
|
|
222
227
|
Description-Content-Type: text/markdown
|
|
223
228
|
|
|
224
229
|
# Wool
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
wool/__init__.py,sha256=I5_ROaxPM764bhVbirFqLN62TyFrwS8Z47IR7wN4e1k,1900
|
|
2
|
+
wool/_cli.py,sha256=zLJqrT6nyLWNR83z40WsF279zJlE13UdDAhLuwoo50s,6565
|
|
3
|
+
wool/_event.py,sha256=3fixaB2FN9Uetgkpwnw9MikohaRq2NwdnWEMFwPz3A4,2965
|
|
4
|
+
wool/_future.py,sha256=Wn-wOuxfN9_R1-7wTzZGPUSl-IRYy5OM8ml68Ah6VuQ,4792
|
|
5
|
+
wool/_logging.py,sha256=r4iLicEjuYo1P7GMs1OB0GkHo9NKAFocvoR3RAnvrRA,1262
|
|
6
|
+
wool/_manager.py,sha256=QjYH73OPyTBeiOhJhbKJS9cPhuAIN2EOb14bUxZWI4o,4222
|
|
7
|
+
wool/_pool.py,sha256=vdQAjA0J7X5aa5VldjqgMxTMqp2t_K9268obZDKeT3M,15598
|
|
8
|
+
wool/_queue.py,sha256=qiTIezBe7sYvNszSRGDilumE49wlO3VWyMA74PgofeU,978
|
|
9
|
+
wool/_session.py,sha256=Dv2hYLvfv_zCoiptt27o6GqZkgHZoNvak6pAIz7znaA,11842
|
|
10
|
+
wool/_task.py,sha256=FRWyLb2geFGJmUtdn7RO_xjJSrUU_1TMDA9Mc9tBB8Y,10954
|
|
11
|
+
wool/_typing.py,sha256=FmTNTqJtist1rlaVAVSyg12AW9RwqcbvqC4M1u88iSU,397
|
|
12
|
+
wool/_utils.py,sha256=dHhgCp51oGjvKYCOYBjgWj6C03k2ZvclalrCZ4hH3sU,1527
|
|
13
|
+
wool/_worker.py,sha256=bEjPOHciLjLc-R456sX6EoImq9CTEGaLiZOOZP1BJYI,6434
|
|
14
|
+
wool/_mempool/__init__.py,sha256=GxNfNqxs51zLqzN9KN_--srguiZUFgJlGartzrpWbxA,146
|
|
15
|
+
wool/_mempool/_mempool.py,sha256=FAFbLuRS0ZVynY83Lg4CDlJLlnr1tgoUpJhPKmMgNSQ,8962
|
|
16
|
+
wool/_mempool/_metadata.py,sha256=wIOU8N4-1udojYO3SNj3lg-CyZ4O_oIaABgjNAiGAaI,910
|
|
17
|
+
wool/_mempool/_service.py,sha256=25kqNhOjDAzB0NVzpQAwIedOzEl4w_FCyfvgTe2SQdo,8052
|
|
18
|
+
wool/_protobuf/__init__.py,sha256=-tk1eG9ej62htUNZbCA137mI-Tx5D71YJ2NYk7nQKFo,85
|
|
19
|
+
wool/_protobuf/mempool/mempool_pb2.py,sha256=fExanuvJuYtD7vebn3aWiK2Fvi3rVp2RRjQL0Xuc3sM,5030
|
|
20
|
+
wool/_protobuf/mempool/mempool_pb2.pyi,sha256=p06Jy4fLv91PHZln9rBnlaTvN7DRf3siZpTLDO6diEU,4083
|
|
21
|
+
wool/_protobuf/mempool/mempool_pb2_grpc.py,sha256=6aVmk3hPFBNa3y0PdJqG3yLIOTAenjKo4AGtWNsiPrk,12153
|
|
22
|
+
wool/_protobuf/mempool/metadata/metadata_pb2.py,sha256=HF90_abKxFnP8Yj-Gtz4WZrudBvrkwxdMDOttdql3Jg,1478
|
|
23
|
+
wool/_protobuf/mempool/metadata/metadata_pb2.pyi,sha256=Tp6EcQF0ScsT-lNG9844yfwTkDkQwtLkDn6u2gMbjfE,653
|
|
24
|
+
wool/_protobuf/mempool/metadata/metadata_pb2_grpc.py,sha256=sAOhIZ2kSEJwYMyV8Ok1VtqeNFVflhh27Br8Rr33n0M,906
|
|
25
|
+
wool-0.1rc8.dist-info/METADATA,sha256=J2I5rxYh2l2xjlBrfklvl-tyrlojlWpQSfAFE7WhadI,17030
|
|
26
|
+
wool-0.1rc8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
27
|
+
wool-0.1rc8.dist-info/entry_points.txt,sha256=ybzb5TYXou-2cKC8HP5p0X8bw6Iyv7UMasqml6zlO1k,39
|
|
28
|
+
wool-0.1rc8.dist-info/RECORD,,
|
wool/_protobuf/.gitkeep
DELETED
|
File without changes
|
wool-0.1rc7.dist-info/RECORD
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
wool/__init__.py,sha256=I5_ROaxPM764bhVbirFqLN62TyFrwS8Z47IR7wN4e1k,1900
|
|
2
|
-
wool/_cli.py,sha256=zLJqrT6nyLWNR83z40WsF279zJlE13UdDAhLuwoo50s,6565
|
|
3
|
-
wool/_event.py,sha256=3fixaB2FN9Uetgkpwnw9MikohaRq2NwdnWEMFwPz3A4,2965
|
|
4
|
-
wool/_future.py,sha256=Wn-wOuxfN9_R1-7wTzZGPUSl-IRYy5OM8ml68Ah6VuQ,4792
|
|
5
|
-
wool/_logging.py,sha256=r4iLicEjuYo1P7GMs1OB0GkHo9NKAFocvoR3RAnvrRA,1262
|
|
6
|
-
wool/_manager.py,sha256=QjYH73OPyTBeiOhJhbKJS9cPhuAIN2EOb14bUxZWI4o,4222
|
|
7
|
-
wool/_pool.py,sha256=vdQAjA0J7X5aa5VldjqgMxTMqp2t_K9268obZDKeT3M,15598
|
|
8
|
-
wool/_queue.py,sha256=qiTIezBe7sYvNszSRGDilumE49wlO3VWyMA74PgofeU,978
|
|
9
|
-
wool/_session.py,sha256=Dv2hYLvfv_zCoiptt27o6GqZkgHZoNvak6pAIz7znaA,11842
|
|
10
|
-
wool/_task.py,sha256=FRWyLb2geFGJmUtdn7RO_xjJSrUU_1TMDA9Mc9tBB8Y,10954
|
|
11
|
-
wool/_typing.py,sha256=FmTNTqJtist1rlaVAVSyg12AW9RwqcbvqC4M1u88iSU,397
|
|
12
|
-
wool/_utils.py,sha256=dHhgCp51oGjvKYCOYBjgWj6C03k2ZvclalrCZ4hH3sU,1527
|
|
13
|
-
wool/_worker.py,sha256=bEjPOHciLjLc-R456sX6EoImq9CTEGaLiZOOZP1BJYI,6434
|
|
14
|
-
wool/_mempool/__init__.py,sha256=gciN0LCV0G4cbJrL2rxmtu7e8lFJk8wCWqQQWpw5mOs,72
|
|
15
|
-
wool/_mempool/_mempool.py,sha256=vG_mhrM2RtDHHfULDyK7Qti_qjbWuW-IjjbtFflkmXs,6618
|
|
16
|
-
wool/_mempool/_metadata/__init__.py,sha256=5tojyNteoJto5tMhxpPj74Iiufa9I74Mbylcge5lTGQ,930
|
|
17
|
-
wool/_protobuf/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
wool/_protobuf/_mempool/_metadata/_metadata_pb2.py,sha256=PDMp6NwAod_r0vp0guO5aDrb8P_8ClT1KiNudqLb-rQ,1489
|
|
19
|
-
wool/_protobuf/_mempool/_metadata/_metadata_pb2.pyi,sha256=Tp6EcQF0ScsT-lNG9844yfwTkDkQwtLkDn6u2gMbjfE,653
|
|
20
|
-
wool-0.1rc7.dist-info/METADATA,sha256=3_7sv9XzIwJ9UQSJ8CqeZdVOnTANvTWw99xpO1JDHwc,16825
|
|
21
|
-
wool-0.1rc7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
22
|
-
wool-0.1rc7.dist-info/entry_points.txt,sha256=ybzb5TYXou-2cKC8HP5p0X8bw6Iyv7UMasqml6zlO1k,39
|
|
23
|
-
wool-0.1rc7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|