Use build instead of setup.py Start transitioning into the PEP517 future of Python packaging by switching from explicitly calling setup.py to using the build module. Move install requirements into setup.cfg and update the install docs to refer to the new location. Get rid of the separate documentation build requirements file by moving into tox.ini deps for the docs testenv. While we're there, add some commentary in the tox.ini about some of the more opaque choices we've made for docs builds and testing YAML style.
Move debug warning from setup to load Relocate the warning logged about debug mode from the misc.setup() function to the Universe class load() method. This way, if debug mode is enabled in configuration during a live reload event, it will be logged. Also update the admin documentation to reflect that enabling or disabling debug can be done with a reload, not only a restart. Correct a minor spacing error in the configuration docs too.
Replace show result with debug evaluate command The show result subcommand was quite unsafe. Even though it limited the globals for strings passed to the env() builtin, it was still possible for admins to do things like call the exec() builtin and then import other modules, or use open() to overwrite files writeable by the user under which the engine was running. Introduce a new evaluate command as a substitute and remove the show result subcommand. Use the debugging framework to limit access to evaluate so that it's only available if debug mode is enabled in the configuration at the time the daemon is started. Further limit evaluate to not have most of the normal builtins, and explicitly reject any strings containing a double-underscore (__) so that base attributes of other modules such as __builtins__ can't be called into easily, or "lambda" so that lambda functions can't be used to work around protections. Also add some selftests to make sure evaluate can still use the expressions we previously tested with show result, and that only administrators can use it, and that it's only available to them when debug mode is enabled. The evaluate command is still to be considered quite unsafe, and debug mode should only be engaged when all administrators with access to the service are trusted with the same permissions the system account running the service also possesses.
Add warnings about debugging mode Debugging mode is intended to enable administrative commands which are especially unsafe and could even be used to run arbitrary shell commands or alter files accessible to the user under which the service runs. Log a warning about it at startup if the option has been set, and insert some comments to that effect in the sample configuration so that hopefully no one will turn it on without due forethought. Also add a mention about its risks in the config doc.
Add restricted debug mode Create a new configuration flag, .mudpy.limit.debug, which indicates unsafe debugging options will be available in the running engine. This is unused, but lays the groundwork for future unsafe commands to be toggled at start in base configuration.
Start checking codebase with the codespell tool Use master branch tip of codespell for now, until it supports configuration in the included .codespellrc in a released version. Also correct things its default dictionary selection identified as misspellings, with the exception of intentional misspellings in the sample spelling correction config and selftest which exercises it.
Overhaul coder guide, add commands and misc Brush up the quality of the coder guide, using relevant autodoc references and clearer markup, as well as improving some wording. Add a section on custom commands, and another for miscellaneous design discussions taken from various recent E-mail threads.
Drop section numbering from documentation builds Sphinx section numbering leads to confusing output, particularly for the rendered ChangeLog. Remove it. Update copyright year in the LICENSE as this is the first change of the new year, and similarly update it in rendered documentation footers as this is the first documentation change of the year.
Add a mudpy.menu module to hold menu functions In preparation for relocating arbitrary Python expressions out of the standard menu elements, provide a stub mudpy.menu module which will house equivalent convenience functions and include an autodoc section for it in the Sphinx API documentation template.
Add support for user preferences Make it possible for users to list, view and set values of any account facets white-listed in configuration. Also add administrator-only preferences as a convenience option. To have a means of exercising this, make the active state prompt dynamic so that each user can set it as a preferences. Include sample configuration, regression tests and documentation.