Clarify log message about missing data files When files are going to be written to and don't exist yet, such as on new installations, make it clearer in the log that this is not actually a problem.
Close data files after reading Starting with Python 3.8, the interpreter raises a ResourceWarning exception during garbage collection if it finds an unclosed file descriptor. Because of where this exception gets raised, it's ignored (but a warning is emitted on stderr). Use a typical context block in our loop to load data files, so that this condition won't occur.
Don't LBYL when creating missing data directories It's better to ask forgiveness than permission. Just try to create parent directories for any data file, and don't error if they already exist.
Generalize copyright headers in files Since we're distributing an AUTHORS file even in wheel packages now replace the specific copyright strings with ones which generally mention "mudpy authors" instead, refer to the AUTHORS file and Git history from the LICENSE file, and embed the generated list of authors in rendered versions of the license.
Resolve included files only once Remove an unnecessary additional round of included file resolution and rely on the one which happens once the parent file has been completely loaded. This was causing a startup race which would sometimes result in the configured search path to not get applied depending on initial config file load order, because it would prematurely attempt to resolve included files before the configured search path was loaded.
Overhaul data reloading The data model change left the reload feature in a miserable state causing facets of mutable elements to be lost, changes introduced in read-only origins to be ignored, and so on. Simplify the implementation to just save, wipe and re-read all persistent data as if the engine were starting initially. Also add a basic check to the reload test to make sure a mutable element still has facets after reloading, so that we reduce the risk of future regression. Include a bit more verbose logging around when and what files are read at load/reload time.
Indent block sequences in emitted files Override the default Emitter and Dumper from the pyyaml library to introduce (or more specifically stop suppressing) indentation when writing block sequences. Also adjust the dump parameters to match the indentation and related style used for included sample data and configuration files.
Use "group" instead of "category" Update all uses of category/categories to group/groups. Also add selftests for the "show groups" and "show group <group>" commands.
Drop old-style Element support The transition to the new data model is complete, and support for the old model is now removed.
Clean up a stray comment in find_file Remove a long-lived cruft comment line from the data.find_file() function, obsoleted back when filename normalization was broken out of the return line into some more explicit earlier calls (prior to the initial archive import into Git).
Data nodes starting with "_" are metadata Avoid loading data nodes with a "_" prefix as Universe content. These are only used as file-local metadata.
Interpret a "." prefix as the startdir Since daemonization explicitly changes the working directory to "/", specifying a mudpy.filing.prefix of "." should be taken to refer to the original starting directory recorded in Universe.startdir rather than the current directory for the process.
Overhaul data management to get rid of __control__ Remap __control__ subkeys in data as follows: default_files -> .mudpy.filing.categories include_dirs -> _load include_files -> _load read_only -> _lock Additionally, obsolete the __control__.private_files key by switching from raw file/directory names to associative arrays in the category defaults so that flags such as "private" can be added to them, and make the category filenames automatically determined so that they can be omitted unless specific overrides are required. For the sake of future-proofing, rename the DataFile class to Data and its "filename" attribute to "source" so that we avoid confusing renames later when these might instead refer to some other storage medium such as a table in a database. Similarly rename the Element class attribute "filename" to "origin" attribute both to make it more generic and to avoid confusion with "source" (an Element's origin is a complete Data object, while a Data's source is just a rooted-anchored file path currently). Add a Universe.add_category convenience method to handle properly guessing the corresponding fallback path and copying any declared flags.
Update copyright dates for files changed this year Bump the copyright date to the present for files which received significant modification since the beginning of the year.
Rename internal:storage to .mudpy.filing Convert the old style internal:storage element to a new style .mudpy.filing element and adjust the find_file() function accordingly.
Stop unnecessarily stripping quote marks Since the switch to YAML, quotations around strings are automatically interpreted an so not included in the parsed result. Remove legacy code which stripped leading and trailing quotes from string values as this is no longer needed.
Fix file pathing in daemon mode If run as a daemon, the working directory is reset to "/" for safety. Make sure that relative file searching takes this into account and prefixes with the original (pre-chdir) start directory rather than the current working directory.
Use raw strings when escape sequences are needed Python 3.6 has added a DeprecationWarning for any regular strings containing non-doubled backslash escapes. Use raw strings for these instead so we'll be ready when the old syntax is eventually disallowed.
Guard against KeyError on universe.contents index When accessing base level configuration elements from the main engine, check that they're actually in universe.contents before trying to retrieve their facets. Also use sane default fallbacks if they're undefined.
Appease style checks Once more the PEP8 gods stir to anger. Sate their fury with a generous offering of whitespace, such that they might return to their baleful slumber.