aiomisc 17.7.7__py3-none-any.whl → 17.7.8__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.
@@ -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:
aiomisc/utils.py CHANGED
@@ -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)
aiomisc/version.py CHANGED
@@ -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"
aiomisc/worker_pool.py CHANGED
@@ -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,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
@@ -9,7 +9,7 @@ aiomisc/counters.py,sha256=ZU7K3FBY7V1jIKohWXXyXqby98FuOmq6H5Lv7Cf-c70,3686
9
9
  aiomisc/cron.py,sha256=zAxdrLn8r7ERhkVaoUOv8xrQVZn7Hmm8HBS-MmsIu2s,2165
10
10
  aiomisc/entrypoint.py,sha256=x85478I-nmza4niFc4Yb4QsnMdRrdyUQ1Ud5dACRduI,14256
11
11
  aiomisc/io.py,sha256=PWBy_D6CVlfhHokQoVfzmHIvGb37VtUo1P-yedB9aL8,10004
12
- aiomisc/iterator_wrapper.py,sha256=d1aZ5jKTrK3kVCsfRPJPUq8X9ijVNi4o5Zs2pV4RS70,7243
12
+ aiomisc/iterator_wrapper.py,sha256=wDhehk3AB3bBvqErsTeDow0lXjBf1qbeylULMcDglJs,7463
13
13
  aiomisc/log.py,sha256=UTu5fMwIK5OU9QrDoJqxyVwdQHVDkzPl1laav0SIb4o,6323
14
14
  aiomisc/periodic.py,sha256=OFYZbPkcGgeMjBk8zwsLr2TqPRTS6MNewaL3q9qK5js,2252
15
15
  aiomisc/plugins/__init__.py,sha256=eHKGec_217rBjXGf8u-Joyf7dzpO1O0QAuFan1IEyYE,1057
@@ -44,9 +44,9 @@ aiomisc/service/uvicorn.py,sha256=I2KYQL9ysFFqQHPYK00G4EoceA7J9p9Or6v1ATpLGw8,43
44
44
  aiomisc/signal.py,sha256=_iiC2jukXg7-LLirIl1YATlKIIsKLbmTNFr1Ezheu7g,1728
45
45
  aiomisc/thread_pool.py,sha256=591u5HV1aBmBRcaVm4kAtMLPZOb6veqhT9wkts_knqE,14017
46
46
  aiomisc/timeout.py,sha256=5jNDooLW4MAe6ZUIKhkiX29CoyI0zlXd-dZoZwQPxak,920
47
- aiomisc/utils.py,sha256=6yTfTpeRCVzfZp-MJCmB1oayOHUBVwQwzC3U5PBAjn8,11919
48
- aiomisc/version.py,sha256=s0OGgHOIMHrEON6vN-paBHIiLD43o32aTQ1MhgHvMUo,154
49
- aiomisc/worker_pool.py,sha256=GA91KdOrBlqHthbVSTxu_d6BsBIbl-uKqW2NxqSafG0,11107
47
+ aiomisc/utils.py,sha256=9VCtQEaU4QwdMUkWIprm9xvgCfp3y_D4E-Phj7L4S9A,11990
48
+ aiomisc/version.py,sha256=njZ0hWHm4vYzCXZUIPinMvUTxw0b8WzpVC33_3TJFD4,154
49
+ aiomisc/worker_pool.py,sha256=p1cNOduqHRur1a3SJ58yuEpgL08DgDea57Z2_wQ048U,11141
50
50
  aiomisc_log/__init__.py,sha256=N3g8Ea1YE2dWPDd-MwohuAn3Y0pBxSyL4l4Jsxqkv0Q,4854
51
51
  aiomisc_log/enum.py,sha256=_zfCZPYCGyI9KL6TqHiYVlOfA5U5MCbsuCuDKxDHdxg,1549
52
52
  aiomisc_log/formatter/__init__.py,sha256=1dBtF7yRvyvAhQRAofhBN682r7COoAB8blzibJxlvS8,235
@@ -63,8 +63,8 @@ aiomisc_worker/process_inner.py,sha256=8ZtjCSLrgySW57OIbuGrpEWxfysRLYKx1or1YaAqx
63
63
  aiomisc_worker/protocol.py,sha256=1smmlBbdreSmnrxuhHaUMUC10FO9xMIEcedhweQJX_A,2705
64
64
  aiomisc_worker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  aiomisc_worker/worker.py,sha256=f8nCFhlKh84UUBUaEgCllwMRvVZiD8_UUXaeit6g3T8,3236
66
- aiomisc-17.7.7.dist-info/COPYING,sha256=Ky_8CQMaIixfyOreUBsl0hKN6A5fLnPF8KPQ9molMYA,1125
67
- aiomisc-17.7.7.dist-info/METADATA,sha256=jUwmbr5ctiWOcH-QZses2_BPjXgTwhCcAdf7H5QuWhQ,15685
68
- aiomisc-17.7.7.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
69
- aiomisc-17.7.7.dist-info/entry_points.txt,sha256=KRsSPCwKJyGTWrvzpwbS0yIDwzsgDA2X6f0CBWYmNao,55
70
- aiomisc-17.7.7.dist-info/RECORD,,
66
+ aiomisc-17.7.8.dist-info/COPYING,sha256=Ky_8CQMaIixfyOreUBsl0hKN6A5fLnPF8KPQ9molMYA,1125
67
+ aiomisc-17.7.8.dist-info/METADATA,sha256=UF00zYem4Gp2Y-xJ28fkV4Br2_PLclC3VPIVtWQ0kIg,15685
68
+ aiomisc-17.7.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
69
+ aiomisc-17.7.8.dist-info/entry_points.txt,sha256=KRsSPCwKJyGTWrvzpwbS0yIDwzsgDA2X6f0CBWYmNao,55
70
+ aiomisc-17.7.8.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any