portal 3.5.1__tar.gz → 3.6.0__tar.gz
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.
- {portal-3.5.1/portal.egg-info → portal-3.6.0}/PKG-INFO +2 -2
- {portal-3.5.1 → portal-3.6.0}/README.md +1 -1
- {portal-3.5.1 → portal-3.6.0}/portal/__init__.py +1 -1
- {portal-3.5.1 → portal-3.6.0}/portal/buffers.py +3 -3
- {portal-3.5.1 → portal-3.6.0}/portal/server.py +2 -0
- {portal-3.5.1 → portal-3.6.0/portal.egg-info}/PKG-INFO +2 -2
- {portal-3.5.1 → portal-3.6.0}/LICENSE +0 -0
- {portal-3.5.1 → portal-3.6.0}/MANIFEST.in +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/batching.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/client.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/client_socket.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/contextlib.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/packlib.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/poollib.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/process.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/server_socket.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/sharray.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/thread.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal/utils.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal.egg-info/SOURCES.txt +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal.egg-info/dependency_links.txt +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal.egg-info/requires.txt +0 -0
- {portal-3.5.1 → portal-3.6.0}/portal.egg-info/top_level.txt +0 -0
- {portal-3.5.1 → portal-3.6.0}/pyproject.toml +0 -0
- {portal-3.5.1 → portal-3.6.0}/requirements.txt +0 -0
- {portal-3.5.1 → portal-3.6.0}/setup.cfg +0 -0
- {portal-3.5.1 → portal-3.6.0}/setup.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_batching.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_client.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_errfile.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_pack.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_process.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_server.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_socket.py +0 -0
- {portal-3.5.1 → portal-3.6.0}/tests/test_thread.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: portal
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.6.0
|
4
4
|
Summary: Fast and reliable distributed systems in Python
|
5
5
|
Home-page: http://github.com/danijar/portal
|
6
6
|
Author: Danijar Hafner
|
@@ -58,7 +58,7 @@ def server():
|
|
58
58
|
|
59
59
|
def client():
|
60
60
|
import portal
|
61
|
-
client = portal.Client('localhost'
|
61
|
+
client = portal.Client('localhost:2222')
|
62
62
|
future = client.add(12, 42)
|
63
63
|
result = future.result()
|
64
64
|
print(result) # 54
|
@@ -17,7 +17,7 @@ class SendBuffer:
|
|
17
17
|
assert all(len(x) for x in buffers)
|
18
18
|
assert 1 <= length, length
|
19
19
|
assert not maxsize or length <= length, (length, maxsize)
|
20
|
-
lenbuf = length.to_bytes(
|
20
|
+
lenbuf = length.to_bytes(8, 'little', signed=False)
|
21
21
|
self.buffers = [lenbuf, *buffers]
|
22
22
|
self.remaining = collections.deque(self.buffers)
|
23
23
|
self.pos = 0
|
@@ -64,10 +64,10 @@ class RecvBuffer:
|
|
64
64
|
|
65
65
|
def recv(self, sock):
|
66
66
|
if self.buffer is None:
|
67
|
-
part = sock.recv(
|
67
|
+
part = sock.recv(8 - len(self.lenbuf))
|
68
68
|
self.lenbuf += part
|
69
69
|
size = len(part)
|
70
|
-
if len(self.lenbuf) ==
|
70
|
+
if len(self.lenbuf) == 8:
|
71
71
|
length = int.from_bytes(self.lenbuf, 'little', signed=False)
|
72
72
|
assert 1 <= length <= self.maxsize, (1, length, self.maxsize)
|
73
73
|
# We use Numpy to allocate uninitialized memory because Python's
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: portal
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.6.0
|
4
4
|
Summary: Fast and reliable distributed systems in Python
|
5
5
|
Home-page: http://github.com/danijar/portal
|
6
6
|
Author: Danijar Hafner
|
@@ -58,7 +58,7 @@ def server():
|
|
58
58
|
|
59
59
|
def client():
|
60
60
|
import portal
|
61
|
-
client = portal.Client('localhost'
|
61
|
+
client = portal.Client('localhost:2222')
|
62
62
|
future = client.add(12, 42)
|
63
63
|
result = future.result()
|
64
64
|
print(result) # 54
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|