aiomisc 17.7.7__tar.gz → 17.7.8__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 (69) hide show
  1. {aiomisc-17.7.7 → aiomisc-17.7.8}/PKG-INFO +1 -1
  2. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/iterator_wrapper.py +6 -0
  3. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/utils.py +4 -1
  4. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/version.py +2 -2
  5. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/worker_pool.py +1 -0
  6. {aiomisc-17.7.7 → aiomisc-17.7.8}/pyproject.toml +1 -1
  7. {aiomisc-17.7.7 → aiomisc-17.7.8}/COPYING +0 -0
  8. {aiomisc-17.7.7 → aiomisc-17.7.8}/README.rst +0 -0
  9. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/__init__.py +0 -0
  10. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/_context_vars.py +0 -0
  11. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/aggregate.py +0 -0
  12. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/backoff.py +0 -0
  13. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/circuit_breaker.py +0 -0
  14. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/compat.py +0 -0
  15. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/context.py +0 -0
  16. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/counters.py +0 -0
  17. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/cron.py +0 -0
  18. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/entrypoint.py +0 -0
  19. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/io.py +0 -0
  20. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/log.py +0 -0
  21. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/periodic.py +0 -0
  22. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/plugins/__init__.py +0 -0
  23. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/plugins/__main__.py +0 -0
  24. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/pool.py +0 -0
  25. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/process_pool.py +0 -0
  26. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/py.typed +0 -0
  27. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/recurring.py +0 -0
  28. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/__init__.py +0 -0
  29. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/aiohttp.py +0 -0
  30. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/asgi.py +0 -0
  31. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/base.py +0 -0
  32. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/carbon.py +0 -0
  33. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/cron.py +0 -0
  34. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/__init__.py +0 -0
  35. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/records.py +0 -0
  36. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/service.py +0 -0
  37. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/store.py +0 -0
  38. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/tree.py +0 -0
  39. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/dns/zone.py +0 -0
  40. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/grpc_server.py +0 -0
  41. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/periodic.py +0 -0
  42. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/process.py +0 -0
  43. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/profiler.py +0 -0
  44. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/raven.py +0 -0
  45. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/sdwatchdog.py +0 -0
  46. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/tcp.py +0 -0
  47. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/tls.py +0 -0
  48. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/tracer.py +0 -0
  49. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/udp.py +0 -0
  50. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/service/uvicorn.py +0 -0
  51. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/signal.py +0 -0
  52. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/thread_pool.py +0 -0
  53. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc/timeout.py +0 -0
  54. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/__init__.py +0 -0
  55. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/enum.py +0 -0
  56. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/formatter/__init__.py +0 -0
  57. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/formatter/color.py +0 -0
  58. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/formatter/journald.py +0 -0
  59. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/formatter/json.py +0 -0
  60. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/formatter/rich.py +0 -0
  61. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_log/py.typed +0 -0
  62. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/__init__.py +0 -0
  63. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/__main__.py +0 -0
  64. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/forking.py +0 -0
  65. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/process.py +0 -0
  66. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/process_inner.py +0 -0
  67. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/protocol.py +0 -0
  68. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/py.typed +0 -0
  69. {aiomisc-17.7.7 → aiomisc-17.7.8}/aiomisc_worker/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aiomisc
3
- Version: 17.7.7
3
+ Version: 17.7.8
4
4
  Summary: aiomisc - miscellaneous utils for asyncio
5
5
  License: MIT
6
6
  Author: Dmitry Orlov
@@ -213,6 +213,12 @@ class IteratorWrapper(AsyncIterator, EventLoopMixin):
213
213
 
214
214
  def close(self) -> Awaitable[None]:
215
215
  self.__channel.close()
216
+ # if the iterator inside thread is blocked on `.put()`
217
+ # we need to wake it up to signal that it is closed.
218
+ try:
219
+ self.__channel.queue.get()
220
+ except QueueEmpty:
221
+ pass
216
222
  return asyncio.ensure_future(self.wait_closed())
217
223
 
218
224
  async def wait_closed(self) -> None:
@@ -88,6 +88,10 @@ def bind_socket(
88
88
  if not args and ":" in address:
89
89
  sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
90
90
 
91
+ unix_address_family = getattr(socket, "AF_UNIX", None)
92
+ if sock.family == unix_address_family:
93
+ reuse_port = False
94
+
91
95
  if reuse_addr:
92
96
  sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
93
97
 
@@ -99,7 +103,6 @@ def bind_socket(
99
103
  for level, option, value in options:
100
104
  sock.setsockopt(level, option, value)
101
105
 
102
- unix_address_family = getattr(socket, "AF_UNIX", None)
103
106
  if sock.family == unix_address_family:
104
107
  proto_name = proto_name or "unix"
105
108
  sock.bind(address)
@@ -2,5 +2,5 @@
2
2
  # BY: poem-plugins "git" plugin
3
3
  # NEVER EDIT THIS FILE MANUALLY
4
4
 
5
- version_info = (17, 7, 7)
6
- __version__ = "17.7.7"
5
+ version_info = (17, 7, 8)
6
+ __version__ = "17.7.8"
@@ -60,6 +60,7 @@ class WorkerPool:
60
60
  socket.AF_UNIX,
61
61
  socket.SOCK_STREAM,
62
62
  address=path,
63
+ reuse_port=False,
63
64
  )
64
65
  self.address = path
65
66
  chmod(path, 0o600)
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "aiomisc"
3
3
  # This is a dummy version which will be rewritten with poem-plugins
4
- version = "17.7.7"
4
+ version = "17.7.8"
5
5
  description = "aiomisc - miscellaneous utils for asyncio"
6
6
  authors = ["Dmitry Orlov <me@mosquito.su>"]
7
7
  readme = "README.rst"
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