Closed eoinell closed 4 years ago
Running https://github.com/nanophotonics/nplab/blob/python3/nplab/instrument/spectrometer/__init__.py , the variable_int_enabled and filename DumbNotifiedProperties fail to callback their registered functions. [python3]. Notified properties seem to work fine however, and notified_property's docstring works fine with but dumb and ordinary notified properties.
I traced why the registered functions weren't being called, the WeakSetholding the callbacks was being garbage-collected. Replacing this with set fixes this issue, at the potential cost of some memory.
WeakSet
set
Running https://github.com/nanophotonics/nplab/blob/python3/nplab/instrument/spectrometer/__init__.py , the variable_int_enabled and filename DumbNotifiedProperties fail to callback their registered functions. [python3]. Notified properties seem to work fine however, and notified_property's docstring works fine with but dumb and ordinary notified properties.