synapse 2.195.0__py311-none-any.whl → 2.195.1__py311-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 synapse might be problematic. Click here for more details.
- synapse/lib/nexus.py +9 -5
- synapse/lib/stormtypes.py +6 -6
- synapse/lib/version.py +2 -2
- synapse/tests/test_lib_nexus.py +24 -2
- {synapse-2.195.0.dist-info → synapse-2.195.1.dist-info}/METADATA +1 -1
- {synapse-2.195.0.dist-info → synapse-2.195.1.dist-info}/RECORD +9 -9
- {synapse-2.195.0.dist-info → synapse-2.195.1.dist-info}/LICENSE +0 -0
- {synapse-2.195.0.dist-info → synapse-2.195.1.dist-info}/WHEEL +0 -0
- {synapse-2.195.0.dist-info → synapse-2.195.1.dist-info}/top_level.txt +0 -0
synapse/lib/nexus.py
CHANGED
|
@@ -341,13 +341,17 @@ class NexsRoot(s_base.Base):
|
|
|
341
341
|
if meta is None:
|
|
342
342
|
meta = {}
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
async with self.cell.nexslock:
|
|
345
|
+
if (nexus := self._nexskids.get(nexsiden)) is None:
|
|
346
|
+
mesg = f'No Nexus Pusher with iden {nexsiden} {event=} args={s_common.trimText(repr(args))} ' \
|
|
347
|
+
f'kwargs={s_common.trimText(repr(kwargs))}'
|
|
348
|
+
raise s_exc.NoSuchIden(mesg=mesg, iden=nexsiden, event=event)
|
|
346
349
|
|
|
347
|
-
|
|
348
|
-
|
|
350
|
+
if event not in nexus._nexshands:
|
|
351
|
+
mesg = f'No event handler for event {event} args={s_common.trimText(repr(args))} ' \
|
|
352
|
+
f'kwargs={s_common.trimText(repr(kwargs))}'
|
|
353
|
+
raise s_exc.NoSuchName(mesg=mesg, iden=nexsiden, event=event)
|
|
349
354
|
|
|
350
|
-
async with self.cell.nexslock:
|
|
351
355
|
self.reqNotReadOnly()
|
|
352
356
|
# Keep a reference to the shielded task to ensure it isn't GC'd
|
|
353
357
|
self.applytask = asyncio.create_task(self._eat((nexsiden, event, args, kwargs, meta)))
|
synapse/lib/stormtypes.py
CHANGED
|
@@ -5446,7 +5446,7 @@ class Number(Prim):
|
|
|
5446
5446
|
try:
|
|
5447
5447
|
valu = s_common.hugenum(valu)
|
|
5448
5448
|
except (TypeError, decimal.DecimalException) as e:
|
|
5449
|
-
mesg = f'Failed to make number from {valu
|
|
5449
|
+
mesg = f'Failed to make number from {s_common.trimText(repr(valu))}'
|
|
5450
5450
|
raise s_exc.BadCast(mesg=mesg) from e
|
|
5451
5451
|
|
|
5452
5452
|
Prim.__init__(self, valu, path=path)
|
|
@@ -9813,7 +9813,7 @@ async def tostr(valu, noneok=False):
|
|
|
9813
9813
|
|
|
9814
9814
|
return str(valu)
|
|
9815
9815
|
except Exception as e:
|
|
9816
|
-
mesg = f'Failed to make a string from {valu
|
|
9816
|
+
mesg = f'Failed to make a string from {s_common.trimText(repr(valu))}.'
|
|
9817
9817
|
raise s_exc.BadCast(mesg=mesg) from e
|
|
9818
9818
|
|
|
9819
9819
|
async def tobool(valu, noneok=False):
|
|
@@ -9827,7 +9827,7 @@ async def tobool(valu, noneok=False):
|
|
|
9827
9827
|
try:
|
|
9828
9828
|
return bool(valu)
|
|
9829
9829
|
except Exception:
|
|
9830
|
-
mesg = f'Failed to make a boolean from {valu
|
|
9830
|
+
mesg = f'Failed to make a boolean from {s_common.trimText(repr(valu))}.'
|
|
9831
9831
|
raise s_exc.BadCast(mesg=mesg)
|
|
9832
9832
|
|
|
9833
9833
|
async def tonumber(valu, noneok=False):
|
|
@@ -9852,13 +9852,13 @@ async def toint(valu, noneok=False):
|
|
|
9852
9852
|
try:
|
|
9853
9853
|
return int(valu, 0)
|
|
9854
9854
|
except ValueError as e:
|
|
9855
|
-
mesg = f'Failed to make an integer from {valu
|
|
9855
|
+
mesg = f'Failed to make an integer from {s_common.trimText(repr(valu))}.'
|
|
9856
9856
|
raise s_exc.BadCast(mesg=mesg) from e
|
|
9857
9857
|
|
|
9858
9858
|
try:
|
|
9859
9859
|
return int(valu)
|
|
9860
9860
|
except Exception as e:
|
|
9861
|
-
mesg = f'Failed to make an integer from {valu
|
|
9861
|
+
mesg = f'Failed to make an integer from {s_common.trimText(repr(valu))}.'
|
|
9862
9862
|
raise s_exc.BadCast(mesg=mesg) from e
|
|
9863
9863
|
|
|
9864
9864
|
async def toiter(valu, noneok=False):
|
|
@@ -9877,7 +9877,7 @@ async def toiter(valu, noneok=False):
|
|
|
9877
9877
|
async for item in agen:
|
|
9878
9878
|
yield item
|
|
9879
9879
|
except TypeError as e:
|
|
9880
|
-
mesg = f'Value is not iterable: {valu
|
|
9880
|
+
mesg = f'Value is not iterable: {s_common.trimText(repr(valu))}'
|
|
9881
9881
|
raise s_exc.StormRuntimeError(mesg=mesg) from e
|
|
9882
9882
|
|
|
9883
9883
|
async def torepr(valu, usestr=False):
|
synapse/lib/version.py
CHANGED
|
@@ -223,6 +223,6 @@ def reqVersion(valu, reqver,
|
|
|
223
223
|
##############################################################################
|
|
224
224
|
# The following are touched during the release process by bumpversion.
|
|
225
225
|
# Do not modify these directly.
|
|
226
|
-
version = (2, 195,
|
|
226
|
+
version = (2, 195, 1)
|
|
227
227
|
verstring = '.'.join([str(x) for x in version])
|
|
228
|
-
commit = '
|
|
228
|
+
commit = '83cc00aa05086cbc4dfec2f820db8f392c76a012'
|
synapse/tests/test_lib_nexus.py
CHANGED
|
@@ -318,7 +318,7 @@ class NexusTest(s_t_utils.SynTest):
|
|
|
318
318
|
cell01.nexsiden = 'newp'
|
|
319
319
|
with self.raises(s_exc.NoSuchIden) as cm:
|
|
320
320
|
await cell01.sync()
|
|
321
|
-
self.eq(cm.exception.get('mesg'),
|
|
321
|
+
self.eq(cm.exception.get('mesg'), "No Nexus Pusher with iden newp event='sync' args=() kwargs={}")
|
|
322
322
|
|
|
323
323
|
self.none(await cell00.nexsroot.nexslog.last())
|
|
324
324
|
self.none(await cell01.nexsroot.nexslog.last())
|
|
@@ -331,7 +331,7 @@ class NexusTest(s_t_utils.SynTest):
|
|
|
331
331
|
|
|
332
332
|
with self.raises(s_exc.NoSuchName) as cm:
|
|
333
333
|
await cell01._push('newp')
|
|
334
|
-
self.eq(cm.exception.get('mesg'), 'No
|
|
334
|
+
self.eq(cm.exception.get('mesg'), 'No event handler for event newp args=() kwargs={}')
|
|
335
335
|
|
|
336
336
|
self.eq(0, (await cell00.nexsroot.nexslog.last())[0])
|
|
337
337
|
self.eq(0, (await cell01.nexsroot.nexslog.last())[0])
|
|
@@ -379,3 +379,25 @@ class NexusTest(s_t_utils.SynTest):
|
|
|
379
379
|
self.isin(mesg, data)
|
|
380
380
|
|
|
381
381
|
self.true(restarted)
|
|
382
|
+
|
|
383
|
+
async def test_pusher_race(self):
|
|
384
|
+
|
|
385
|
+
evnt = asyncio.Event()
|
|
386
|
+
|
|
387
|
+
async with self.getTestCore() as core:
|
|
388
|
+
orig = core._nexshands['view:delwithlayer'][0]
|
|
389
|
+
|
|
390
|
+
async def holdlock(self, viewiden, layriden, nexsitem, newparent=None):
|
|
391
|
+
evnt.set()
|
|
392
|
+
await asyncio.sleep(1)
|
|
393
|
+
await orig(self, viewiden, layriden, nexsitem, newparent=newparent)
|
|
394
|
+
|
|
395
|
+
core._nexshands['view:delwithlayer'] = (holdlock, True)
|
|
396
|
+
|
|
397
|
+
forkiden = await core.callStorm('return($lib.view.get().fork().iden)')
|
|
398
|
+
|
|
399
|
+
core.schedCoro(core.delViewWithLayer(forkiden))
|
|
400
|
+
await asyncio.wait_for(evnt.wait(), timeout=10)
|
|
401
|
+
|
|
402
|
+
with self.raises(s_exc.NoSuchIden):
|
|
403
|
+
await core.nodes('[ it:dev:str=foo ]', opts={'view': forkiden})
|
|
@@ -123,7 +123,7 @@ synapse/lib/module.py,sha256=0XLFLzuZVmEqulKmdT0uah0oi1t8_f_ghakhqvoKtKI,4686
|
|
|
123
123
|
synapse/lib/modules.py,sha256=xHNrGBWLOSTSqn7GMMnm6iiw3Df-Q11h5gOUw84Ax7E,1282
|
|
124
124
|
synapse/lib/msgpack.py,sha256=IEYF1sv0UoYq1BpqfZUzf30bAlWveC6ZArXBeY68vuI,7895
|
|
125
125
|
synapse/lib/multislabseqn.py,sha256=WxJQm6XNINyGBTUnmSkY4iifxLlR_FZe3geOcT8BxR4,15211
|
|
126
|
-
synapse/lib/nexus.py,sha256=
|
|
126
|
+
synapse/lib/nexus.py,sha256=boP4T9Al_61EpW63OdMsAmn-P7T5YpN_rYiaCwz7n3Q,23399
|
|
127
127
|
synapse/lib/node.py,sha256=F3cDgnOdlaimjQrtNb2zGZeG8X2xg9FUQ0tAAp0bUsg,31049
|
|
128
128
|
synapse/lib/oauth.py,sha256=Nmd7dnxq7aRdBR5HILYYQm-TpCjfrTOIZwkHPeLQApA,15094
|
|
129
129
|
synapse/lib/output.py,sha256=MARscREHja4h8PQN7GZxHGvF36RoOkUyw3vfhmFzMTk,890
|
|
@@ -146,7 +146,7 @@ synapse/lib/storm_format.py,sha256=kXWFY0PC8z4IBDDXYBiN4xkWuz4rEG_RNl3U6p_ylpU,4
|
|
|
146
146
|
synapse/lib/stormctrl.py,sha256=3UC2LOHClC17JwYNuo8NeyntuAvIXphjenXEzVP33mY,2523
|
|
147
147
|
synapse/lib/stormhttp.py,sha256=GwSmdKbY3yFe8tgNazkUAPhmEwP2U2PJTbByPkHAXmk,28846
|
|
148
148
|
synapse/lib/stormsvc.py,sha256=dKREBhzYAncOXBbI-FYLRy9VusGIbRyF0TaDDz7mMXw,7581
|
|
149
|
-
synapse/lib/stormtypes.py,sha256=
|
|
149
|
+
synapse/lib/stormtypes.py,sha256=zAiVhAow2PWQNZYId2GqAMyDANJETG73OoGlWfARd2s,395029
|
|
150
150
|
synapse/lib/stormwhois.py,sha256=w7N2oCyMljNvi_sRt_bZb5BJwWwYkVGcRd7H_0oHY8Q,2554
|
|
151
151
|
synapse/lib/structlog.py,sha256=qiuD7TTdwCyYEDF2f-88G2iX54SuB-lJ1pqlYokL1r8,1303
|
|
152
152
|
synapse/lib/task.py,sha256=krDjQvNh0EpAs1PILK8CJJa9DMeM0depI0K8Eimp010,5733
|
|
@@ -157,7 +157,7 @@ synapse/lib/time.py,sha256=FKTYwpdvpuAj8p8sSodRjOxoA7Vu67CIbbXz55gtghk,9231
|
|
|
157
157
|
synapse/lib/trigger.py,sha256=mnfkoBHB88JfqPoxb5oflvAaBKZpNvYdxP247YS53fE,20697
|
|
158
158
|
synapse/lib/types.py,sha256=u89ukW38oDziRzeA6IWrPwwPD0Ds75u-gwJSXsQ4loY,69708
|
|
159
159
|
synapse/lib/urlhelp.py,sha256=j-DvWGi-xH0TcO0NbCuwG7guUuiV8wxIxfMyJOzDygo,2523
|
|
160
|
-
synapse/lib/version.py,sha256=
|
|
160
|
+
synapse/lib/version.py,sha256=Hug5WQOkn3bFD5KqMyQjSJF-NcWgJesHNFEXEjpd6mI,7162
|
|
161
161
|
synapse/lib/view.py,sha256=IxBTOrNumrjSXQhZrLqh2NTPpS2zOc8YFwC5VdoHURw,61843
|
|
162
162
|
synapse/lib/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
163
|
synapse/lib/crypto/coin.py,sha256=_dhlkzIrHT8BvHdJOWK7PDThz3sK3dDRnWAUqjRpZJc,4910
|
|
@@ -316,7 +316,7 @@ synapse/tests/test_lib_modelrev.py,sha256=DlHbhzrTKKjVEZaf6MynI4umeDFwXlmVpLKMLH
|
|
|
316
316
|
synapse/tests/test_lib_module.py,sha256=h2OyCW4HW-ZFiJBNQtZ-sPLjsnrlLdTFHQPaXpA8cds,3923
|
|
317
317
|
synapse/tests/test_lib_msgpack.py,sha256=_cS-Kzap6InQstBH0nCgFj9HoVO_tB2dj7D2zCa2miU,10056
|
|
318
318
|
synapse/tests/test_lib_multislabseqn.py,sha256=ujIp3VkFRhPURx3Js9nklXJ4aYup8UTrcLg7X96lrDs,17425
|
|
319
|
-
synapse/tests/test_lib_nexus.py,sha256=
|
|
319
|
+
synapse/tests/test_lib_nexus.py,sha256=qU8kPGuDb5cGHnJqcS-YYFjkX2yiWmwde0RqTmAQi44,16270
|
|
320
320
|
synapse/tests/test_lib_node.py,sha256=C4OPFTq5qhG9oZx9SPJZAlhb7zorKGywVyCro7fx0Yg,24709
|
|
321
321
|
synapse/tests/test_lib_output.py,sha256=iYt3DSEVvJiolIUkGKhATYqHbSk-N92swIr4p6lmzl0,603
|
|
322
322
|
synapse/tests/test_lib_platforms_linux.py,sha256=MgafTw5hq1ld9sKLREqf3LnmINk4Kdhz589jvE5NC0M,2556
|
|
@@ -608,8 +608,8 @@ synapse/vendor/xrpl/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
608
608
|
synapse/vendor/xrpl/tests/test_codec.py,sha256=Zwq6A5uZUK_FWDL3BA932c5b-rL3hnC6efobWHSLC4o,6651
|
|
609
609
|
synapse/vendor/xrpl/tests/test_main.py,sha256=kZQwWk7I6HrP-PMvLdsUUN4POvWD9I-iXDHOwdeF090,4299
|
|
610
610
|
synapse/vendor/xrpl/tests/test_main_test_cases.py,sha256=vTlUM4hJD2Hd2wCIdd9rfsvcMZZZQmNHWdCTTFeGz2Y,4221
|
|
611
|
-
synapse-2.195.
|
|
612
|
-
synapse-2.195.
|
|
613
|
-
synapse-2.195.
|
|
614
|
-
synapse-2.195.
|
|
615
|
-
synapse-2.195.
|
|
611
|
+
synapse-2.195.1.dist-info/LICENSE,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
|
|
612
|
+
synapse-2.195.1.dist-info/METADATA,sha256=WWaiuO-cJnS9jHZhGlJ61OC7ThsfbOuKp9rVBfhKf5c,4620
|
|
613
|
+
synapse-2.195.1.dist-info/WHEEL,sha256=5pBL_y1xgYbRv8URJNE-BCn6IBkqK0TW5FP9QHWct1c,93
|
|
614
|
+
synapse-2.195.1.dist-info/top_level.txt,sha256=v_1YsqjmoSCzCKs7oIhzTNmWtSYoORiBMv1TJkOhx8A,8
|
|
615
|
+
synapse-2.195.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|