Skip to content

Draft: auto flush `key_registry` to git repo

Gerhard Raven requested to merge auto-flush-to-git into master
  • make sure new decodings are guaranteed to be flushed to git (unless explicitly opted out):

    previously, an explicit flush_to_git had to be called to make sure newly generated decoding keys were written to git -- with a warning in the __del__ of the key registry if that was not done. Note that only a warning was produced, as writing to git from __del__ was not possible, as was called when python was shutting down. So instead, this functionality has been moved to an 'exit handler' which is registered with the atexit module.

    note: there is a flag in the options to explicitly opt-out of writing to git which is still (of course) respected -- but if doing would lead to a total loss of keys (i.e. when they are also not written to the output manifest) a warning is printed.

Edited by Gerhard Raven

Merge request reports