vortexpy 4.0.18__tar.gz → 4.0.20__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.
- {vortexpy-4.0.18 → vortexpy-4.0.20}/PKG-INFO +1 -1
- {vortexpy-4.0.18 → vortexpy-4.0.20}/pyproject.toml +1 -1
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/DeferUtil.py +9 -2
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/Jsonable.py +8 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/SerialiseUtil.py +3 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/Tuple.py +20 -5
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexUtil.py +3 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/__init__.py +1 -1
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortexpy.egg-info/PKG-INFO +1 -1
- {vortexpy-4.0.18 → vortexpy-4.0.20}/LICENSE +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/README.md +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/setup.cfg +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/DataWrapTuple.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/Payload.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadEndpoint.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadEndpointTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadEnvelope.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadFilterKeys.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadIO.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadPriority.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadResponse.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadResponseTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PayloadTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/PerformTestActionTuple.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TestTuple.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleAction.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleActionVortex.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleDataForTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TuplePerfTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TuplePolymorphicTupleTypeFieldArgTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleRestfulTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleSelector.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/TupleTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexABC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexClientHttp.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexClientHttpTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexClientTcp.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexClientWebsocketFactory.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexConnectionABC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexFactory.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexPayloadProtocol.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexServer.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexServerConnection.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexServerHttpResource.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexServerTcp.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexServerWebsocket.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexTcpMemoryLeakPayloadTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexTcpMemoryLeakRawTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/VortexWritePushProducer.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/TupleDataLiveLockManager.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/TupleDataLoader.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/TupleDataLoaderDelegate.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/TupleDataLoaderTupleABC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/TupleDataLoaderTuples.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/data_loader/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/event_bus/TupleChangeEventABC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/event_bus/TupleChangeEventBus.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/event_bus/TupleChangeEventBusObserverABC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/event_bus/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleActionProcessor.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleActionProcessorProxy.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleActionProcessorTestHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataActionClient.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataObservableCache.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataObservableHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataObservableProxyHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataObservableTestHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/TupleDataObserverClient.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/VortexJSTupleLoaderTestHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/handler/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/GzippedDataHttpClient.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/GzippedDataHttpClientTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/GzippedPayloadHttpClient.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/RestfulHttpClient.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/RestfulHttpClientTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/RestfulResource.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/RestfulResourceTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/restful/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/rpc/RPC.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/rpc/RPCTest.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/rpc/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/sqla_orm/OrmCrudHandler.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/sqla_orm/TupleProviderForDb.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/sqla_orm/VortexTupleJson.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/sqla_orm/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/storage/TupleStorageSqlite.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortex/storage/__init__.py +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortexpy.egg-info/SOURCES.txt +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortexpy.egg-info/dependency_links.txt +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortexpy.egg-info/requires.txt +0 -0
- {vortexpy-4.0.18 → vortexpy-4.0.20}/vortexpy.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vortexpy"
|
|
7
|
-
version = "4.0.
|
|
7
|
+
version = "4.0.20"
|
|
8
8
|
authors = [{name = "Synerty", email = "contact@synerty.com"}]
|
|
9
9
|
description = "Synertys observable, routable, data serialisation and transport code."
|
|
10
10
|
keywords = [
|
|
@@ -154,16 +154,23 @@ def deferToThreadWrapWithLogger(
|
|
|
154
154
|
if inspect.isgenerator(result):
|
|
155
155
|
logger.error(
|
|
156
156
|
"Module Name %s, Class Name %s, Function Name %s"
|
|
157
|
-
" has a yield in it. IT SHOULD NOT
|
|
158
|
-
funcToWrap.__name__,
|
|
157
|
+
" has a yield in it. IT SHOULD NOT.",
|
|
159
158
|
funcToWrap.__module__,
|
|
160
159
|
funcToWrap.__class__.__name__,
|
|
160
|
+
funcToWrap.__name__,
|
|
161
161
|
)
|
|
162
162
|
raise YieldInDeferToThreadException()
|
|
163
163
|
return result
|
|
164
164
|
|
|
165
165
|
def func(*args, **kwargs):
|
|
166
166
|
if not twisted.python.threadable.isInIOThread() and checkMainThread:
|
|
167
|
+
logger.error(
|
|
168
|
+
"Module Name %s, Class Name %s, Function Name %s"
|
|
169
|
+
" is being deferred from a thread. IT SHOULD NOT.",
|
|
170
|
+
funcToWrap.__module__,
|
|
171
|
+
funcToWrap.__class__.__name__,
|
|
172
|
+
funcToWrap.__name__,
|
|
173
|
+
)
|
|
167
174
|
raise Exception(
|
|
168
175
|
"Deferring to a thread can only be done from the main thread"
|
|
169
176
|
)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Website : http://www.synerty.com
|
|
7
7
|
* Support : support@synerty.com
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
import logging
|
|
10
11
|
import traceback
|
|
11
12
|
import typing
|
|
@@ -199,6 +200,13 @@ class Jsonable(object):
|
|
|
199
200
|
|
|
200
201
|
# Tuple
|
|
201
202
|
if valueType == T_RAPUI_TUPLE:
|
|
203
|
+
if not Jsonable.JSON_TUPLE_TYPE in value:
|
|
204
|
+
raise Exception(
|
|
205
|
+
"Tuple is missing type field '_c',"
|
|
206
|
+
" if this is a javascript tuple,"
|
|
207
|
+
" ensure it's constructor calls super()"
|
|
208
|
+
)
|
|
209
|
+
|
|
202
210
|
tupleType = value[Jsonable.JSON_TUPLE_TYPE]
|
|
203
211
|
|
|
204
212
|
from .Tuple import TUPLE_TYPES_BY_NAME
|
|
@@ -61,6 +61,9 @@ V_TRUE = "1"
|
|
|
61
61
|
V_FALSE = "0"
|
|
62
62
|
|
|
63
63
|
ISO8601_ORA = "YYYY-MM-DD HH24:MI:SS.FF6"
|
|
64
|
+
|
|
65
|
+
# This will print a date using TO_CHAR(), in the format fromStr() below expects
|
|
66
|
+
ISO8601_ORA_WITH_TZ = "YYYY-MM-DD HH24:MI:SS.FF6TZHTZM"
|
|
64
67
|
ISO8601 = "%Y-%m-%d %H:%M:%S.%f%z"
|
|
65
68
|
ISO8601_JS_REGEXP = r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}[Z]{1}"
|
|
66
69
|
ISO8601_JS_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Website : http://www.synerty.com
|
|
7
7
|
* Support : support@synerty.com
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
import inspect
|
|
10
11
|
import json
|
|
11
12
|
import logging
|
|
@@ -33,7 +34,6 @@ from .SerialiseUtil import convertFromWkbElement
|
|
|
33
34
|
|
|
34
35
|
logger = logging.getLogger(__name__)
|
|
35
36
|
|
|
36
|
-
|
|
37
37
|
TUPLE_TYPES: list[Type["Tuple"]] = []
|
|
38
38
|
TUPLE_TYPES_BY_NAME: Dict[str, Type["Tuple"]] = {}
|
|
39
39
|
TUPLE_TYPES_BY_SHORT_NAME: Dict[str, Type["Tuple"]] = {}
|
|
@@ -611,6 +611,21 @@ class _TupleToPlainJsonMixin:
|
|
|
611
611
|
extraTypeHint = getExtraTypeHint(fieldName)
|
|
612
612
|
validator = getFieldValidatorFromExtraHint(extraTypeHint)
|
|
613
613
|
|
|
614
|
+
# If a value is not provided, but is required
|
|
615
|
+
# Get the tupleField,
|
|
616
|
+
# if it has and has a defaultValue
|
|
617
|
+
# Then assign the default value
|
|
618
|
+
if value is None and not (type(None) in get_args(typeHint)):
|
|
619
|
+
tupleField = getattr(TupleClass, fieldName, None)
|
|
620
|
+
if (
|
|
621
|
+
isinstance(tupleField, TupleField)
|
|
622
|
+
and tupleField.defaultValue is not None
|
|
623
|
+
):
|
|
624
|
+
value = tupleField.defaultValue
|
|
625
|
+
|
|
626
|
+
# Cleanup, this is a long function
|
|
627
|
+
del tupleField
|
|
628
|
+
|
|
614
629
|
if (
|
|
615
630
|
isinstance(value, str)
|
|
616
631
|
and datetime is typeHint
|
|
@@ -681,10 +696,10 @@ class _TupleToPlainJsonMixin:
|
|
|
681
696
|
f" {valueTypeHint}, got {type(value)} instead"
|
|
682
697
|
)
|
|
683
698
|
|
|
684
|
-
data[
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
699
|
+
data[key] = (
|
|
700
|
+
TupleClass.restfulJsonDictToTupleWithValidation(
|
|
701
|
+
item, valueTypeHint
|
|
702
|
+
)
|
|
688
703
|
)
|
|
689
704
|
|
|
690
705
|
else:
|
|
@@ -241,6 +241,7 @@ def debounceCall(debounceSeconds: float):
|
|
|
241
241
|
|
|
242
242
|
# Create a hash of the args
|
|
243
243
|
hashedArgs = self.__wrapArgsAndKwargs(args, kwargs)
|
|
244
|
+
self.__cleanup()
|
|
244
245
|
|
|
245
246
|
# If this method has never been called before, call it
|
|
246
247
|
lastCallDate = self._calls.get(hashedArgs)
|
|
@@ -275,6 +276,8 @@ def debounceCall(debounceSeconds: float):
|
|
|
275
276
|
**kwargs,
|
|
276
277
|
)
|
|
277
278
|
|
|
279
|
+
return
|
|
280
|
+
|
|
278
281
|
return
|
|
279
282
|
|
|
280
283
|
def wrap(f):
|
|
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
|
|
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
|
|
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
|