1. Thomas Waldmann
  2. moin-2.0
Issue #6 resolved

wikiconfig_local change did not force autoreload

Reimar Bauer
created an issue

a change of wikiconfig_local (developer file of wikiconfig) needs a restart of the moin process because this file does not trigger autoreload.

Comments (3)

  1. Thomas Waldmann repo owner

    the autoreloader monitors everything in sys.modules (everything in MoinMoin/..., under env/..., in /usr/lib/python... and even wikiconfig.py (as that is imported from wikiconfig_local.py).

    But it does not monitor wikiconfig_local.py (and maybe, due to same reasons, not the config file given by -c or MOINCFG env var).

    This could be fixed by giving extra_files=... to Server() in MoinMoin.script, but wouldn't be nice code, because param parsing happens later and some code would likely need to get duplicated.

    A workaround is maybe to import yet another config from wikiconfig_local.py, so it ends up in sys.modules.

  2. Thomas Waldmann repo owner

    Yep, workaround works, use this as wikiconfig_local.py:

    from wikiconfig_editme import *

    and move all that used to be in wikiconfig_local.py to that wikiconfig_editme.py file.

  3. Log in to comment