retracesoftware-proxy 0.1.22__py3-none-any.whl → 0.2.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.
- retracesoftware/__main__.py +266 -0
- retracesoftware/autoenable.py +53 -0
- retracesoftware/config.json +19 -295
- retracesoftware/install/config.py +6 -0
- retracesoftware/install/edgecases.py +23 -1
- retracesoftware/install/patcher.py +93 -649
- retracesoftware/install/patchfindspec.py +117 -0
- retracesoftware/install/phases.py +338 -0
- retracesoftware/install/record.py +97 -37
- retracesoftware/install/replace.py +28 -0
- retracesoftware/install/replay.py +55 -11
- retracesoftware/install/tracer.py +87 -77
- retracesoftware/modules.toml +384 -0
- retracesoftware/proxy/messagestream.py +204 -0
- retracesoftware/proxy/proxysystem.py +283 -64
- retracesoftware/proxy/proxytype.py +34 -10
- retracesoftware/proxy/record.py +97 -64
- retracesoftware/proxy/replay.py +62 -219
- retracesoftware/proxy/serializer.py +28 -0
- retracesoftware/proxy/startthread.py +40 -0
- retracesoftware/proxy/stubfactory.py +42 -19
- retracesoftware/replay.py +104 -0
- retracesoftware/run.py +373 -0
- retracesoftware/stackdifference.py +133 -0
- {retracesoftware_proxy-0.1.22.dist-info → retracesoftware_proxy-0.2.0.dist-info}/METADATA +2 -1
- retracesoftware_proxy-0.2.0.dist-info/RECORD +41 -0
- retracesoftware_proxy-0.1.22.dist-info/RECORD +0 -29
- {retracesoftware_proxy-0.1.22.dist-info → retracesoftware_proxy-0.2.0.dist-info}/WHEEL +0 -0
- {retracesoftware_proxy-0.1.22.dist-info → retracesoftware_proxy-0.2.0.dist-info}/top_level.txt +0 -0
|
@@ -138,6 +138,7 @@ def retrace_env():
|
|
|
138
138
|
return env
|
|
139
139
|
|
|
140
140
|
def fork_exec(target):
|
|
141
|
+
|
|
141
142
|
def transform(env):
|
|
142
143
|
r = [f'{k}={v}'.encode('utf-8') for k,v in retrace_env().items()]
|
|
143
144
|
return env + r if env else r
|
|
@@ -145,9 +146,20 @@ def fork_exec(target):
|
|
|
145
146
|
return transform_argument(target = target,
|
|
146
147
|
position = 5,
|
|
147
148
|
name = 'env',
|
|
148
|
-
transform = transform, default = os.environ)
|
|
149
|
+
transform = transform, default = os.environ)
|
|
150
|
+
|
|
151
|
+
# import threading
|
|
152
|
+
# thread_state = threading.current_thread().__retrace__.thread_state
|
|
153
|
+
|
|
154
|
+
# patched = transform_argument(target = target,
|
|
155
|
+
# position = 5,
|
|
156
|
+
# name = 'env',
|
|
157
|
+
# transform = transform, default = os.environ)
|
|
158
|
+
|
|
159
|
+
# return thread_state.dispatch(target, internal = patched)
|
|
149
160
|
|
|
150
161
|
def posix_spawn(target):
|
|
162
|
+
|
|
151
163
|
def transform(env):
|
|
152
164
|
r = retrace_env()
|
|
153
165
|
return {**env, **r}
|
|
@@ -157,6 +169,16 @@ def posix_spawn(target):
|
|
|
157
169
|
name = 'env',
|
|
158
170
|
transform = transform, default = os.environ)
|
|
159
171
|
|
|
172
|
+
# import threading
|
|
173
|
+
# thread_state = threading.current_thread().__retrace__.thread_state
|
|
174
|
+
|
|
175
|
+
# patched = transform_argument(target = target,
|
|
176
|
+
# position = 2,
|
|
177
|
+
# name = 'env',
|
|
178
|
+
# transform = transform, default = os.environ)
|
|
179
|
+
|
|
180
|
+
# return thread_state.dispatch(target, internal = patched)
|
|
181
|
+
|
|
160
182
|
function_patchers = {
|
|
161
183
|
'_posixsubprocess': {
|
|
162
184
|
'fork_exec': fork_exec
|