portal 3.1.0__tar.gz → 3.1.1__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.
Files changed (35) hide show
  1. {portal-3.1.0/portal.egg-info → portal-3.1.1}/PKG-INFO +1 -1
  2. {portal-3.1.0 → portal-3.1.1}/portal/__init__.py +1 -1
  3. {portal-3.1.0 → portal-3.1.1}/portal/client_socket.py +4 -2
  4. {portal-3.1.0 → portal-3.1.1}/portal/contextlib.py +3 -3
  5. {portal-3.1.0 → portal-3.1.1}/portal/server_socket.py +3 -3
  6. {portal-3.1.0 → portal-3.1.1/portal.egg-info}/PKG-INFO +1 -1
  7. {portal-3.1.0 → portal-3.1.1}/LICENSE +0 -0
  8. {portal-3.1.0 → portal-3.1.1}/MANIFEST.in +0 -0
  9. {portal-3.1.0 → portal-3.1.1}/README.md +0 -0
  10. {portal-3.1.0 → portal-3.1.1}/portal/batching.py +0 -0
  11. {portal-3.1.0 → portal-3.1.1}/portal/buffers.py +0 -0
  12. {portal-3.1.0 → portal-3.1.1}/portal/client.py +0 -0
  13. {portal-3.1.0 → portal-3.1.1}/portal/packlib.py +0 -0
  14. {portal-3.1.0 → portal-3.1.1}/portal/poollib.py +0 -0
  15. {portal-3.1.0 → portal-3.1.1}/portal/process.py +0 -0
  16. {portal-3.1.0 → portal-3.1.1}/portal/server.py +0 -0
  17. {portal-3.1.0 → portal-3.1.1}/portal/sharray.py +0 -0
  18. {portal-3.1.0 → portal-3.1.1}/portal/thread.py +0 -0
  19. {portal-3.1.0 → portal-3.1.1}/portal/utils.py +0 -0
  20. {portal-3.1.0 → portal-3.1.1}/portal.egg-info/SOURCES.txt +0 -0
  21. {portal-3.1.0 → portal-3.1.1}/portal.egg-info/dependency_links.txt +0 -0
  22. {portal-3.1.0 → portal-3.1.1}/portal.egg-info/requires.txt +0 -0
  23. {portal-3.1.0 → portal-3.1.1}/portal.egg-info/top_level.txt +0 -0
  24. {portal-3.1.0 → portal-3.1.1}/pyproject.toml +0 -0
  25. {portal-3.1.0 → portal-3.1.1}/requirements.txt +0 -0
  26. {portal-3.1.0 → portal-3.1.1}/setup.cfg +0 -0
  27. {portal-3.1.0 → portal-3.1.1}/setup.py +0 -0
  28. {portal-3.1.0 → portal-3.1.1}/tests/test_batching.py +0 -0
  29. {portal-3.1.0 → portal-3.1.1}/tests/test_client.py +0 -0
  30. {portal-3.1.0 → portal-3.1.1}/tests/test_errfile.py +0 -0
  31. {portal-3.1.0 → portal-3.1.1}/tests/test_pack.py +0 -0
  32. {portal-3.1.0 → portal-3.1.1}/tests/test_process.py +0 -0
  33. {portal-3.1.0 → portal-3.1.1}/tests/test_server.py +0 -0
  34. {portal-3.1.0 → portal-3.1.1}/tests/test_socket.py +0 -0
  35. {portal-3.1.0 → portal-3.1.1}/tests/test_thread.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: portal
3
- Version: 3.1.0
3
+ Version: 3.1.1
4
4
  Summary: Fast and reliable distributed systems in Python
5
5
  Home-page: http://github.com/danijar/portal
6
6
  Author: Danijar Hafner
@@ -1,4 +1,4 @@
1
- __version__ = '3.1.0'
1
+ __version__ = '3.1.1'
2
2
 
3
3
  import multiprocessing as mp
4
4
  try:
@@ -186,11 +186,13 @@ class ClientSocket:
186
186
  sock.settimeout(0)
187
187
  self._log('Connection established')
188
188
  return sock
189
+ except TimeoutError as e:
190
+ error = e
189
191
  except ConnectionError as e:
190
192
  error = e
191
- time.sleep(0.1)
192
- except TimeoutError as e:
193
+ except socket.gaierror as e:
193
194
  error = e
195
+ time.sleep(0.1)
194
196
  if once:
195
197
  self._log(f'Still trying to connect... ({error})')
196
198
  once = False
@@ -44,7 +44,7 @@ class Context:
44
44
  initfns=None,
45
45
  clientkw=None,
46
46
  serverkw=None,
47
- hostname=None,
47
+ host=None,
48
48
  ipv6=None,
49
49
  ):
50
50
 
@@ -77,8 +77,8 @@ class Context:
77
77
  assert isinstance(serverkw, dict)
78
78
  self.serverkw = serverkw
79
79
 
80
- if hostname is not None:
81
- self.serverkw['hostname'] = hostname
80
+ if host is not None:
81
+ self.serverkw['host'] = host
82
82
 
83
83
  if ipv6 is not None:
84
84
  self.clientkw['ipv6'] = ipv6
@@ -26,7 +26,7 @@ class Connection:
26
26
  class Options:
27
27
 
28
28
  ipv6: bool = False
29
- hostname: str = ''
29
+ host: str = ''
30
30
  max_msg_size: int = 4 * 1024 ** 3
31
31
  max_recv_queue: int = 4096
32
32
  max_send_queue: int = 4096
@@ -43,10 +43,10 @@ class ServerSocket:
43
43
  self.options = Options(**{**contextlib.context.serverkw, **kwargs})
44
44
  if self.options.ipv6:
45
45
  self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
46
- self.addr = (self.options.hostname, port, 0, 0)
46
+ self.addr = (self.options.host, port, 0, 0)
47
47
  else:
48
48
  self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
49
- self.addr = (self.options.hostname, port)
49
+ self.addr = (self.options.host, port)
50
50
  self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
51
51
  self.sock.bind(self.addr)
52
52
  self.sock.setblocking(False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: portal
3
- Version: 3.1.0
3
+ Version: 3.1.1
4
4
  Summary: Fast and reliable distributed systems in Python
5
5
  Home-page: http://github.com/danijar/portal
6
6
  Author: Danijar Hafner
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