iris-pex-embedded-python 2.3.19__py3-none-any.whl → 2.3.21b1__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.
- grongier/cls/Grongier/PEX/Common.cls +115 -74
- grongier/pex/wsgi/handlers.py +51 -0
- intersystems_iris/_IRISOREF.py +6 -1
- intersystems_iris/dbapi/_DBAPI.py +16 -1
- intersystems_iris/dbapi/_Parameter.py +2 -0
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/METADATA +32 -10
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/RECORD +11 -53
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/WHEEL +1 -1
- grongier/iris/Grongier/PEX/BusinessOperation.cls +0 -33
- grongier/iris/Grongier/PEX/BusinessProcess.cls +0 -100
- grongier/iris/Grongier/PEX/BusinessService.cls +0 -33
- grongier/iris/Grongier/PEX/Common.cls +0 -133
- grongier/iris/Grongier/PEX/Director.cls +0 -15
- grongier/iris/Grongier/PEX/Duplex/Operation.cls +0 -27
- grongier/iris/Grongier/PEX/Duplex/Process.cls +0 -211
- grongier/iris/Grongier/PEX/Duplex/Service.cls +0 -9
- grongier/iris/Grongier/PEX/InboundAdapter.cls +0 -22
- grongier/iris/Grongier/PEX/Message.cls +0 -126
- grongier/iris/Grongier/PEX/OutboundAdapter.cls +0 -34
- grongier/iris/Grongier/PEX/PickleMessage.cls +0 -58
- grongier/iris/Grongier/PEX/PrivateSession/Duplex.cls +0 -247
- grongier/iris/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -32
- grongier/iris/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -32
- grongier/iris/Grongier/PEX/PrivateSession/Message/Start.cls +0 -32
- grongier/iris/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -48
- grongier/iris/Grongier/PEX/Python.cls +0 -27
- grongier/iris/Grongier/PEX/Test.cls +0 -62
- grongier/iris/Grongier/PEX/Utils.cls +0 -312
- grongier/iris/__init__.py +0 -0
- grongier/pex/data/PEX/BusinessOperation.cls +0 -35
- grongier/pex/data/PEX/BusinessProcess.cls +0 -113
- grongier/pex/data/PEX/BusinessService.cls +0 -35
- grongier/pex/data/PEX/Common.cls +0 -146
- grongier/pex/data/PEX/Director.cls +0 -57
- grongier/pex/data/PEX/Duplex/Operation.cls +0 -29
- grongier/pex/data/PEX/Duplex/Process.cls +0 -229
- grongier/pex/data/PEX/Duplex/Service.cls +0 -9
- grongier/pex/data/PEX/InboundAdapter.cls +0 -22
- grongier/pex/data/PEX/Message.cls +0 -128
- grongier/pex/data/PEX/OutboundAdapter.cls +0 -36
- grongier/pex/data/PEX/PickleMessage.cls +0 -58
- grongier/pex/data/PEX/PrivateSession/Duplex.cls +0 -260
- grongier/pex/data/PEX/PrivateSession/Message/Ack.cls +0 -32
- grongier/pex/data/PEX/PrivateSession/Message/Poll.cls +0 -32
- grongier/pex/data/PEX/PrivateSession/Message/Start.cls +0 -32
- grongier/pex/data/PEX/PrivateSession/Message/Stop.cls +0 -48
- grongier/pex/data/PEX/Test.cls +0 -62
- grongier/pex/data/PEX/Utils.cls +0 -413
- iris/iris_site.py +0 -13
- iris/irisbuiltins.py +0 -97
- iris/irisloader.py +0 -199
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/LICENSE +0 -0
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/entry_points.txt +0 -0
- {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/top_level.txt +0 -0
iris/irisloader.py
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
from importlib.abc import MetaPathFinder
|
|
2
|
-
from importlib.abc import Loader
|
|
3
|
-
import importlib
|
|
4
|
-
from types import ModuleType
|
|
5
|
-
import math
|
|
6
|
-
import marshal
|
|
7
|
-
import sys
|
|
8
|
-
import iris
|
|
9
|
-
|
|
10
|
-
sources=iris.gref("^ROUTINE")
|
|
11
|
-
binaries=iris.gref("^rPYC")
|
|
12
|
-
MAX_STRING_SIZE=3800000
|
|
13
|
-
|
|
14
|
-
def getFromDirectory(directory, path):
|
|
15
|
-
level=len(path)
|
|
16
|
-
if level == 1:
|
|
17
|
-
return directory[path[0]]
|
|
18
|
-
elif level == 2:
|
|
19
|
-
return directory[path[0],path[1]]
|
|
20
|
-
elif level == 3:
|
|
21
|
-
return directory[path[0],path[1],path[2]]
|
|
22
|
-
elif level == 4:
|
|
23
|
-
return directory[path[0],path[1],path[2],path[3]]
|
|
24
|
-
elif level == 5:
|
|
25
|
-
return directory[path[0],path[1],path[2],path[3],path[4]]
|
|
26
|
-
elif level == 6:
|
|
27
|
-
return directory[path[0],path[1],path[2],path[3],path[4],path[5]]
|
|
28
|
-
elif level == 7:
|
|
29
|
-
return directory[path[0],path[1],path[2],path[3],path[4],path[5],path[6]]
|
|
30
|
-
elif level == 8:
|
|
31
|
-
return directory[path[0],path[1],path[2],path[3],path[4],path[5],path[6],path[7]]
|
|
32
|
-
elif level == 9:
|
|
33
|
-
return directory[path[0],path[1],path[2],path[3],path[4],path[5],path[6],path[7],path[8]]
|
|
34
|
-
|
|
35
|
-
#name is name of rtn with .py
|
|
36
|
-
def getSourceCode(name):
|
|
37
|
-
currentP = [name] + [0,0]
|
|
38
|
-
length = getFromDirectory(sources, currentP)
|
|
39
|
-
currentP.pop()
|
|
40
|
-
if not length or length == 0:
|
|
41
|
-
return None
|
|
42
|
-
code = ""
|
|
43
|
-
for i in range(1,int(length)+1):
|
|
44
|
-
currentP.append(i)
|
|
45
|
-
code += getFromDirectory(sources, currentP)
|
|
46
|
-
code += "\r\n"
|
|
47
|
-
currentP.pop()
|
|
48
|
-
return code
|
|
49
|
-
|
|
50
|
-
def getCodeFromBinary(name):
|
|
51
|
-
length = binaries.get([name],0)
|
|
52
|
-
if (length < 1):
|
|
53
|
-
return None
|
|
54
|
-
codeBytes = binaries.getAsBytes([name,1])
|
|
55
|
-
for i in range(1,int(length)):
|
|
56
|
-
codeBytes += binaries.getAsBytes([name,i+1])
|
|
57
|
-
return marshal.loads(codeBytes)
|
|
58
|
-
|
|
59
|
-
# def checkCode(directory, path):
|
|
60
|
-
# currentP = [p for p in path] + [0,0]
|
|
61
|
-
# length = getFromDirectory(directory, currentP)
|
|
62
|
-
# currentP.pop()
|
|
63
|
-
# if not length or length == 0:
|
|
64
|
-
# return None
|
|
65
|
-
# return length
|
|
66
|
-
|
|
67
|
-
def checkCode(name):
|
|
68
|
-
#code exist for module
|
|
69
|
-
|
|
70
|
-
if binaries.get([name],0) > 0:
|
|
71
|
-
return True
|
|
72
|
-
sub = binaries.order([name+"."])
|
|
73
|
-
#there exists some subpackage
|
|
74
|
-
if (sub and sub[:len(name)] == name):
|
|
75
|
-
return True
|
|
76
|
-
return False
|
|
77
|
-
|
|
78
|
-
def compileCode(name):
|
|
79
|
-
path = name.split(".")
|
|
80
|
-
classname = path[-1]
|
|
81
|
-
code = getSourceCode(name+".py")
|
|
82
|
-
if code:
|
|
83
|
-
codeobj = compile(code,classname,"exec")
|
|
84
|
-
compiledpython = marshal.dumps(codeobj)
|
|
85
|
-
|
|
86
|
-
#store in database
|
|
87
|
-
length=len(compiledpython)
|
|
88
|
-
chunks = math.ceil(length / MAX_STRING_SIZE)
|
|
89
|
-
binaries[name] = chunks
|
|
90
|
-
for i in range(chunks):
|
|
91
|
-
binaries[name,i+1] = compiledpython[i*MAX_STRING_SIZE:min(MAX_STRING_SIZE*(i+1),length)]
|
|
92
|
-
|
|
93
|
-
#delete old version of this module
|
|
94
|
-
# if name in sys.modules:
|
|
95
|
-
# del sys.modules[name]
|
|
96
|
-
return 1
|
|
97
|
-
return 0
|
|
98
|
-
|
|
99
|
-
#
|
|
100
|
-
# Impedence matcher prototype
|
|
101
|
-
#
|
|
102
|
-
|
|
103
|
-
def mapping_GetAt(self,key):
|
|
104
|
-
return self[key]
|
|
105
|
-
|
|
106
|
-
def mapping_SetAt(self,value,key):
|
|
107
|
-
self[key] = value
|
|
108
|
-
|
|
109
|
-
def sequence_GetAt(self,index):
|
|
110
|
-
return self[index-1]
|
|
111
|
-
|
|
112
|
-
def sequence_SetAt(self,value,index):
|
|
113
|
-
self[index-1] = value
|
|
114
|
-
|
|
115
|
-
def materialize(obj):
|
|
116
|
-
if isinstance(obj,collections.abc.Mapping):
|
|
117
|
-
obj.Count = obj.__len__
|
|
118
|
-
obj.GetAt = mapping_GetAt
|
|
119
|
-
obj.SetAt = mapping_SetAt
|
|
120
|
-
return True
|
|
121
|
-
if isinstance(obj,collections.abc.Sequence):
|
|
122
|
-
obj.Count = obj.__len__
|
|
123
|
-
obj.GetAt = sequence_GetAt
|
|
124
|
-
obj.SetAt = sequence_SetAt
|
|
125
|
-
return True
|
|
126
|
-
return False
|
|
127
|
-
|
|
128
|
-
class MyLoader(Loader):
|
|
129
|
-
def create_module(self,spec):
|
|
130
|
-
|
|
131
|
-
module = ModuleType(spec.name)
|
|
132
|
-
module.__spec__=spec
|
|
133
|
-
module.__loader__ = self
|
|
134
|
-
module.__path__ = spec.__path__
|
|
135
|
-
return module
|
|
136
|
-
|
|
137
|
-
def exec_module(self, module):
|
|
138
|
-
#path = [p+".py" for p in module.__path__]
|
|
139
|
-
name = ""
|
|
140
|
-
code = None
|
|
141
|
-
for n in module.__path__:
|
|
142
|
-
name += n
|
|
143
|
-
name += "."
|
|
144
|
-
if name:
|
|
145
|
-
code = getCodeFromBinary(name[:len(name)-1])
|
|
146
|
-
|
|
147
|
-
#this is a class or has code by itself
|
|
148
|
-
if code:
|
|
149
|
-
#print(marshal.loads(bytes(code,"utf-8")))
|
|
150
|
-
#print(type(code))
|
|
151
|
-
exec(code,module.__dict__)
|
|
152
|
-
#this is a module
|
|
153
|
-
# ismodule = getFromDirectory(path+["catalog"])
|
|
154
|
-
# if ismodule:
|
|
155
|
-
# for s in ismodule.split(","):
|
|
156
|
-
# code = getFromDirectory(path+[s])
|
|
157
|
-
# if code:
|
|
158
|
-
# exec(code,module.__dict__)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
class MyFinder(MetaPathFinder):
|
|
162
|
-
def __init__(self):
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
-
def find_spec(self,fullname,path,target=None):
|
|
166
|
-
|
|
167
|
-
#print("importing1: "+fullname)
|
|
168
|
-
ans = fullname.split(".")
|
|
169
|
-
currentName=ans[-1]
|
|
170
|
-
for i in range(len(ans)):
|
|
171
|
-
ans[i] += ".py"
|
|
172
|
-
#validate existance from globals
|
|
173
|
-
#this might be wrong
|
|
174
|
-
if not checkCode(fullname):
|
|
175
|
-
return None
|
|
176
|
-
spec = importlib.machinery.ModuleSpec(fullname, MyLoader())
|
|
177
|
-
#update path
|
|
178
|
-
if path:
|
|
179
|
-
spec.__path__ = path + [currentName]
|
|
180
|
-
else:
|
|
181
|
-
spec.__path__ = [currentName]
|
|
182
|
-
# set parent
|
|
183
|
-
if len(ans) == 1:
|
|
184
|
-
if path:
|
|
185
|
-
spec.__parent__=path[-1]
|
|
186
|
-
else:
|
|
187
|
-
spec.__parent__= None
|
|
188
|
-
else:
|
|
189
|
-
spec.__parent__=ans[-1]
|
|
190
|
-
|
|
191
|
-
return spec
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
sys.meta_path.append(MyFinder())
|
|
195
|
-
#del sys
|
|
196
|
-
#test:
|
|
197
|
-
#s imp = ##class(%SYS.Python).Import("customImport")
|
|
198
|
-
#s xx = ##class(%SYS.Python).Import("User")
|
|
199
|
-
|
{iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|