My code keeps some queues in singletons memory. Whenever I edit and reload any Python code, this state is zeroed out. Is there a way to keep singletons in memory through a reload event? The code being edited is not the module that holds the queues.
I have tried keeping state in globals, in a dynamically defined module, etc. I would prefer to keep the state in memory, not in files.
The project pydevd_reload says that it doesn't "break things such as singletons." I'd like to achieve that in the default PyCharm setup. Indeed, if I can write my singletons to work this way in any hot-reload system (so that this will work in other IDEs) that would be best.