holado 0.2.8__py3-none-any.whl → 0.4.0__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.

Files changed (110) hide show
  1. holado/common/handlers/undefined.py +7 -1
  2. {holado-0.2.8.dist-info → holado-0.4.0.dist-info}/METADATA +4 -1
  3. {holado-0.2.8.dist-info → holado-0.4.0.dist-info}/RECORD +108 -101
  4. holado_ais/ais/ais_messages.py +97 -6
  5. holado_ais/tests/behave/steps/ais/ais_manager_steps.py +1 -1
  6. holado_ais/tests/behave/steps/ais/ais_messages_steps.py +45 -6
  7. holado_binary/ipc/bit_series.py +3 -3
  8. holado_binary/tests/behave/steps/ipc/binary_steps.py +1 -1
  9. holado_binary/tests/behave/steps/ipc/bit_series_steps.py +4 -3
  10. holado_context/tests/behave/steps/private/common/context_steps.py +1 -1
  11. holado_core/common/resource/persisted_data_manager.py +13 -16
  12. holado_core/common/resource/resource_manager.py +10 -10
  13. holado_core/common/tables/converters/table_converter.py +47 -9
  14. holado_core/common/tables/table_manager.py +6 -7
  15. holado_core/common/tables/table_with_header.py +6 -0
  16. holado_core/tests/behave/steps/common/common_steps.py +2 -1
  17. holado_core/tests/behave/steps/common/config_steps.py +1 -1
  18. holado_core/tests/behave/steps/common/resource_steps.py +1 -1
  19. holado_core/tests/behave/steps/common/tables_steps.py +18 -2
  20. holado_data/data/generator/generator_manager.py +39 -0
  21. holado_data/tests/behave/steps/data/generator_steps.py +1 -1
  22. holado_data/tests/behave/steps/tools/utils_steps.py +1 -2
  23. holado_db/tests/behave/steps/tools/db/db_client_steps.py +1 -1
  24. holado_db/tests/behave/steps/tools/db/postgresql_client_steps.py +1 -1
  25. holado_db/tests/behave/steps/tools/db/sqlite_client_steps.py +1 -1
  26. holado_db/tools/db/clients/base/db_client.py +81 -28
  27. holado_db/tools/db/clients/postgresql/postgresql_client.py +17 -7
  28. holado_db/tools/db/query/base/query_builder.py +58 -7
  29. holado_db/tools/db/query/pypika/pypika_query_builder.py +73 -21
  30. holado_docker/tests/behave/steps/tools/docker_steps.py +1 -1
  31. holado_grpc/tests/behave/steps/api/grpc_client_steps.py +1 -1
  32. holado_grpc/tests/behave/steps/private/api/grpc_steps.py +1 -1
  33. holado_json/tests/behave/steps/ipc/json_steps.py +1 -1
  34. holado_keycloak/tests/behave/steps/tools/keycloak_client_steps.py +1 -1
  35. holado_multitask/tests/behave/steps/multiprocessing_steps.py +1 -1
  36. holado_multitask/tests/behave/steps/multithreading_steps.py +1 -1
  37. holado_protobuf/ipc/protobuf/types/google/protobuf.py +1 -1
  38. holado_protobuf/tests/behave/steps/ipc/protobuf_steps.py +1 -1
  39. holado_python/common/tools/datetime.py +31 -12
  40. holado_python/standard_library/socket/blocking_socket.py +37 -24
  41. holado_python/standard_library/socket/message_socket.py +11 -3
  42. holado_python/standard_library/socket/non_blocking_socket.py +24 -24
  43. holado_python/standard_library/socket/socket.py +132 -19
  44. holado_python/standard_library/ssl/resources/certificates/NOTES.txt +1 -1
  45. holado_python/standard_library/ssl/resources/certificates/rootCACert.pem +24 -0
  46. holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +21 -0
  47. holado_python/standard_library/ssl/resources/certificates/tcpbin.key +28 -0
  48. holado_python/standard_library/ssl/ssl.py +138 -21
  49. holado_python/tests/behave/steps/convert_steps.py +1 -1
  50. holado_python/tests/behave/steps/iterable_steps.py +1 -1
  51. holado_python/tests/behave/steps/standard_library/csv_steps.py +1 -1
  52. holado_python/tests/behave/steps/standard_library/datetime_steps.py +1 -1
  53. holado_python/tests/behave/steps/standard_library/hashlib_steps.py +2 -2
  54. holado_python/tests/behave/steps/standard_library/multiprocessing_steps.py +1 -1
  55. holado_python/tests/behave/steps/standard_library/queue_steps.py +1 -1
  56. holado_python/tests/behave/steps/standard_library/socket_steps.py +132 -18
  57. holado_python/tests/behave/steps/standard_library/ssl_steps.py +87 -16
  58. holado_rabbitmq/tests/behave/steps/tools/rabbitmq_client_steps.py +48 -20
  59. holado_rabbitmq/tests/behave/steps/tools/rabbitmq_server_steps.py +1 -1
  60. holado_rabbitmq/tools/rabbitmq/rabbitmq_client.py +19 -13
  61. holado_rabbitmq/tools/rabbitmq/rabbitmq_manager.py +2 -29
  62. holado_redis/tests/behave/steps/tools/redis_client_steps.py +1 -1
  63. holado_rest/api/rest/rest_client.py +18 -1
  64. holado_rest/api/rest/rest_manager.py +5 -0
  65. holado_rest/tests/behave/steps/api/rest_client_steps.py +52 -11
  66. holado_rest/tests/behave/steps/private/api/rest_steps.py +1 -1
  67. holado_s3/tests/behave/steps/private/tools/s3_steps.py +1 -1
  68. holado_s3/tests/behave/steps/tools/s3_client_steps.py +1 -1
  69. holado_s3/tests/behave/steps/tools/s3_server_steps.py +1 -1
  70. holado_scripting/tests/behave/steps/common/tools/variable_convert_steps.py +3 -2
  71. holado_scripting/tests/behave/steps/common/tools/variable_new_steps.py +1 -1
  72. holado_scripting/tests/behave/steps/common/tools/variable_steps.py +1 -1
  73. holado_scripting/tests/behave/steps/common/tools/variable_verify_steps.py +1 -1
  74. holado_scripting/tests/behave/steps/scenario/function_steps.py +1 -1
  75. holado_scripting/tests/behave/steps/scenario/if_steps.py +1 -1
  76. holado_scripting/tests/behave/steps/scenario/loop_steps.py +1 -1
  77. holado_sftp/tests/behave/steps/private/tools/sftp_steps.py +1 -1
  78. holado_sftp/tests/behave/steps/tools/sftp_client_steps.py +1 -1
  79. holado_sftp/tests/behave/steps/tools/sftp_server_steps.py +1 -1
  80. holado_swagger/tests/behave/steps/swagger_hub/mockserver_steps.py +1 -1
  81. holado_system/system/command/command.py +14 -9
  82. holado_system/tests/behave/steps/system/commands_steps.py +1 -1
  83. holado_system/tests/behave/steps/system/file_steps.py +1 -1
  84. holado_system/tests/behave/steps/system/system_steps.py +1 -1
  85. holado_test/scenario/step_tools.py +1 -1
  86. holado_test/scenario/tester_tools.py +6 -3
  87. holado_test/tests/behave/steps/scenario/exception_steps.py +1 -1
  88. holado_test/tests/behave/steps/scenario/scenario_steps.py +1 -1
  89. holado_test/tests/behave/steps/scenario/tester_steps.py +4 -4
  90. holado_value/common/tables/converters/value_table_converter.py +52 -8
  91. holado_value/common/tables/value_table_manager.py +0 -10
  92. holado_ws/tests/behave/steps/api/web_service_steps.py +1 -1
  93. holado_yaml/tests/behave/steps/yaml_steps.py +1 -1
  94. holado_yaml/yaml/yaml_manager.py +2 -2
  95. test_holado/features/NonReg/common/tables/table.feature +30 -24
  96. test_holado/features/NonReg/holado_ais/ais_message-bitarray_to_nmea.feature +1 -1
  97. test_holado/features/NonReg/holado_python/standard_library/socket/local_echo_server/socket_reset.feature +191 -0
  98. test_holado/features/NonReg/holado_python/standard_library/{socket_with_ssl.feature → socket/local_echo_server/socket_with_tls_and_verify.feature} +53 -30
  99. test_holado/features/NonReg/holado_python/standard_library/socket/local_echo_server/socket_with_tls_without_verify.feature +299 -0
  100. test_holado/features/NonReg/holado_python/standard_library/{socket.feature → socket/local_echo_server/socket_without_tls.feature} +2 -2
  101. test_holado/features/NonReg/holado_python/standard_library/socket/tcpbin.com/socket_with_mtls.feature +214 -0
  102. test_holado/features/NonReg/holado_python/standard_library/socket/tcpbin.com/socket_with_tls.feature +184 -0
  103. test_holado/features/NonReg/holado_python/standard_library/socket/tcpbin.com/socket_without_tls.feature +169 -0
  104. test_holado/features/NonReg/tools/RabbitMQ.feature +9 -9
  105. test_holado/features/NonReg/tools/RabbitMQ_steps.feature +8 -8
  106. test_holado/logging.conf +5 -3
  107. holado_core/common/transport/__init__.py +0 -0
  108. holado_core/common/transport/crc.py +0 -40
  109. {holado-0.2.8.dist-info → holado-0.4.0.dist-info}/WHEEL +0 -0
  110. {holado-0.2.8.dist-info → holado-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -75,7 +75,7 @@ Feature: Test RabbitMQ steps
75
75
  """
76
76
 
77
77
  When start thread PUB_THREAD
78
- When wait consumer CONSUMER receives messages (timeout: 1 s ; polling: 0.001 s)
78
+ When await consumer CONSUMER receives a message (timeout: 1 s ; polling: 0.001 s)
79
79
  Given DUR = last step duration
80
80
 
81
81
  Then consumer CONSUMER received 1 messages
@@ -102,7 +102,7 @@ Feature: Test RabbitMQ steps
102
102
 
103
103
  When start thread PUB_THREAD
104
104
  Given next step shall fail on exception matching 'No message was received \(timeout: 0.3 seconds\)'
105
- When wait consumer CONSUMER receives messages (timeout: 0.3 s ; polling: 0.001 s)
105
+ When await consumer CONSUMER receives a message (timeout: 0.3 s ; polling: 0.001 s)
106
106
  Given DUR = last step duration
107
107
 
108
108
  Then DUR >= 0.3
@@ -129,7 +129,7 @@ Feature: Test RabbitMQ steps
129
129
  """
130
130
 
131
131
  When start thread PUB_THREAD
132
- When wait consumer CONSUMER receives messages (timeout: 0.3 s ; polling: 0.001 s)
132
+ When await consumer CONSUMER receives a message (timeout: 0.3 s ; polling: 0.001 s)
133
133
  Given DUR = last step duration
134
134
 
135
135
  Then consumer CONSUMER received 1 messages
@@ -197,7 +197,7 @@ Feature: Test RabbitMQ steps
197
197
  """
198
198
 
199
199
  When start thread PUB_THREAD
200
- When wait consumer CONSUMER stops to receive messages (first timeout: 1 s ; window: 0.12 s ; polling: 0.001 s)
200
+ When await consumer CONSUMER receives messages (first timeout: 1 s ; window: 0.12 s ; polling: 0.001 s)
201
201
  Given DUR = last step duration
202
202
 
203
203
  Then consumer CONSUMER received 3 messages
@@ -211,7 +211,7 @@ Feature: Test RabbitMQ steps
211
211
  # Use case:
212
212
  # - first message takes time to arrive
213
213
  # - first message arrives after first timeout
214
- When wait consumer CONSUMER stops to receive messages (window: 0.2 s ; polling: 0.001 s ; raise: False)
214
+ When await consumer CONSUMER receives no messages (window: 0.2 s ; polling: 0.001 s)
215
215
  Given reset stored messages in consumer CONSUMER
216
216
  Given PUB_THREAD = new thread that calls steps
217
217
  """
@@ -221,7 +221,7 @@ Feature: Test RabbitMQ steps
221
221
 
222
222
  When start thread PUB_THREAD
223
223
  Given next step shall fail on exception matching 'No message was received \(timeout: 0.3 seconds\)'
224
- When wait consumer CONSUMER stops to receive messages (first timeout: 0.3 s ; window: 0.12 s ; polling: 0.001 s)
224
+ When await consumer CONSUMER receives messages (first timeout: 0.3 s ; window: 0.12 s ; polling: 0.001 s)
225
225
  Given DUR = last step duration
226
226
 
227
227
  Then DUR >= 0.3
@@ -234,7 +234,7 @@ Feature: Test RabbitMQ steps
234
234
  # Use case:
235
235
  # - first message arrives rapidely
236
236
  # - first message arrives before first timeout
237
- When wait consumer CONSUMER stops to receive messages (window: 0.2 s ; polling: 0.001 s ; raise: False)
237
+ When await consumer CONSUMER receives no messages (window: 0.2 s ; polling: 0.001 s)
238
238
  Given reset stored messages in consumer CONSUMER
239
239
  Given PUB_THREAD = new thread that calls steps
240
240
  """
@@ -254,7 +254,7 @@ Feature: Test RabbitMQ steps
254
254
  """
255
255
 
256
256
  When start thread PUB_THREAD
257
- When wait consumer CONSUMER stops to receive messages (first timeout: 1 s ; window: 0.12 s ; polling: 0.001 s)
257
+ When await consumer CONSUMER receives messages (first timeout: 1 s ; window: 0.12 s ; polling: 0.001 s)
258
258
  Given DUR = last step duration
259
259
 
260
260
  Then consumer CONSUMER received 3 messages
test_holado/logging.conf CHANGED
@@ -1,6 +1,6 @@
1
1
  [holado]
2
- #level=INFO
3
- level=DEBUG
2
+ level=INFO
3
+ #level=DEBUG
4
4
  #level=TRACE
5
5
  log_on_console=False
6
6
  log_in_file=True
@@ -17,6 +17,7 @@ holado_core.common.tools.comparators=INFO
17
17
  #holado_core.common.tools.tools=TRACE
18
18
  holado_db.tools=DEBUG
19
19
  holado_logging=INFO
20
+ holado_multitask=WARNING
20
21
  #holado_multitask.multitasking.multitask_manager=TRACE
21
22
  #holado_protobuf.ipc.protobuf=DEBUG
22
23
  #holado_protobuf.ipc.protobuf.protobuf_messages=TRACE
@@ -36,8 +37,9 @@ holado_s3.tools.s3.minio_client.trace=INFO
36
37
  chardet=WARNING
37
38
  pika=WARNING
38
39
  psycopg=INFO
40
+ ssl=DEBUG
39
41
  suds.transport=DEBUG
42
+ subprocess=DEBUG
40
43
  urllib3=INFO
41
44
  zeep.transports=DEBUG
42
- ssl=DEBUG
43
45
 
File without changes
@@ -1,40 +0,0 @@
1
-
2
- import logging
3
- from holado_core.common.tools.tools import Tools
4
-
5
- logger = logging.getLogger(__name__)
6
-
7
-
8
- class Crc(object):
9
-
10
- @staticmethod
11
- def crc(msg_bytes, offset, nb_bits, crc_size, polynomial, init_val, xor_val, reverse=False):
12
- if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
13
- logger.trace(f"Computing CRC for:\n {msg_bytes=}\n {offset=}\n {nb_bits=}\n {crc_size=}\n {polynomial=}\n {init_val=}\n {xor_val=}")
14
- res = init_val
15
-
16
- # For each data bit in the data, process bits from left to right (or from right to left if reverse=True)
17
- if reverse:
18
- bits_range = range(offset+nb_bits-1, offset-1, -1)
19
- else:
20
- bits_range = range(offset, offset+nb_bits)
21
- for i in bits_range:
22
- bit = (msg_bytes[i // 8] >> (7 - (i % 8))) & 0x1
23
- out = (res >> (crc_size - 1)) & 0x1
24
- res = (res << 1) & (0xFFFFFFFF >> (32 - crc_size))
25
- # Apply polynomial if the bit about to be shifted out of the crc is different than the processed bit
26
- if bit ^ out == 1:
27
- res ^= polynomial
28
- if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
29
- logger.trace(f"Computing CRC: {i=}, {bit=} => {res}")
30
-
31
- res ^= xor_val
32
-
33
- # Be careful, for a crc-32, we can't make <<32, this should result to <<0
34
- res &= 0xFFFFFFFF >> (32 - crc_size)
35
-
36
- if Tools.do_log(logger, logging.DEBUG):
37
- logger.debug(f"CRC for:\n {msg_bytes=}\n {offset=}\n {nb_bits=}\n {crc_size=}\n {polynomial=}\n {init_val=}\n {xor_val=}\n => {res}")
38
- return res
39
-
40
-
File without changes