iris-pex-embedded-python 3.4.1b1__py3-none-any.whl → 3.4.1b3__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 iris-pex-embedded-python might be problematic. Click here for more details.

Files changed (74) hide show
  1. iop/_director.py +23 -23
  2. {iris_pex_embedded_python-3.4.1b1.dist-info → iris_pex_embedded_python-3.4.1b3.dist-info}/METADATA +1 -1
  3. iris_pex_embedded_python-3.4.1b3.dist-info/RECORD +79 -0
  4. iris_pex_embedded_python-3.4.1b3.dist-info/top_level.txt +2 -0
  5. intersystems_iris/_BufferReader.py +0 -10
  6. intersystems_iris/_BufferWriter.py +0 -32
  7. intersystems_iris/_ConnectionInformation.py +0 -56
  8. intersystems_iris/_ConnectionParameters.py +0 -18
  9. intersystems_iris/_Constant.py +0 -38
  10. intersystems_iris/_DBList.py +0 -506
  11. intersystems_iris/_Device.py +0 -69
  12. intersystems_iris/_GatewayContext.py +0 -25
  13. intersystems_iris/_GatewayException.py +0 -4
  14. intersystems_iris/_GatewayUtility.py +0 -74
  15. intersystems_iris/_IRIS.py +0 -1294
  16. intersystems_iris/_IRISConnection.py +0 -516
  17. intersystems_iris/_IRISEmbedded.py +0 -85
  18. intersystems_iris/_IRISGlobalNode.py +0 -273
  19. intersystems_iris/_IRISGlobalNodeView.py +0 -25
  20. intersystems_iris/_IRISIterator.py +0 -143
  21. intersystems_iris/_IRISList.py +0 -360
  22. intersystems_iris/_IRISNative.py +0 -208
  23. intersystems_iris/_IRISOREF.py +0 -9
  24. intersystems_iris/_IRISObject.py +0 -424
  25. intersystems_iris/_IRISReference.py +0 -133
  26. intersystems_iris/_InStream.py +0 -149
  27. intersystems_iris/_LegacyIterator.py +0 -135
  28. intersystems_iris/_ListItem.py +0 -15
  29. intersystems_iris/_ListReader.py +0 -84
  30. intersystems_iris/_ListWriter.py +0 -161
  31. intersystems_iris/_LogFileStream.py +0 -115
  32. intersystems_iris/_MessageHeader.py +0 -51
  33. intersystems_iris/_OutStream.py +0 -25
  34. intersystems_iris/_PrintStream.py +0 -65
  35. intersystems_iris/_PythonGateway.py +0 -850
  36. intersystems_iris/_SharedMemorySocket.py +0 -87
  37. intersystems_iris/__init__.py +0 -79
  38. intersystems_iris/__main__.py +0 -7
  39. intersystems_iris/dbapi/_Column.py +0 -56
  40. intersystems_iris/dbapi/_DBAPI.py +0 -2631
  41. intersystems_iris/dbapi/_Descriptor.py +0 -46
  42. intersystems_iris/dbapi/_IRISStream.py +0 -65
  43. intersystems_iris/dbapi/_Message.py +0 -158
  44. intersystems_iris/dbapi/_Parameter.py +0 -171
  45. intersystems_iris/dbapi/_ParameterCollection.py +0 -141
  46. intersystems_iris/dbapi/_ResultSetRow.py +0 -361
  47. intersystems_iris/dbapi/_SQLType.py +0 -32
  48. intersystems_iris/dbapi/__init__.py +0 -0
  49. intersystems_iris/dbapi/preparser/_PreParser.py +0 -1674
  50. intersystems_iris/dbapi/preparser/_Scanner.py +0 -391
  51. intersystems_iris/dbapi/preparser/_Token.py +0 -81
  52. intersystems_iris/dbapi/preparser/_TokenList.py +0 -251
  53. intersystems_iris/dbapi/preparser/__init__.py +0 -0
  54. intersystems_iris/pex/_BusinessHost.py +0 -101
  55. intersystems_iris/pex/_BusinessOperation.py +0 -105
  56. intersystems_iris/pex/_BusinessProcess.py +0 -214
  57. intersystems_iris/pex/_BusinessService.py +0 -95
  58. intersystems_iris/pex/_Common.py +0 -228
  59. intersystems_iris/pex/_Director.py +0 -24
  60. intersystems_iris/pex/_IRISBusinessOperation.py +0 -5
  61. intersystems_iris/pex/_IRISBusinessService.py +0 -18
  62. intersystems_iris/pex/_IRISInboundAdapter.py +0 -5
  63. intersystems_iris/pex/_IRISOutboundAdapter.py +0 -17
  64. intersystems_iris/pex/_InboundAdapter.py +0 -57
  65. intersystems_iris/pex/_Message.py +0 -6
  66. intersystems_iris/pex/_OutboundAdapter.py +0 -46
  67. intersystems_iris/pex/__init__.py +0 -25
  68. iris_pex_embedded_python-3.4.1b1.dist-info/RECORD +0 -144
  69. iris_pex_embedded_python-3.4.1b1.dist-info/top_level.txt +0 -4
  70. irisnative/_IRISNative.py +0 -9
  71. irisnative/__init__.py +0 -10
  72. {iris_pex_embedded_python-3.4.1b1.dist-info → iris_pex_embedded_python-3.4.1b3.dist-info}/WHEEL +0 -0
  73. {iris_pex_embedded_python-3.4.1b1.dist-info → iris_pex_embedded_python-3.4.1b3.dist-info}/entry_points.txt +0 -0
  74. {iris_pex_embedded_python-3.4.1b1.dist-info → iris_pex_embedded_python-3.4.1b3.dist-info}/licenses/LICENSE +0 -0
iop/_director.py CHANGED
@@ -2,7 +2,6 @@ import asyncio
2
2
  import datetime
3
3
  import functools
4
4
  from . import _iris
5
- import intersystems_iris.dbapi._DBAPI as irisdbapi
6
5
  import signal
7
6
  from dataclasses import dataclass
8
7
 
@@ -178,7 +177,7 @@ class _Director():
178
177
  return str(row[9]) + ' ' + typ + ' ' + str(row[1]) + ' ' + str(row[2]) + ' ' + str(row[3]) + ' ' + str(row[4]) + ' ' + str(row[5]) + ' ' + str(row[6]) + ' ' + str(row[8])
179
178
 
180
179
  @staticmethod
181
- def read_top_log(cursor,top) -> list:
180
+ def read_top_log(top) -> list:
182
181
  sql = """
183
182
  SELECT top ?
184
183
  ID, ConfigName, Job, MessageId, SessionId, SourceClass, SourceMethod, Stack, Text, TimeLogged, TraceCat, Type
@@ -186,13 +185,14 @@ class _Director():
186
185
  order by id desc
187
186
  """
188
187
  result = []
189
- cursor.execute(sql, top)
190
- for row in cursor:
188
+ stmt = _iris.get_iris().sql.prepare(sql)
189
+ rs = stmt.execute(top)
190
+ for row in rs:
191
191
  result.append(_Director.format_log(row))
192
192
  return result
193
193
 
194
194
  @staticmethod
195
- def read_log(cursor) -> list:
195
+ def read_log() -> list:
196
196
  sql = """
197
197
  SELECT
198
198
  ID, ConfigName, Job, MessageId, SessionId, SourceClass, SourceMethod, Stack, Text, TimeLogged, TraceCat, Type
@@ -201,8 +201,12 @@ class _Director():
201
201
  order by id desc
202
202
  """
203
203
  result = []
204
- cursor.execute(sql, (datetime.datetime.now() - datetime.timedelta(seconds=1),))
205
- for row in cursor:
204
+ stmt = _iris.get_iris().sql.prepare(sql)
205
+ time = datetime.datetime.now() - datetime.timedelta(seconds=1)
206
+ # convert to utc time
207
+ time = time.astimezone(datetime.timezone.utc)
208
+ rs = stmt.execute(time.isoformat(sep=' '))
209
+ for row in rs:
206
210
  result.append(_Director.format_log(row))
207
211
  return result
208
212
 
@@ -211,14 +215,12 @@ class _Director():
211
215
  """ Log production
212
216
  if ctrl+c is pressed, the log is stopped
213
217
  """
214
- with irisdbapi.connect(embedded=True) as conn:
215
- with conn.cursor() as cursor:
216
- while True:
217
- for row in reversed(_Director.read_log(cursor)):
218
- print(row)
219
- if handler.sigint_log:
220
- break
221
- await asyncio.sleep(1)
218
+ while True:
219
+ for row in reversed(_Director.read_log()):
220
+ print(row)
221
+ if handler.sigint_log:
222
+ break
223
+ await asyncio.sleep(1)
222
224
 
223
225
  @staticmethod
224
226
  def log_production_top(top=10):
@@ -227,10 +229,8 @@ class _Director():
227
229
  Parameters:
228
230
  top: the number of log to display
229
231
  """
230
- with irisdbapi.connect(embedded=True) as conn:
231
- with conn.cursor() as cursor:
232
- for row in reversed(_Director.read_top_log(cursor, top)):
233
- print(row)
232
+ for row in reversed(_Director.read_top_log(top)):
233
+ print(row)
234
234
 
235
235
  @staticmethod
236
236
  def log_production():
@@ -240,10 +240,10 @@ class _Director():
240
240
  loop = asyncio.get_event_loop()
241
241
  handler = SigintHandler(log_only=True)
242
242
  loop.add_signal_handler(signal.SIGINT, functools.partial(handler.signal_handler, signal.SIGINT, loop))
243
- with irisdbapi.connect(embedded=True) as conn:
244
- with conn.cursor() as cursor:
245
- for row in reversed(_Director.read_top_log(cursor, 10)):
246
- print(row)
243
+
244
+ for row in reversed(_Director.read_top_log( 10)):
245
+ print(row)
246
+
247
247
  loop.run_until_complete(_Director._log_production_async(handler))
248
248
  loop.close()
249
249
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.4.1b1
3
+ Version: 3.4.1b3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -0,0 +1,79 @@
1
+ grongier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ grongier/cls/Grongier/PEX/BusinessOperation.cls,sha256=FgLLHTU8yHKxZIoz__5rtHW89b-o_Tjjf5i09WIqcJs,291
3
+ grongier/cls/Grongier/PEX/BusinessProcess.cls,sha256=0S7RU0GYafviILGCwkOKk7mQtP1Bvmd01b1dqfLMjDk,341
4
+ grongier/cls/Grongier/PEX/BusinessService.cls,sha256=KEidVN2tnaJ-6QKmPj8--BqlxMOayPM7Z8A42caC5s8,287
5
+ grongier/cls/Grongier/PEX/Common.cls,sha256=_7K83DN_Krj5pSgPpfWmINSA0yAhZkhXLBDmKDgLeBs,292
6
+ grongier/cls/Grongier/PEX/Director.cls,sha256=CMmLEQRbK37zenYZOMkmRa9P6B9xLUdWgm7YLk1yKGg,306
7
+ grongier/cls/Grongier/PEX/InboundAdapter.cls,sha256=4S3gjicQ-yfClO4RgKgu7iJQgQaxfH_a-1NmAeZ6Uv0,285
8
+ grongier/cls/Grongier/PEX/Message.cls,sha256=KzWxhWjDKQMjc6fnUZSrxJ9y6u5i1jAsyj0zbeTCmto,273
9
+ grongier/cls/Grongier/PEX/OutboundAdapter.cls,sha256=6bRIZ2gzufF5uGzf3z0MY460Yl6gKP31yJm8kzttm8g,287
10
+ grongier/cls/Grongier/PEX/PickleMessage.cls,sha256=r4BTEML91d1YmvkL8L209ilSyCPunYE-zJbQIJK_kBw,285
11
+ grongier/cls/Grongier/PEX/Test.cls,sha256=lvCM0hUZEQuawyteeRjucJvDhkRUc2NfGC6n6vV4nrQ,116
12
+ grongier/cls/Grongier/PEX/Utils.cls,sha256=hJtkE_YMz0z7ufocwz98vl1ODHT-NU-Qpl5hyYVu8jo,233
13
+ grongier/cls/Grongier/PEX/Duplex/Operation.cls,sha256=0X9jHVkGqoh-aLTHmXdb9DuWFY6YxEBQ7dNYLCO7cdw,68
14
+ grongier/cls/Grongier/PEX/Duplex/Process.cls,sha256=AQiL_x5tG99tvauMwiPHsU3G6irb1HGSyBnqREXF4AQ,342
15
+ grongier/cls/Grongier/PEX/Duplex/Service.cls,sha256=OEYgYbxNtff_ACW2XGee9NtUht3u6nuC822cx7ng2cA,71
16
+ grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls,sha256=7RUXLw53Tjv_IL8KpWKm4iFlAeSqAELrawJ42iu-AH4,270
17
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls,sha256=aKi3EhyQipGKMap19xW27CHEHRKCo9yf8Qk2LsEOwx4,429
18
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls,sha256=pcUgHgxX1pMH-wQpE_ow8JGBCgiKmsSmsgNwYgP5eD8,431
19
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls,sha256=T3jNoR8RjKr1InQ6SgqBYTgFwpSB0Q60WholjbvForg,433
20
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls,sha256=zy30ZXXN4XcovPij-kOF3PuH1SkP1EUvlEJQRx2S9RU,431
21
+ grongier/cls/Grongier/Service/WSGI.cls,sha256=7u2SsFmnsubMfdazvaDchKCM3yesPRMfKBzMIkwQ9xc,77
22
+ grongier/pex/__init__.py,sha256=CPLDFa4dusvGX9VZYTUk-M0Xa_yR4e4Gqku1rIT75qo,1060
23
+ grongier/pex/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
24
+ grongier/pex/_business_host.py,sha256=dlV8CWJad8Pr2TNfD9OjcVKaq5gEYQACZla1FK6-bDM,44
25
+ grongier/pex/_cli.py,sha256=hOHz3n-aHtULuhdCkqZ_SSb3sv7M6j2WhRxgCTvgR9I,64
26
+ grongier/pex/_common.py,sha256=HZwG2C2-yB8yNN8kXhI6vxg8h-rROuEx38YOVFWIk1s,31
27
+ grongier/pex/_director.py,sha256=pCmoiJ-sxe24yQaDz6ZFBsAnqU6fh57_dlew98B7rtE,35
28
+ grongier/pex/_utils.py,sha256=gvsdr8WhWrE6smlsCxhoF14VUZfitrwqr5J57HkJhi4,29
29
+ grongier/pex/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
30
+ iop/__init__.py,sha256=1C589HojSVK0yJf1KuTPA39ZjrOYO0QFLv45rqbZpA4,1183
31
+ iop/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
32
+ iop/_async_request.py,sha256=ae950UFSlOHjmXGifbjHV4SFiJAMefrTVLs6lGEkgXE,2242
33
+ iop/_business_host.py,sha256=x9wMNfs_IXBczEeGHsrnAo8mgFrlAhwtrWkSC-W9vqA,9699
34
+ iop/_business_operation.py,sha256=ml4BIn1BfrGx8AUGISFR71DZIUCP8vZ2yn9SQjaSzTM,3038
35
+ iop/_business_process.py,sha256=hj6nDIP5Mz5UYbm0vDjvs9lPSEYVQxGJl6tQRcDGTBk,8548
36
+ iop/_business_service.py,sha256=lPTp3_tcLTOWvHlE_YwrcImLGf1PJBUgIOrV-8ctFLw,3851
37
+ iop/_cli.py,sha256=fhaUpq3rTb4P2QPuuqoeatsphMLBPj9xtbvFPJv-2Mo,7941
38
+ iop/_common.py,sha256=NaNEeAt_A1JRLDRvMDAHPWoNgwIt3xyg5X4aL0KSXMM,13485
39
+ iop/_decorators.py,sha256=ZpgEETLdKWv58AoSMfXnm3_mA-6qPphIegjG-npDgwg,2324
40
+ iop/_director.py,sha256=d1XXJn8T8VF9rmT-joJdz_ElS2UR6myRaXaMFC_2brA,11498
41
+ iop/_dispatch.py,sha256=I3TAhvTuk8j4VcROI9vAitJ0a7Nk1BYAWKRrLeNsjr0,3203
42
+ iop/_inbound_adapter.py,sha256=PS5ToqhrYcXq9ZdLbCBqAfVp8kCeRACm_KF66pwBO9U,1652
43
+ iop/_iris.py,sha256=9LsPHk8g9_oBqMM8SzX2HPCeHZtxdnIJqG4TVzUeKBw,150
44
+ iop/_log_manager.py,sha256=ZBsMdY7OWn6BadvQ3UfoEKmDYQ9TxmcrXF3sNbqquAI,3332
45
+ iop/_message.py,sha256=pJQOjRIdw4wSDoJamvItGODMe-UjDU71XihgWdtCAqc,1120
46
+ iop/_message_validator.py,sha256=K6FxLe72gBHQXZTLVrFw87rABGM0F6CTaNtZ2MqJoss,1408
47
+ iop/_outbound_adapter.py,sha256=YTAhLrRf9chEAd53mV6KKbpaHOKNOKJHoGgj5wakRR0,726
48
+ iop/_private_session_duplex.py,sha256=mzlFABh-ly51X1uSWw9YwQbktfMvuNdp2ALlRvlDow4,5152
49
+ iop/_private_session_process.py,sha256=todprfYFSDr-h-BMvWL_IGC6wbQqkMy3mPHWEWCUSE0,1686
50
+ iop/_serialization.py,sha256=iMC51QMIcWwj1ntDbTgZbLZIFFQuBcC4wH9kfQNivic,6164
51
+ iop/_utils.py,sha256=zguWjvZQkzAScHXl4OomZr2ZtPljDqVAs1CFllQZn5g,20092
52
+ iop/cls/IOP/BusinessOperation.cls,sha256=lrymqZ8wHl5kJjXwdjbQVs5sScV__yIWGh-oGbiB_X0,914
53
+ iop/cls/IOP/BusinessProcess.cls,sha256=s3t38w1ykHqM26ETcbCYLt0ocjZyVVahm-_USZkuJ1E,2855
54
+ iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbPO8,1021
55
+ iop/cls/IOP/Common.cls,sha256=vrS9yo4aUgMiLwfhBFJvj7hG6zYQfcSIiu5o1hdppuU,11355
56
+ iop/cls/IOP/Director.cls,sha256=M43LoTb6lwSr0J81RFxi1YLW1mwda09wQ7Xqr3nBtxo,2008
57
+ iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
58
+ iop/cls/IOP/Message.cls,sha256=ZrYQHosgfTG9wv7i-WQ8j71YXZMmL4_mN16xtIDwcRg,25180
59
+ iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
60
+ iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
61
+ iop/cls/IOP/Test.cls,sha256=gAC9PEfMZsvAEWIa241-ug2FWAhITbN1SOispZzJPnI,2094
62
+ iop/cls/IOP/Utils.cls,sha256=gQBp0lC4F7FWkv1JEDe45qsaLcVlg995t2th46nDGx8,15745
63
+ iop/cls/IOP/Duplex/Operation.cls,sha256=K_fmgeLjPZQbHgNrc0kd6DUQoW0fDn1VHQjJxHo95Zk,525
64
+ iop/cls/IOP/Duplex/Process.cls,sha256=xbefZ4z84a_IUhavWN6P_gZBzqkdJ5XRTXxro6iDvAg,6986
65
+ iop/cls/IOP/Duplex/Service.cls,sha256=sTMOQUCMBgVitmQkM8bbsrmrRtCdj91VlctJ3I7b8WU,161
66
+ iop/cls/IOP/Message/JSONSchema.cls,sha256=SL26n8Z0D81SAGL2NthI10NFdT4Oe1x_GQiaTYPwkoo,3252
67
+ iop/cls/IOP/PrivateSession/Duplex.cls,sha256=8a_dO7E2RTzuxzoufryjlS41l-99NmTtOcmFXOnSwA8,7957
68
+ iop/cls/IOP/PrivateSession/Message/Ack.cls,sha256=y6-5uSVod36bxeQuT2ytPN4TUAfM1mvGGJuTbWbpNv4,941
69
+ iop/cls/IOP/PrivateSession/Message/Poll.cls,sha256=z3ALYmGYQasTcyYNyBeoHzJdNXI4nBO_N8Cqo9l4sQY,942
70
+ iop/cls/IOP/PrivateSession/Message/Start.cls,sha256=uk-WTe66GicCshgmVy3F5ugHiAyPs1m2ueS_3g0YubQ,949
71
+ iop/cls/IOP/PrivateSession/Message/Stop.cls,sha256=7g3gKFUjNg0WXBLuWnj-VnCs5G6hSE09YTzGEp0zbGc,1390
72
+ iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,10440
73
+ iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
74
+ iris_pex_embedded_python-3.4.1b3.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
75
+ iris_pex_embedded_python-3.4.1b3.dist-info/METADATA,sha256=9EmsdVoVtDZEmrDsWt-3o8_gcxQ4wquLG5n_lsvPnbE,4419
76
+ iris_pex_embedded_python-3.4.1b3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
77
+ iris_pex_embedded_python-3.4.1b3.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
78
+ iris_pex_embedded_python-3.4.1b3.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
79
+ iris_pex_embedded_python-3.4.1b3.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ grongier
2
+ iop
@@ -1,10 +0,0 @@
1
- import intersystems_iris._ListReader
2
-
3
- class _BufferReader(intersystems_iris._ListReader._ListReader):
4
-
5
- def __init__(self, header, buffer, locale):
6
- self.header = header
7
- super().__init__(buffer, locale)
8
-
9
- def _get_header_count(self):
10
- return self.header._get_count()
@@ -1,32 +0,0 @@
1
- import intersystems_iris._ListWriter
2
- import intersystems_iris._MessageHeader
3
-
4
- class _BufferWriter(intersystems_iris._ListWriter._ListWriter):
5
-
6
- def __init__(self, locale, is_unicode, compact_double):
7
- super().__init__(locale, is_unicode, compact_double)
8
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
9
-
10
- def _write_header(self, function_code):
11
- self.buffer[12] = function_code[0]
12
- self.buffer[13] = function_code[1]
13
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
14
-
15
- def _write_header_sysio(self, sysio_code):
16
- code_int = sysio_code + 49728
17
- code_bytes = code_int.to_bytes(2, 'little')
18
- self.buffer[12] = code_bytes[0]
19
- self.buffer[13] = code_bytes[1]
20
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
21
-
22
- def _set_connection_info(self, connection_info):
23
- self._locale = connection_info._locale
24
- self._is_unicode = connection_info._is_unicode
25
- self._compact_double = connection_info._compact_double
26
-
27
- def _get_header_buffer(self):
28
- return self.buffer[0:intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE]
29
-
30
- def _get_data_buffer(self):
31
- return self.buffer[intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE:self.offset]
32
-
@@ -1,56 +0,0 @@
1
- import intersystems_iris._Constant
2
-
3
-
4
- class _ConnectionInformation(object):
5
- def __init__(self):
6
- self.protocol_version = intersystems_iris._Constant._Constant.PROTOCOL_VERSION
7
- self._is_unicode = True
8
- self._compact_double = False
9
- self._locale = "latin-1"
10
- self._delimited_ids = 0
11
- self._server_version = ""
12
- self._server_version_major = 0
13
- self._server_version_minor = 0
14
- self._iris_install_dir = ""
15
- self._server_job_number = -1
16
-
17
- def _set_server_locale(self, locale):
18
- self._locale = self._map_server_locale(locale)
19
-
20
- def _parse_server_version(self, server_version):
21
- split_1 = server_version.split("|")
22
- self._server_version = split_1[0]
23
- if len(split_1) > 1:
24
- self._iris_install_dir = split_1[1]
25
- if self._server_version.find("Version") > 0:
26
- version = server_version[server_version.find("Version") + 8 :]
27
- self._server_version_major = version.split(".")[0]
28
- self._server_version_minor = version.split(".")[1]
29
- return
30
-
31
- @staticmethod
32
- def _map_server_locale(locale):
33
- # we need to map IRIS locale literals to Python locale literals
34
- _locales = {
35
- "LATIN1": "latin_1",
36
- "LATIN2": "iso8859_2",
37
- "LATINC": "iso8859_5",
38
- "LATINA": "iso8859_6",
39
- "LATING": "iso8859_7",
40
- "LATINH": "iso8859_8",
41
- "LATINT": "iso8859_11",
42
- "LATIN9": "iso8859_15",
43
- "CP1250": "cp1250",
44
- "CP1251": "cp1251",
45
- "CP1252": "cp1252",
46
- "CP1253": "cp1253",
47
- "CP1255": "cp1255",
48
- "CP1256": "cp1256",
49
- "CP1257": "cp1257",
50
- "CP874": "cp874",
51
- "UNICODE": "utf-8",
52
- }
53
- return _locales[locale.upper()] if locale.upper() in _locales else locale
54
-
55
- def __repr__(self) -> str:
56
- return f"<{self._server_version}>"
@@ -1,18 +0,0 @@
1
- class _ConnectionParameters(object):
2
- """_ConnectionParameters represents the properties that are implicit to a URL."""
3
- def __init__(self):
4
- self.hostname = None
5
- self.port = None
6
- self.namespace = None
7
- self.timeout = None
8
- self.sharedmemory = False
9
- self.logfile = None
10
- self.sslcontext = None
11
- self.isolationLevel = None
12
- self.featureOptions = None
13
-
14
- def _set_sharedmemory(self, sharedmemory):
15
- self.sharedmemory = sharedmemory
16
-
17
- def _get_sharedmemory(self):
18
- return self.sharedmemory
@@ -1,38 +0,0 @@
1
- class _Constant():
2
-
3
- PROTOCOL_VERSION = 65
4
-
5
- # Message function code
6
- MESSAGE_CONNECT = b'Y0'
7
- MESSAGE_DISCONNECT = b'Y4'
8
- MESSAGE_SHUTDOWN = b'Y6'
9
- MESSAGE_PING = b'YQ'
10
- MESSAGE_BENCHMARK_ECHO = b'YY'
11
- MESSAGE_LOAD_MODULES = b'YP'
12
- MESSAGE_DYNAMIC_EXECUTE_CONSTRUCTOR = b'YA'
13
- MESSAGE_DYNAMIC_EXECUTE_METHOD = b'YU'
14
- MESSAGE_DYNAMIC_EXECUTE_GET = b'YV'
15
- MESSAGE_DYNAMIC_EXECUTE_SET = b'YB'
16
- MESSAGE_CREATE_OBJECT = b'Y9'
17
- MESSAGE_EXCEPTION_RAISED = b'Y5'
18
- MESSAGE_GET_LIST = b'YG'
19
- MESSAGE_GET_STREAM = b'YH'
20
-
21
- @staticmethod
22
- def __convert(code):
23
- return code[0]*256+code[1]-22832
24
-
25
- ENUM_MESSAGE_PASSPHRASE = -48
26
- ENUM_MESSAGE_CONNECT = __convert.__func__(MESSAGE_CONNECT)
27
- ENUM_MESSAGE_DISCONNECT = __convert.__func__(MESSAGE_DISCONNECT)
28
- ENUM_MESSAGE_SHUTDOWN = __convert.__func__(MESSAGE_SHUTDOWN)
29
- ENUM_MESSAGE_PING = __convert.__func__(MESSAGE_PING)
30
- ENUM_MESSAGE_BENCHMARK_ECHO = __convert.__func__(MESSAGE_BENCHMARK_ECHO)
31
- ENUM_MESSAGE_LOAD_MODULES = __convert.__func__(MESSAGE_LOAD_MODULES)
32
- ENUM_MESSAGE_DYNAMIC_EXECUTE_CONSTRUCTOR = __convert.__func__(MESSAGE_DYNAMIC_EXECUTE_CONSTRUCTOR)
33
- ENUM_MESSAGE_DYNAMIC_EXECUTE_METHOD = __convert.__func__(MESSAGE_DYNAMIC_EXECUTE_METHOD)
34
- ENUM_MESSAGE_DYNAMIC_EXECUTE_GET = __convert.__func__(MESSAGE_DYNAMIC_EXECUTE_GET)
35
- ENUM_MESSAGE_DYNAMIC_EXECUTE_SET = __convert.__func__(MESSAGE_DYNAMIC_EXECUTE_SET)
36
-
37
- # IRISNative messages
38
-