4 ms·
However, it isn't documented [0]. And the sys.settrace tests are allowed to fail: [1] PY_SYS_SETTRACE is a compile time option. It won't necessarily be a part
by shakna 6y ago
However, it isn't documented [0].
And the sys.settrace tests are allowed to fail: [1]
PY_SYS_SETTRACE is a compile time option. It won't necessarily be a part of the build. I don't think it is by default on any of the ports at the moment, though I could be wrong.
Based on that, I'd call it an "unstable" part of the implementation at the moment.
[0] https://docs.micropython.org/en/latest/library/sys.html https://docs.micropython.org/en/latest/library/sys.html
[1] https://github.com/micropython/micropython/blob/master/tests/misc/sys_settrace_generator.py https://github.com/micropython/micropython/blob/master/tests...
- stinos 6y agoFair point about the documentation, but I doubt it's allowed to fail: the 'except AttributeError' is only meant to skip the complete test for builds without support for it, builds which do support it will run the test and will result in a failed build status if the test fails. And yes it's a compile-time option, just like a 100 other features, that's just how it's done in MicroPython and doesn't necessarily equate to 'unstable'.
- shakna 6y agoBeing a compile time option isn't what contributed to the unstable part there - MicroPython is modular. That's part of the benefit of the system. That I couldn't find it enabled on any of the default builds is what made me conclude it might be unstable, especially as it is undocumented.
- stinos 6y agoThe reason for it not being enabled by default is probably twofold: code size increase/performance decrease, and it's not a feature which is used often especially not for the majority of targets.