4 ms·
That's talking about internal imports (and static - as much as python supports - ones at that), not external ones. If A is my application, B is buggy, and C is
by o11c 1y ago
That's talking about internal imports (and static - as much as python supports - ones at that), not external ones.
If A is my application, B is buggy, and C is some other library, consider:
# A.py
monkeypatch_B()
import C
# C.py
B = __import__('B')
# B.py
bugs()
- joouha 1y agoIt should in theory be possible to mount the new virtual package over the lower module - but I don't think works currently (I'll have to test this). Doing this would make modifications available globally like you describe.