holado 0.2.7__py3-none-any.whl → 0.2.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.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- {holado-0.2.7.dist-info → holado-0.2.8.dist-info}/METADATA +4 -1
- {holado-0.2.7.dist-info → holado-0.2.8.dist-info}/RECORD +24 -22
- holado_core/common/tables/table.py +2 -2
- holado_core/common/tools/string_tools.py +9 -0
- holado_core/tests/behave/steps/common/tables_steps.py +9 -2
- holado_helper/script/action.py +16 -7
- holado_python/standard_library/socket/blocking_socket.py +86 -29
- holado_python/standard_library/socket/echo_server.py +4 -3
- holado_python/standard_library/socket/message_socket.py +59 -20
- holado_python/standard_library/socket/non_blocking_socket.py +58 -60
- holado_python/standard_library/socket/socket.py +149 -22
- holado_python/tests/behave/steps/standard_library/socket_steps.py +15 -3
- holado_python/tests/behave/steps/standard_library/ssl_steps.py +1 -1
- holado_scripting/text/interpreter/functions/function_apply_function.py +60 -0
- holado_scripting/text/interpreter/functions/function_to_string.py +50 -0
- holado_scripting/text/interpreter/text_interpreter.py +4 -0
- holado_test/scenario/step_tools.py +4 -3
- holado_value/common/tables/value_table_cell.py +5 -0
- holado_value/common/tables/value_table_row.py +0 -1
- holado_value/common/tools/value.py +5 -1
- test_holado/features/NonReg/holado_python/standard_library/socket.feature +62 -0
- test_holado/features/NonReg/holado_python/standard_library/socket_with_ssl.feature +77 -1
- {holado-0.2.7.dist-info → holado-0.2.8.dist-info}/WHEEL +0 -0
- {holado-0.2.7.dist-info → holado-0.2.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: holado
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: HolAdo framework
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/holado_framework/python
|
|
6
6
|
Project-URL: Issues, https://gitlab.com/holado_framework/python/-/issues
|
|
@@ -53,6 +53,9 @@ Requires-Dist: moto; extra == 's3'
|
|
|
53
53
|
Provides-Extra: sftp
|
|
54
54
|
Requires-Dist: pysftp; extra == 'sftp'
|
|
55
55
|
Requires-Dist: sftpserver; extra == 'sftp'
|
|
56
|
+
Provides-Extra: ssl
|
|
57
|
+
Requires-Dist: certifi; extra == 'ssl'
|
|
58
|
+
Requires-Dist: pip-system-certs; extra == 'ssl'
|
|
56
59
|
Provides-Extra: ws-suds
|
|
57
60
|
Requires-Dist: suds; extra == 'ws-suds'
|
|
58
61
|
Provides-Extra: ws-zeep
|
|
@@ -102,7 +102,7 @@ holado_core/common/resource/persisted_method_to_call_manager.py,sha256=M_1G8OKwO
|
|
|
102
102
|
holado_core/common/resource/resource_manager.py,sha256=3UmKaZGfCGJUJ9EvwHibuf6ILANshl6zVK6CkGDrtwo,7182
|
|
103
103
|
holado_core/common/tables/__init__.py,sha256=i2-gExPOUa_AnmEPgZJQ2lAXeK02PLpPnjEqbsgj1Co,8
|
|
104
104
|
holado_core/common/tables/enums.py,sha256=YtYTSI1m6KQ3XFzOSFPi5De6Jc-nkDMTbnmqfRfsiJ0,1395
|
|
105
|
-
holado_core/common/tables/table.py,sha256=
|
|
105
|
+
holado_core/common/tables/table.py,sha256=VV-68K0J7lzgWpmzesYdU3-ZrkmaIfu9eIYlNhAA02c,10252
|
|
106
106
|
holado_core/common/tables/table_cell.py,sha256=O7pfDg1MVZOOgU_sQ3MkWDtT2VJGJwCHbiyTXvdvVmI,5036
|
|
107
107
|
holado_core/common/tables/table_manager.py,sha256=cKS8JM2JSaN6O38e71kIkRjsfgn8QVPXcs24BZfTN-U,17200
|
|
108
108
|
holado_core/common/tables/table_row.py,sha256=t0c9IS3F2DSuewl6obkfC3tHeI-AsdNAHArQoLf9jyM,6662
|
|
@@ -126,7 +126,7 @@ holado_core/common/tables/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
|
126
126
|
holado_core/common/tables/converters/table_converter.py,sha256=lFt1NKFo5aMPMpKQi_krBdVYUlm8zEg3JbDOy4bwWyA,8200
|
|
127
127
|
holado_core/common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
128
|
holado_core/common/tools/path_manager.py,sha256=dgdm8wAaVubh-krpquCXXeGUTtGqRKDpuEKmvhA9dKA,8899
|
|
129
|
-
holado_core/common/tools/string_tools.py,sha256=
|
|
129
|
+
holado_core/common/tools/string_tools.py,sha256=bQuMlI_yS7OoSPFL7qyfyXkrnjC8xHVpIsfmEC6JxhI,5590
|
|
130
130
|
holado_core/common/tools/tools.py,sha256=N-MfdMPYQs2BVnX4QWgop5PflzanboHjOeKgoSmpB1o,9062
|
|
131
131
|
holado_core/common/tools/comparators/comparator.py,sha256=K4LcXIRORHX5vkmDibI6P6Bu1L-6Xezb63ZzzOMKrWY,6812
|
|
132
132
|
holado_core/common/tools/comparators/object_comparator.py,sha256=RPI319h_tij6z75UVbZII3gBggQolRFMNMD4cN6z37Y,1399
|
|
@@ -138,7 +138,7 @@ holado_core/tests/behave/steps/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
138
138
|
holado_core/tests/behave/steps/common/common_steps.py,sha256=SAsi_UD9khKfXfS23IEQIPp4sTLG4EkDXrjc-9a9yDg,6295
|
|
139
139
|
holado_core/tests/behave/steps/common/config_steps.py,sha256=fuV-83Aol9J92Ho9c-bt48G6ARbTM0vyfritQo-GpvY,1910
|
|
140
140
|
holado_core/tests/behave/steps/common/resource_steps.py,sha256=FPQpN6I-vsxIkqTOSyB9i8P7oyg7Mf1XepHiPzmrlMk,3030
|
|
141
|
-
holado_core/tests/behave/steps/common/tables_steps.py,sha256=
|
|
141
|
+
holado_core/tests/behave/steps/common/tables_steps.py,sha256=XWd_VXEtL4Joa-8KKYE5hERlmypqUbRQK05d_QdF9b8,26856
|
|
142
142
|
holado_core/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
143
|
holado_core/tools/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
144
144
|
holado_core/tools/abstracts/blocking_command_service.py,sha256=8EFNQZONFw1jeGAG7gJ59FmookKkjiC4IYkk2UTsbSs,2603
|
|
@@ -196,7 +196,7 @@ holado_helper/docker/run_terminal_in_docker.sh,sha256=GOOhbo9cEjw5Pp5BlhbzZm2U5X
|
|
|
196
196
|
holado_helper/holado_module_template/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
197
197
|
holado_helper/holado_module_template/test/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
198
198
|
holado_helper/holado_module_template/test/behave/steps/private/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
199
|
-
holado_helper/script/action.py,sha256=
|
|
199
|
+
holado_helper/script/action.py,sha256=YPLS-3Ot-bti9d6VxilW5PwfYCU64hFd1qK1d2XepFY,6187
|
|
200
200
|
holado_helper/script/action_script.py,sha256=6yhb7M9aGe6jbqA4APa2rc3zC3INXvNTZjpGXDWMBug,22543
|
|
201
201
|
holado_helper/script/any_action_script.py,sha256=6P1bG3UoSO0JVS6kWaDGd4jP7MN-foiThRcVitW3Hjg,7901
|
|
202
202
|
holado_helper/script/behave_action_script.py,sha256=DwIRdHrRBM9qcLxoSx0vtyy3RX308g8bRlLT-UAqimM,5148
|
|
@@ -272,11 +272,11 @@ holado_python/standard_library/hashlib.py,sha256=si-j4L7OJa-oGdoo1lKy4VFeqs7oYqj
|
|
|
272
272
|
holado_python/standard_library/multiprocessing.py,sha256=vThmJzdDTtdFyGUL3i3evmt2JBUK-jrorKbEtQ7TSFU,2786
|
|
273
273
|
holado_python/standard_library/queue.py,sha256=RIFid85_CMFmanpt61LSaYqeHdlFwAuhcpBhxgyWj_o,3059
|
|
274
274
|
holado_python/standard_library/typing.py,sha256=8F9Iolh-c9GbDGlNr3V6uPdTEhSBdkLQu46oVwHPYKk,7693
|
|
275
|
-
holado_python/standard_library/socket/blocking_socket.py,sha256=
|
|
276
|
-
holado_python/standard_library/socket/echo_server.py,sha256=
|
|
277
|
-
holado_python/standard_library/socket/message_socket.py,sha256=
|
|
278
|
-
holado_python/standard_library/socket/non_blocking_socket.py,sha256=
|
|
279
|
-
holado_python/standard_library/socket/socket.py,sha256=
|
|
275
|
+
holado_python/standard_library/socket/blocking_socket.py,sha256=LHDBlK2r6tgpNTzUpYiG55QZMpjQ9seGarQMct6s5ZU,9292
|
|
276
|
+
holado_python/standard_library/socket/echo_server.py,sha256=ntApbwcckiEEBw-qjE487An81i4IEVFRPkoFbUrcCL4,1793
|
|
277
|
+
holado_python/standard_library/socket/message_socket.py,sha256=yceHseE5JyOH-dzWRvXrrrIzhCY-nyQLGIc78_FrPIs,5396
|
|
278
|
+
holado_python/standard_library/socket/non_blocking_socket.py,sha256=PHTTwzVkOHpGEGD4kKHdOm8S38y--BXBstqO33O4paA,6924
|
|
279
|
+
holado_python/standard_library/socket/socket.py,sha256=TKxgN9EXes9VfiGQ9q7k25dmrNzQpoajFimRJSATa4M,11145
|
|
280
280
|
holado_python/standard_library/ssl/ssl.py,sha256=9HMOo7YrUWLfgTtPbN1oNDZuGdEPeq8gum85LDpK-l4,4051
|
|
281
281
|
holado_python/standard_library/ssl/resources/certificates/NOTES.txt,sha256=7VKjsrIAwxKtRrzul_4TKGQtknNBbFOeuLUc1lhkHNg,383
|
|
282
282
|
holado_python/standard_library/ssl/resources/certificates/localhost.crt,sha256=iLmZpDuOQVawUlbZkb72g2-uv1c4SAmRJOrm4Th5anY,1123
|
|
@@ -290,8 +290,8 @@ holado_python/tests/behave/steps/standard_library/datetime_steps.py,sha256=1XZ2D
|
|
|
290
290
|
holado_python/tests/behave/steps/standard_library/hashlib_steps.py,sha256=TI1WXL0nDU6p7ri7VotOK57IssBH8cKuFq3T61ip9Nc,2958
|
|
291
291
|
holado_python/tests/behave/steps/standard_library/multiprocessing_steps.py,sha256=uMiDMuIDfsVc5QVTJqUEqi4Rt9LutAUTqGsrm95JJyY,2498
|
|
292
292
|
holado_python/tests/behave/steps/standard_library/queue_steps.py,sha256=sKpExnfOxDO7NXQGVFNVy9KY_lOVK-2EZtd5nEIEiUM,17408
|
|
293
|
-
holado_python/tests/behave/steps/standard_library/socket_steps.py,sha256=
|
|
294
|
-
holado_python/tests/behave/steps/standard_library/ssl_steps.py,sha256=
|
|
293
|
+
holado_python/tests/behave/steps/standard_library/socket_steps.py,sha256=VNzUOnCDY7RJVeBuzV46nRxvZnePKuRejXnjcep202k,11912
|
|
294
|
+
holado_python/tests/behave/steps/standard_library/ssl_steps.py,sha256=06vlvf8cwfi4lQe6q3OyZUZIBvbgcl1-ItiT5v5-GjA,3256
|
|
295
295
|
holado_rabbitmq/__init__.py,sha256=4QWQhcore0gjLpI72i3m9CZpNP4RyvT-qiNUdP6AkCU,1770
|
|
296
296
|
holado_rabbitmq/tests/behave/steps/__init__.py,sha256=l-VWY2Qv9f-9ZoPmWjUmeurF8kayJCDMReHsCRwNwYc,1332
|
|
297
297
|
holado_rabbitmq/tests/behave/steps/tools/rabbitmq_client_steps.py,sha256=H5_r6LKaw_ElmmjcghZMT5KQInoJrdYNOtATh8GG3MQ,28833
|
|
@@ -358,8 +358,9 @@ holado_scripting/tests/behave/steps/scenario/loop_steps.py,sha256=2D7knm_i8XzUuj
|
|
|
358
358
|
holado_scripting/text/base/base_function.py,sha256=GX-xVt5dhPQipRkgJ5J9Un-0GhK1NOt_fMOrcs_THB8,1469
|
|
359
359
|
holado_scripting/text/base/base_verify_function.py,sha256=7ivJ-Om9o5KB1pBoh4MU5UZYb40msHvnuEdgKK7EWdg,1494
|
|
360
360
|
holado_scripting/text/base/text_inspecter.py,sha256=Hw7aU7vShmVRwPFcChhrm9rbTYHeUzokPTbUSxXGDJg,8981
|
|
361
|
-
holado_scripting/text/interpreter/text_interpreter.py,sha256=
|
|
361
|
+
holado_scripting/text/interpreter/text_interpreter.py,sha256=qCjt23b7Q7ayoz-T1H_U_p301sTlggE6-dRP5rOp9kg,12596
|
|
362
362
|
holado_scripting/text/interpreter/exceptions/interpreter_exception.py,sha256=hvfe1gExRlvsNLfUCghKJwYBdsjVFzqquBhx3J3aFTg,1611
|
|
363
|
+
holado_scripting/text/interpreter/functions/function_apply_function.py,sha256=gNpLXIl-xecMIG9EOCJMO5hz0D6ceBqnjqhu2IZ6gvQ,3020
|
|
363
364
|
holado_scripting/text/interpreter/functions/function_cast.py,sha256=EvOWrb949y6rqbf7gHnX-sId3gVmE1eduYWAq58tdg0,3033
|
|
364
365
|
holado_scripting/text/interpreter/functions/function_convert.py,sha256=a2dYdKcMTKEQFr_ZbowTDcGYlMHB_0hGrAry0OKmfz8,2949
|
|
365
366
|
holado_scripting/text/interpreter/functions/function_dynamic_value.py,sha256=zBnIsSWwYgXeiYsAYzjUds6V2ab85jDKUgE90JqKxsY,2230
|
|
@@ -370,6 +371,7 @@ holado_scripting/text/interpreter/functions/function_hex_to_int.py,sha256=LJQvYn
|
|
|
370
371
|
holado_scripting/text/interpreter/functions/function_to_base_64.py,sha256=BfOmPN8xNUZl2uBjGWdKwy0oHuYWlhg7ws4_CK514g0,2197
|
|
371
372
|
holado_scripting/text/interpreter/functions/function_to_bytes.py,sha256=EIEgzNKd5YC5uHf5VVFIsW4MVuLsgll9PwKBGSp9b7E,2577
|
|
372
373
|
holado_scripting/text/interpreter/functions/function_to_hex.py,sha256=sETE1PeK1Yu3G3gjMdJT7KNUa-8g6wJBKNa-mZhSrq4,2439
|
|
374
|
+
holado_scripting/text/interpreter/functions/function_to_string.py,sha256=InOdqtL7NMLyzUygLWhuMB2r7_Zrrndlu7onuQc9mhA,2579
|
|
373
375
|
holado_scripting/text/verifier/text_verifier.py,sha256=fdQss_GOavE9WTFD1MQfBRrWVgLNJYeUE9wVJtsmvNA,4959
|
|
374
376
|
holado_scripting/text/verifier/exceptions/verifier_exception.py,sha256=4zA5YnJ8IoLMAj32EIiaZUAidtazEKoCxyDYoZhBAGw,1459
|
|
375
377
|
holado_scripting/text/verifier/functions/verify_function_extract_in.py,sha256=5T0PxObLzn5pl29QwrAfaIVWIzd-UkJRFM93njQfAZM,2047
|
|
@@ -412,7 +414,7 @@ holado_test/common/context/feature_context.py,sha256=GhC0lihnvTBhv5tE4JzPt39eP7g
|
|
|
412
414
|
holado_test/common/context/scenario_context.py,sha256=pmo-xGtn6oHtbTmcH6Vtp8Dj2iGrYVdHd0b6smtlhbY,10527
|
|
413
415
|
holado_test/common/context/step_context.py,sha256=j6S4ozTPrdlpV9Slopc998fYOV8KfMLAUSW4mcEFUI8,2383
|
|
414
416
|
holado_test/common/exceptions/undefined_step_exception.py,sha256=SHHX22iz4Ip-V4Y3aM2EJFDt30CCS5EaauN6KB-JORo,1461
|
|
415
|
-
holado_test/scenario/step_tools.py,sha256=
|
|
417
|
+
holado_test/scenario/step_tools.py,sha256=E4njtSDf11cD0ZMnNEUlIaqx5Xgzl6dLx5_YQcDodL8,25552
|
|
416
418
|
holado_test/scenario/tester_tools.py,sha256=GB2AV_T1lluiNZtt5_cAhstEenhIeHC48x-hkK337Uk,2369
|
|
417
419
|
holado_test/tests/behave/steps/__init__.py,sha256=rdqrp-UN7vRplIqORx4sXyKwMUkptRizyLWudsmYehM,1362
|
|
418
420
|
holado_test/tests/behave/steps/scenario/exception_steps.py,sha256=ayMUmIJI4a7w95RL2NYiBWA8jSBwKyjdaRJL3IKdYQ0,4033
|
|
@@ -420,9 +422,9 @@ holado_test/tests/behave/steps/scenario/scenario_steps.py,sha256=TPLpatwXrY_Dd71
|
|
|
420
422
|
holado_test/tests/behave/steps/scenario/tester_steps.py,sha256=4mJA6CjyHvQmRv7P_bt8k6SrTr_zrc4AetuSB35Wsow,2896
|
|
421
423
|
holado_value/__init__.py,sha256=60VyLyWux76dFwn03uH4Fz3R6itf6fqKu0pQUdvwblU,1561
|
|
422
424
|
holado_value/common/tables/value_table.py,sha256=fJgb-HWdlMwHOAx5CS38sPiVrjGelEiQBbG9HuHqe-A,1726
|
|
423
|
-
holado_value/common/tables/value_table_cell.py,sha256=
|
|
425
|
+
holado_value/common/tables/value_table_cell.py,sha256=vCL8uSTEKOpI9G5f0epgJMArFxQidfWTCRHBZbdrsjc,3344
|
|
424
426
|
holado_value/common/tables/value_table_manager.py,sha256=1Q7V9RQyJrI5V7GfVcAn2MC_EZ494WeTgO7XvB7wtq8,3000
|
|
425
|
-
holado_value/common/tables/value_table_row.py,sha256=
|
|
427
|
+
holado_value/common/tables/value_table_row.py,sha256=tA8D5rMNBMa2JKumM9ST3qn-MyPrjomS0Fms67OwcyY,2482
|
|
426
428
|
holado_value/common/tables/value_table_with_header.py,sha256=6uHR05tUD_EmPz-Qv8ul3kmQ55VjFKIj2G6jGkjXZyU,1763
|
|
427
429
|
holado_value/common/tables/comparators/table_2_value_table_cell_comparator.py,sha256=gYYxEfey_xRp80VahqGF5N0RDIvT-NqCslTXTId_3Vw,10423
|
|
428
430
|
holado_value/common/tables/comparators/table_2_value_table_comparator.py,sha256=rITxTgXami05plxk1qaCVqDcwZaKWoXpKAzur4ingTE,1807
|
|
@@ -430,7 +432,7 @@ holado_value/common/tables/comparators/table_2_value_table_row_comparator.py,sha
|
|
|
430
432
|
holado_value/common/tables/comparators/table_2_value_table_with_header_comparator.py,sha256=VKwA7PbXnE-gFSKWlDCsJv0tkWVuNY-C4aWt2tyIybE,1911
|
|
431
433
|
holado_value/common/tables/converters/value_table_converter.py,sha256=L0XIMxXv09fgcB6aJ8Wjg8FUw70PJ8A66ZBvBcA-P0o,9790
|
|
432
434
|
holado_value/common/tools/unique_value_manager.py,sha256=UXKdDKWznp4auYKQeWB7zYEzfm_0GxAiGfyoFM5ZM3s,5223
|
|
433
|
-
holado_value/common/tools/value.py,sha256=
|
|
435
|
+
holado_value/common/tools/value.py,sha256=BwAx9L_xHA-v4K55osnXjI9z9bQn_MKQ8Cvk3mhqBjA,9108
|
|
434
436
|
holado_value/common/tools/value_types.py,sha256=7nJp5D7xdoT9jMeeOxHIuPRykDyI9fXpve37ndK32gs,1801
|
|
435
437
|
holado_value/tests/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
436
438
|
holado_value/tests/behave/steps/private/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
|
|
@@ -465,8 +467,8 @@ test_holado/features/NonReg/holado_binary/bit_series.feature,sha256=_FS1JMDFtt3L
|
|
|
465
467
|
test_holado/features/NonReg/holado_protobuf/protobuf.feature,sha256=5PjD4R_ow3lMwWNFuemGZ6J0_A2_pzn-oNY4aV-wsGg,11857
|
|
466
468
|
test_holado/features/NonReg/holado_python/convert.feature,sha256=rVBWdy43UbWNfnBB_mENQwN6ArdcxJ5fN2C2nPKihhE,498
|
|
467
469
|
test_holado/features/NonReg/holado_python/iterable.feature,sha256=dqdkCYM1xsWWOBowCpW7t6hG2ZBWHS4NqrFgfgcKp7Q,1574
|
|
468
|
-
test_holado/features/NonReg/holado_python/standard_library/socket.feature,sha256=
|
|
469
|
-
test_holado/features/NonReg/holado_python/standard_library/socket_with_ssl.feature,sha256=
|
|
470
|
+
test_holado/features/NonReg/holado_python/standard_library/socket.feature,sha256=qNncGlJCOGz_fad8QeLhToX743nZNZcEe--mjHbMg3I,5313
|
|
471
|
+
test_holado/features/NonReg/holado_python/standard_library/socket_with_ssl.feature,sha256=FZRZVGlmRBvikX915R3AQ4GDVhOSGo-K2fFfM7wTPoo,10812
|
|
470
472
|
test_holado/features/NonReg/holado_scripting/common/tools/dynamic_text_manager.feature,sha256=z4OEQ_Mk_XX58rStfWHpXWq07FKRgF43AcgRkOCxDhI,452
|
|
471
473
|
test_holado/features/NonReg/holado_scripting/common/tools/expression_evaluator.feature,sha256=QBjeF-V_PjAXEog2npCspor9YMxEcW9pS0KgaKNVG8A,5396
|
|
472
474
|
test_holado/features/NonReg/holado_scripting/common/tools/variable_manager.feature,sha256=EeGskI6KVgIPzfZvL-bncASwXcSKb6PDu1mRDcpd5vE,2006
|
|
@@ -530,7 +532,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
530
532
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
531
533
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
532
534
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
533
|
-
holado-0.2.
|
|
534
|
-
holado-0.2.
|
|
535
|
-
holado-0.2.
|
|
536
|
-
holado-0.2.
|
|
535
|
+
holado-0.2.8.dist-info/METADATA,sha256=r5NOLjSm0RPD6yvuN6OD-fLNRK1Wkxv2UD4QcHxXsUY,5903
|
|
536
|
+
holado-0.2.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
537
|
+
holado-0.2.8.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
538
|
+
holado-0.2.8.dist-info/RECORD,,
|
|
@@ -66,10 +66,10 @@ class Table(object):
|
|
|
66
66
|
return result
|
|
67
67
|
|
|
68
68
|
def __repr__(self)->str:
|
|
69
|
-
if self.nb_rows * self.nb_columns < 100:
|
|
69
|
+
if self.nb_rows < 10 or self.nb_rows * self.nb_columns < 100:
|
|
70
70
|
return f"<{self.__class__.__name__}>({self.nb_rows}x{self.nb_columns})\n{self.represent()}"
|
|
71
71
|
else:
|
|
72
|
-
return f"<{self.__class__.__name__}>({self.nb_rows}x{self.nb_columns})"
|
|
72
|
+
return f"<{self.__class__.__name__}>({self.nb_rows}x{self.nb_columns})\n{self.represent(limit_rows=10)}[...]"
|
|
73
73
|
|
|
74
74
|
@property
|
|
75
75
|
def content(self):
|
|
@@ -131,5 +131,14 @@ class StrTools(object):
|
|
|
131
131
|
res = res.upper()
|
|
132
132
|
|
|
133
133
|
return res
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def to_string(cls, src):
|
|
137
|
+
if isinstance(src, bytes):
|
|
138
|
+
return src.decode('utf-8')
|
|
139
|
+
elif isinstance(src, str):
|
|
140
|
+
return src
|
|
141
|
+
else:
|
|
142
|
+
return str(src)
|
|
134
143
|
|
|
135
144
|
|
|
@@ -37,6 +37,7 @@ from holado_core.common.tools.converters.converter import Converter
|
|
|
37
37
|
from holado_test.behave.scenario.behave_step_tools import BehaveStepTools
|
|
38
38
|
from holado_value.common.tables.converters.value_table_converter import ValueTableConverter
|
|
39
39
|
from holado_python.standard_library.typing import Typing
|
|
40
|
+
from holado_value.common.tables.value_table_manager import ValueTableManager
|
|
40
41
|
|
|
41
42
|
logger = logging.getLogger(__name__)
|
|
42
43
|
|
|
@@ -317,6 +318,7 @@ def step_impl(context, var_name, table_varname, col_name):
|
|
|
317
318
|
col_name = StepTools.evaluate_scenario_parameter(col_name)
|
|
318
319
|
|
|
319
320
|
res_table = copy.copy(table)
|
|
321
|
+
is_value_table = ValueTableManager.is_value_table(res_table)
|
|
320
322
|
col = res_table.get_column(name=col_name)
|
|
321
323
|
|
|
322
324
|
tr_indexes = table_replace.get_column_indexes_by_string_content()
|
|
@@ -328,8 +330,10 @@ def step_impl(context, var_name, table_varname, col_name):
|
|
|
328
330
|
cell_rep_value = row_replace[tr_indexes["Replace Value"]] if "Replace Value" in tr_indexes else None
|
|
329
331
|
|
|
330
332
|
if cell_cond_value is not None:
|
|
333
|
+
# If condition value is 'DEFAULT' or cell value is equal to condition value
|
|
331
334
|
cond = (cell_cond_value.content_type == ValueTypes.Symbol and cell_cond_value.content == 'DEFAULT'
|
|
332
|
-
or cell_cond_value.value_type != ValueTypes.NotApplicable
|
|
335
|
+
or cell_cond_value.value_type != ValueTypes.NotApplicable
|
|
336
|
+
and (is_value_table and cell.value == cell_cond_value.value or not is_value_table and cell.content == cell_cond_value.value) )
|
|
333
337
|
elif cell_cond_expr is not None:
|
|
334
338
|
cond = tcell_comparator.equals(cell, cell_cond_expr, raise_exception = False)
|
|
335
339
|
else:
|
|
@@ -339,7 +343,10 @@ def step_impl(context, var_name, table_varname, col_name):
|
|
|
339
343
|
if cell_rep_value.value_type != ValueTypes.NotApplicable:
|
|
340
344
|
# Note: As 'col' is created with a copy of 'res_table' cells, 'cell' is also a 'res_table' cell.
|
|
341
345
|
# Thus, modifying 'cell' is modifying the cell in 'res_table'
|
|
342
|
-
|
|
346
|
+
if is_value_table:
|
|
347
|
+
cell.value = cell_rep_value.value
|
|
348
|
+
else:
|
|
349
|
+
cell.content = cell_rep_value.value
|
|
343
350
|
break
|
|
344
351
|
else:
|
|
345
352
|
continue
|
holado_helper/script/action.py
CHANGED
|
@@ -89,13 +89,22 @@ class BehaveActionRunner():
|
|
|
89
89
|
|
|
90
90
|
def __add_variable_values(self, res, params):
|
|
91
91
|
if params:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
if isinstance(params, dict):
|
|
93
|
+
for key, value in params.items():
|
|
94
|
+
self.__add_variable_value(res, key, value)
|
|
95
|
+
elif isinstance(params, list):
|
|
96
|
+
for key, value in params:
|
|
97
|
+
self.__add_variable_value(res, key, value)
|
|
98
|
+
else:
|
|
99
|
+
raise TechnicalException(f"Unexpected params type '{type(params)}'")
|
|
100
|
+
|
|
101
|
+
def __add_variable_value(self, res, var_name, value):
|
|
102
|
+
if var_name == 'STATUS':
|
|
103
|
+
return
|
|
104
|
+
if value is not_applicable:
|
|
105
|
+
res[var_name] = 'N/A'
|
|
106
|
+
else:
|
|
107
|
+
res[var_name] = value
|
|
99
108
|
|
|
100
109
|
def run(self):
|
|
101
110
|
logger.info(f"Processing action '{self.__action_info.action}' of index {self.__action_info.index}: {self.__action_info.params}")
|
|
@@ -16,6 +16,8 @@ import socket
|
|
|
16
16
|
from holado_python.standard_library.socket.socket import SocketClient, SocketServer
|
|
17
17
|
import abc
|
|
18
18
|
from holado_multitask.multithreading.loopfunctionthreaded import LoopFunctionThreaded
|
|
19
|
+
import time
|
|
20
|
+
from holado.common.handlers.undefined import undefined_argument
|
|
19
21
|
|
|
20
22
|
logger = logging.getLogger(__name__)
|
|
21
23
|
|
|
@@ -31,17 +33,79 @@ class BlockingSocketClient(SocketClient):
|
|
|
31
33
|
"""
|
|
32
34
|
__metaclass__ = abc.ABCMeta
|
|
33
35
|
|
|
34
|
-
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None):
|
|
35
|
-
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs)
|
|
36
|
+
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument, do_run_with_recv=True, do_run_with_send=True):
|
|
37
|
+
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay, do_run_with_recv=do_run_with_recv, do_run_with_send=do_run_with_send)
|
|
36
38
|
|
|
39
|
+
def start(self, *, read_bufsize=1024, read_kwargs=None, write_kwargs=None):
|
|
40
|
+
"""Start client event loop.
|
|
41
|
+
"""
|
|
42
|
+
if self.is_with_ssl:
|
|
43
|
+
# Set a small timeout, so that recv has a behaviour similar flag MSG_DONTWAIT
|
|
44
|
+
# See _process_recv_send implementation, recv flags are needed to be forced to 0
|
|
45
|
+
if self._idle_sleep_delay is not None:
|
|
46
|
+
self.internal_socket.settimeout(self._idle_sleep_delay)
|
|
47
|
+
else:
|
|
48
|
+
self.internal_socket.settimeout(0.01)
|
|
49
|
+
|
|
50
|
+
kwargs = {'read_bufsize':read_bufsize, 'read_kwargs':read_kwargs, 'write_kwargs':write_kwargs}
|
|
51
|
+
thread = LoopFunctionThreaded(self._process_recv_send, kwargs=kwargs, register_thread=True, delay_before_run_sec=None)
|
|
52
|
+
self._start_thread(thread)
|
|
53
|
+
|
|
54
|
+
def _process_recv_send(self, *, read_bufsize=1024, read_kwargs=None, write_kwargs=None):
|
|
55
|
+
has_activity = False
|
|
56
|
+
read_kwargs = read_kwargs if read_kwargs is not None else {}
|
|
57
|
+
write_kwargs = write_kwargs if write_kwargs is not None else {}
|
|
58
|
+
|
|
59
|
+
recv_data = None
|
|
60
|
+
if self.is_run_with_recv:
|
|
61
|
+
if self.is_with_ssl:
|
|
62
|
+
# ssl doesn't suppôrt flags != 0
|
|
63
|
+
flags = 0
|
|
64
|
+
else:
|
|
65
|
+
# Add flag to not wait data
|
|
66
|
+
flags = read_kwargs.get('flags', 0)
|
|
67
|
+
flags |= socket.MSG_DONTWAIT
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
recv_data = self.internal_socket.recv(read_bufsize, flags)
|
|
71
|
+
except (BlockingIOError, TimeoutError):
|
|
72
|
+
# No data to read
|
|
73
|
+
pass
|
|
74
|
+
else:
|
|
75
|
+
if recv_data:
|
|
76
|
+
has_activity = True
|
|
77
|
+
with self._data_lock:
|
|
78
|
+
self._data.in_bytes += recv_data
|
|
79
|
+
if logger.isEnabledFor(logging.DEBUG):
|
|
80
|
+
logger.debug(f"[{self.name}] Received [{recv_data}] (type: {type(recv_data)} ; total: {len(self._data.in_bytes)})")
|
|
81
|
+
|
|
82
|
+
sent = None
|
|
83
|
+
if self.is_run_with_send:
|
|
84
|
+
with self._data_lock:
|
|
85
|
+
if self._data.out_bytes:
|
|
86
|
+
has_activity = True
|
|
87
|
+
sent = self.internal_socket.send(self._data.out_bytes)
|
|
88
|
+
if sent > 0:
|
|
89
|
+
self._data.out_bytes = self._data.out_bytes[sent:]
|
|
90
|
+
if logger.isEnabledFor(logging.DEBUG):
|
|
91
|
+
logger.debug(f"[{self.name}] Sent {sent} data (remaining to send: {len(self._data.out_bytes)})")
|
|
92
|
+
|
|
93
|
+
# Wait before next loop if no data was exchanged
|
|
94
|
+
if not has_activity and self._idle_sleep_delay is not None:
|
|
95
|
+
time.sleep(self._idle_sleep_delay)
|
|
96
|
+
|
|
97
|
+
def do_ssl_handshake(self):
|
|
98
|
+
if self.is_with_ssl:
|
|
99
|
+
self.internal_socket.do_handshake()
|
|
100
|
+
|
|
37
101
|
|
|
38
102
|
class TCPBlockingSocketClient(BlockingSocketClient):
|
|
39
103
|
"""
|
|
40
104
|
TCP socket client.
|
|
41
105
|
"""
|
|
42
106
|
|
|
43
|
-
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None):
|
|
44
|
-
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs)
|
|
107
|
+
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument, do_run_with_recv=True, do_run_with_send=True):
|
|
108
|
+
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay, do_run_with_recv=do_run_with_recv, do_run_with_send=do_run_with_send)
|
|
45
109
|
|
|
46
110
|
def create_ipv4_socket(self, host, port, **kwargs):
|
|
47
111
|
ssl_context, kwargs = self._new_ssl_context_if_required(**kwargs)
|
|
@@ -49,9 +113,12 @@ class TCPBlockingSocketClient(BlockingSocketClient):
|
|
|
49
113
|
sock = socket.create_connection((host, port), **kwargs)
|
|
50
114
|
|
|
51
115
|
if ssl_context:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
116
|
+
# do_handshake_on_connect = True
|
|
117
|
+
do_handshake_on_connect = False
|
|
118
|
+
sock = ssl_context.wrap_socket(sock, server_hostname=host, do_handshake_on_connect=do_handshake_on_connect)
|
|
119
|
+
self._set_internal_socket(sock, is_with_ssl=True, is_ssl_handshake_done_on_connect=do_handshake_on_connect)
|
|
120
|
+
else:
|
|
121
|
+
self._set_internal_socket(sock)
|
|
55
122
|
|
|
56
123
|
|
|
57
124
|
|
|
@@ -67,24 +134,16 @@ class BlockingSocketServer(SocketServer):
|
|
|
67
134
|
"""
|
|
68
135
|
__metaclass__ = abc.ABCMeta
|
|
69
136
|
|
|
70
|
-
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None):
|
|
71
|
-
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs)
|
|
72
|
-
|
|
73
|
-
self.__start_thread = None
|
|
137
|
+
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument):
|
|
138
|
+
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay)
|
|
74
139
|
|
|
75
140
|
def start(self, read_bufsize=1024, *, read_kwargs=None, write_kwargs=None):
|
|
76
141
|
"""Start server to wait a connection, and then listen data, process data, and send result.
|
|
77
142
|
Note: current implementation is simple and supports only one connection at a time.
|
|
78
143
|
"""
|
|
79
144
|
kwargs = {'read_bufsize':read_bufsize, 'read_kwargs':read_kwargs, 'write_kwargs':write_kwargs}
|
|
80
|
-
|
|
81
|
-
self.
|
|
82
|
-
|
|
83
|
-
def stop(self):
|
|
84
|
-
if self.__start_thread is not None:
|
|
85
|
-
self.__start_thread.interrupt()
|
|
86
|
-
self.__start_thread.join()
|
|
87
|
-
self.__start_thread = None
|
|
145
|
+
thread = LoopFunctionThreaded(self.wait_and_process_connection, kwargs=kwargs, register_thread=True, delay_before_run_sec=None)
|
|
146
|
+
self._start_thread(thread)
|
|
88
147
|
|
|
89
148
|
def wait_and_process_connection(self, read_bufsize=1024, *, read_kwargs=None, write_kwargs=None):
|
|
90
149
|
"""Wait a connection, and then listen data, process data, and send result.
|
|
@@ -104,15 +163,11 @@ class BlockingSocketServer(SocketServer):
|
|
|
104
163
|
|
|
105
164
|
if not data:
|
|
106
165
|
break
|
|
107
|
-
result = self.
|
|
166
|
+
result = self._process_received_data(data)
|
|
108
167
|
|
|
109
168
|
if logger.isEnabledFor(logging.DEBUG):
|
|
110
169
|
logger.debug(f"[{self.name}] Sending: {result}")
|
|
111
170
|
conn.write(result, **write_kwargs)
|
|
112
|
-
|
|
113
|
-
@abc.abstractmethod
|
|
114
|
-
def _process_data(self, data):
|
|
115
|
-
raise NotImplementedError()
|
|
116
171
|
|
|
117
172
|
|
|
118
173
|
|
|
@@ -121,8 +176,8 @@ class TCPBlockingSocketServer(BlockingSocketServer):
|
|
|
121
176
|
TCP socket server
|
|
122
177
|
"""
|
|
123
178
|
|
|
124
|
-
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None):
|
|
125
|
-
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs)
|
|
179
|
+
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument):
|
|
180
|
+
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay)
|
|
126
181
|
|
|
127
182
|
def create_ipv4_socket(self, host, port, **kwargs):
|
|
128
183
|
ssl_context, kwargs = self._new_ssl_context_if_required(server_side=True, **kwargs)
|
|
@@ -130,7 +185,9 @@ class TCPBlockingSocketServer(BlockingSocketServer):
|
|
|
130
185
|
sock = socket.create_server((host, port), **kwargs)
|
|
131
186
|
|
|
132
187
|
if ssl_context:
|
|
133
|
-
|
|
134
|
-
sock = ssl_context.wrap_socket(sock, server_side=True)
|
|
135
|
-
|
|
188
|
+
do_handshake_on_connect = True
|
|
189
|
+
sock = ssl_context.wrap_socket(sock, server_side=True, do_handshake_on_connect=do_handshake_on_connect)
|
|
190
|
+
self._set_internal_socket(sock, is_with_ssl=True, is_ssl_handshake_done_on_connect=do_handshake_on_connect)
|
|
191
|
+
else:
|
|
192
|
+
self._set_internal_socket(sock)
|
|
136
193
|
|
|
@@ -13,16 +13,17 @@
|
|
|
13
13
|
|
|
14
14
|
import logging
|
|
15
15
|
from holado_python.standard_library.socket.blocking_socket import TCPBlockingSocketServer
|
|
16
|
+
from holado.common.handlers.undefined import undefined_argument
|
|
16
17
|
|
|
17
18
|
logger = logging.getLogger(__name__)
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class EchoTCPBlockingSocketServer(TCPBlockingSocketServer):
|
|
22
|
-
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None):
|
|
23
|
-
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs)
|
|
23
|
+
def __init__(self, *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument):
|
|
24
|
+
super().__init__(name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay)
|
|
24
25
|
|
|
25
|
-
def
|
|
26
|
+
def _process_received_data(self, data):
|
|
26
27
|
return data
|
|
27
28
|
|
|
28
29
|
|
|
@@ -17,6 +17,9 @@ import selectors
|
|
|
17
17
|
from holado_python.standard_library.socket.non_blocking_socket import TCPNonBlockingSocketClient
|
|
18
18
|
import copy
|
|
19
19
|
import threading
|
|
20
|
+
from holado_python.standard_library.socket.blocking_socket import TCPBlockingSocketClient
|
|
21
|
+
from holado_core.common.tools.tools import Tools
|
|
22
|
+
from holado.common.handlers.undefined import undefined_argument
|
|
20
23
|
|
|
21
24
|
logger = logging.getLogger(__name__)
|
|
22
25
|
|
|
@@ -26,14 +29,14 @@ logger = logging.getLogger(__name__)
|
|
|
26
29
|
##########################################################################
|
|
27
30
|
|
|
28
31
|
|
|
29
|
-
class
|
|
32
|
+
class MessageSocketClient(object):
|
|
30
33
|
"""
|
|
31
|
-
Base class for
|
|
34
|
+
Base class for message socket client.
|
|
32
35
|
"""
|
|
33
36
|
__metaclass__ = abc.ABCMeta
|
|
34
37
|
|
|
35
|
-
def __init__(self, separator=b'\n'
|
|
36
|
-
super().__init__(
|
|
38
|
+
def __init__(self, separator=b'\n'):
|
|
39
|
+
super().__init__()
|
|
37
40
|
|
|
38
41
|
self.__separator = separator
|
|
39
42
|
self.__messages_lock = threading.Lock()
|
|
@@ -47,23 +50,21 @@ class MessageTCPSocketClient(TCPNonBlockingSocketClient):
|
|
|
47
50
|
def nb_messages(self):
|
|
48
51
|
return len(self.__messages)
|
|
49
52
|
|
|
50
|
-
def
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
def _extract_messages_from_data(self, data):
|
|
54
|
+
while True:
|
|
55
|
+
ind = data.in_bytes.find(self.__separator)
|
|
56
|
+
if ind >=0:
|
|
57
|
+
msg = data.in_bytes[:ind]
|
|
58
|
+
self._add_message(msg)
|
|
59
|
+
data.in_bytes = data.in_bytes[ind+len(self.__separator):]
|
|
60
|
+
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
61
|
+
logger.trace(f"[{self.name}] New message (total: {self.nb_messages}): {msg}")
|
|
62
|
+
elif Tools.do_log(logger, logging.DEBUG):
|
|
63
|
+
logger.debug(f"[{self.name}] New message (total: {self.nb_messages})")
|
|
64
|
+
else:
|
|
65
|
+
break
|
|
53
66
|
|
|
54
|
-
|
|
55
|
-
if mask & selectors.EVENT_READ:
|
|
56
|
-
with self._data_lock:
|
|
57
|
-
while True:
|
|
58
|
-
ind = self._data.in_bytes.find(self.__separator)
|
|
59
|
-
if ind >=0:
|
|
60
|
-
msg = self._data.in_bytes[:ind]
|
|
61
|
-
self.__add_message(msg)
|
|
62
|
-
self._data.in_bytes = self._data.in_bytes[ind+len(self.__separator):]
|
|
63
|
-
else:
|
|
64
|
-
break
|
|
65
|
-
|
|
66
|
-
def __add_message(self, msg):
|
|
67
|
+
def _add_message(self, msg):
|
|
67
68
|
with self.__messages_lock:
|
|
68
69
|
self.__messages.append(msg)
|
|
69
70
|
|
|
@@ -85,6 +86,44 @@ class MessageTCPSocketClient(TCPNonBlockingSocketClient):
|
|
|
85
86
|
|
|
86
87
|
|
|
87
88
|
|
|
89
|
+
class MessageTCPBlockingSocketClient(TCPBlockingSocketClient, MessageSocketClient):
|
|
90
|
+
"""
|
|
91
|
+
Message socket client with TCP blocking socket.
|
|
92
|
+
"""
|
|
93
|
+
def __init__(self, separator=b'\n', *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument):
|
|
94
|
+
MessageSocketClient.__init__(self, separator)
|
|
95
|
+
TCPBlockingSocketClient.__init__(self, name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay)
|
|
96
|
+
|
|
97
|
+
def _process_recv_send(self, *, read_bufsize=1024, read_kwargs=None, write_kwargs=None):
|
|
98
|
+
# Read from socket & write in socket
|
|
99
|
+
super()._process_recv_send(read_bufsize=read_bufsize, read_kwargs=read_kwargs, write_kwargs=write_kwargs)
|
|
100
|
+
|
|
101
|
+
# Extract messages from received data
|
|
102
|
+
if self.is_run_with_recv:
|
|
103
|
+
with self._data_lock:
|
|
104
|
+
self._extract_messages_from_data(self._data)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class MessageTCPNonBlockingSocketClient(TCPNonBlockingSocketClient, MessageSocketClient):
|
|
109
|
+
"""
|
|
110
|
+
Message socket client with TCP non-blocking socket.
|
|
111
|
+
"""
|
|
112
|
+
def __init__(self, separator=b'\n', *, name=None, create_ipv4_socket_kwargs=None, idle_sleep_delay=undefined_argument):
|
|
113
|
+
MessageSocketClient.__init__(self, separator)
|
|
114
|
+
TCPNonBlockingSocketClient.__init__(self, name=name, create_ipv4_socket_kwargs=create_ipv4_socket_kwargs, idle_sleep_delay=idle_sleep_delay)
|
|
115
|
+
|
|
116
|
+
def _service_connection(self, key, mask, *, read_bufsize=1024, read_kwargs=None, write_kwargs=None):
|
|
117
|
+
# Read from socket & write in socket
|
|
118
|
+
super()._service_connection(key, mask, read_bufsize=read_bufsize, read_kwargs=read_kwargs, write_kwargs=write_kwargs)
|
|
119
|
+
|
|
120
|
+
# Extract messages from received data
|
|
121
|
+
if mask & selectors.EVENT_READ:
|
|
122
|
+
with self._data_lock:
|
|
123
|
+
self._extract_messages_from_data(self._data)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
88
127
|
|
|
89
128
|
|
|
90
129
|
|