python-clu 0.12.11__tar.gz → 0.12.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_clu-0.12.11 → python_clu-0.12.13}/.bumpversion.toml +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/CHANGELOG.md +126 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/PKG-INFO +1 -1
- python_clu-0.12.13/clu/__version__.py +1 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/abc.py +36 -41
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/env.py +14 -9
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/keymap.py +221 -83
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/keymapview.py +64 -49
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/legacy/base.py +16 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/ns.py +102 -43
- python_clu-0.12.13/clu/config/utils.py +146 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/data.py +77 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/dicts.py +112 -64
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/enums.py +5 -5
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/exporting.py +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/misc.py +6 -6
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/keyvalue.py +3 -3
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/naming.py +9 -4
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/predicates.py +2 -2
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/cli/ansidocs.py +3 -2
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/repl.py +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/treeline.py +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/testing/utils.py +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/PKG-INFO +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/SOURCES.txt +1 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/setup.py +1 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_dicts.py +12 -30
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_repr.py +2 -2
- python_clu-0.12.11/clu/__version__.py +0 -1
- {python_clu-0.12.11 → python_clu-0.12.13}/.coveragerc +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/.editorconfig +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/.gitchangelog.rc +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/.gitignore +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/.landscape.yml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/.travis.yml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/ABOUT.md +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/CLASSIFIERS.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/CLU_Treatment.md +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/CODE_OF_CONDUCT.md +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/LICENSE.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/MANIFEST.in +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/Makefile +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/README.md +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/appveyor.yml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/abstract.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/all.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/api/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/api/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/application.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/compilation/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/compilation/compiledb.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/compilation/macros.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/codecs.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/filebase.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/formats/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/formats/jsonfile.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/formats/picklefile.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/formats/tomlfile.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/formats/yamlfile.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/legacy/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/legacy/fieldtypes.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/legacy/settings.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/config/proxy.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/consts.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/enums.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/exceptions.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/constants/polyfills.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/csv.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/dispatch.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/extending.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/abc.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/appdirectories.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/filesystem.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/pypath.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/fs/sourcetree.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/importing/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/importing/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/importing/base.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/importing/proxy.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/mathematics.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/ansi.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/banners.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/cli/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/cli/boilerplate.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/cli/boilerplate_copy.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/cli/print_version.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/columnize.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repl/modules.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/repr.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/sanitizer.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/.gitignore +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/README.md +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/ansicolors.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/boilerplate.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/dictroast.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/forkumask.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/repl-bpython.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/repl-ipython.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/repl-ptpython.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/repl-pyzo.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/legacy/xdg-runtime.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/scripts/prediversus.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/shelving/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/shelving/redat.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/shelving/redis.conf +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/stdio.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/testing/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/testing/hook.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/testing/obsolete.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/testing/pytest.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/typespace/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/typespace/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/typespace/namespace.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/typology.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/version/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/version/__main__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/version/git_version.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/clu/version/read_version.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/codecov.yml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/conftest.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/.DS_Store +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/Makefile +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/doctrees/api.doctree +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/doctrees/environment.pickle +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/doctrees/generated/clu.doctree +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/doctrees/index.doctree +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/.buildinfo +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_sources/api.rst.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_sources/index.rst.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/alabaster.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/basic.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/badge_only.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/css/theme.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/custom.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/doctools.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/documentation_options.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/file.png +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/jquery-3.6.0.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/jquery.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/js/badge_only.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/js/html5shiv.min.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/js/theme.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/language_data.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/minus.png +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/plus.png +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/pygments.css +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/searchtools.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/underscore-1.13.1.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/_static/underscore.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/api.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/generated/clu.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/genindex.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/index.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/objects.inv +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/py-modindex.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/search.html +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/html/searchindex.js +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/build/man/clu.1 +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/make.bat +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/source/api.rst +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/source/conf.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/source/generated/clu.rst +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/docs/source/index.rst +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/autohook.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/post-push/00-coverage.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/pre-push/00-noop.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/scripts/coverage.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/scripts/display-issues.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/scripts/git-pushex +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/hooks/scripts/noop.sh +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/mypy.ini +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/noxfile.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/pyproject.toml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/pytest.ini +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/dependency_links.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/entry_points.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/requires.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/top_level.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/python_clu.egg-info/zip-safe +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/pytype.cfg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/changelog.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/dev.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/docs.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/install.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/codecov.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/docs.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/manifest.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/pyproject.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/repl.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/nox/tests.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/tox.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/requirements/typecheck.txt +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/direnv_transformed_env.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-module-list-example-small.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-module-list-example.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-module-list-example.pxd +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-testing-time-totals-example-small.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-testing-time-totals-example.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/clu-testing-time-totals-example.pxd +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/construx-and-capsela-small.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/construx-and-capsela.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/construx-and-capsela.pxd +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/images/toml-module-rant.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/scratch/nteract.ipynb +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/setup.cfg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/1-58.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/8600JC.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/8ba.png +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/IMG_20180505_205153567.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/cheetah-003.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/config/clu-config.toml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/config/yodogg.toml +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/shutterstock_90194617.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/data/yodogg/video-pride-serval.jpg +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_abstract.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_all.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_boilerplate.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_config.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_config_abc.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_csv.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_dispatch.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_enum_aliases.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_exporting.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_extending.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_fs_abc.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_fs_appdirectories.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_fs_filesystem.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_fs_misc.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_importing.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_keyvalue.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_mathematics.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_naming.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_predicates.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_repl_columnize.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_repl_modules.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_scripts_repl.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_typespace_namespace.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_typology.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/test_version.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/.tm_properties +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/yodogg/__init__.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/yodogg/config.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/yodogg/exporting.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tests/yodogg/yodogg/iheard.py +0 -0
- {python_clu-0.12.11 → python_clu-0.12.13}/tox.ini +0 -0
|
@@ -1,10 +1,135 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
## 0.12.
|
|
4
|
+
## 0.12.12:pre12+gf9e1a9f [SNAPSHOT]
|
|
5
|
+
|
|
6
|
+
### Add
|
|
7
|
+
|
|
8
|
+
* Added some useful rando dicts to `clu.constants.data` [Alexander Böhn]
|
|
5
9
|
|
|
6
10
|
### Other
|
|
7
11
|
|
|
12
|
+
* Nixed `clu.dicts.ChainMap.__eq__(…)` for the moment. [Alexander Böhn]
|
|
13
|
+
|
|
14
|
+
… because I have reason to believe that, at this time, it may suck.
|
|
15
|
+
|
|
16
|
+
* Tidying up and removing more dead code. [Alexander Böhn]
|
|
17
|
+
|
|
18
|
+
* Removed and renamed much in the `clu.keymap`/`clu.dicts` departments. [Alexander Böhn]
|
|
19
|
+
|
|
20
|
+
* Total overhaul of oh so much stuff in `clu.config` and `clu.dicts` [Alexander Böhn]
|
|
21
|
+
|
|
22
|
+
• For the most part, you pass actual namespaces in to a KeyMaps’
|
|
23
|
+
methods that say “namespaces”.
|
|
24
|
+
• Like: “flatmap.submap('yo:dogg', 'iheard:youlike')” works
|
|
25
|
+
• … as does “flatmap.keys('yo:dogg')” or “flatmap.items('yo:dogg')”
|
|
26
|
+
• … there was some touchy shit with this so watch this space for more
|
|
27
|
+
• Tests are updated accordingly (both inline and unit tests)
|
|
28
|
+
• Many changes in “clu.dicts” to afford different classes and speed
|
|
29
|
+
and things of that nature
|
|
30
|
+
• Added a new “clu.config.utils” module
|
|
31
|
+
• This contains ad-hoc name-based functions for “freezing” and
|
|
32
|
+
“thawing” classes – like you can do:
|
|
33
|
+
|
|
34
|
+
>>> from clu.config.utils import freeze_class, thaw_class
|
|
35
|
+
>>> from clu.config.keymap import Flat, FrozenFlat
|
|
36
|
+
>>> assert freeze_class(Flat) is FrozenFlat
|
|
37
|
+
>>> assert thaw_class(FrozenFlat) is Flat
|
|
38
|
+
|
|
39
|
+
… which is pretty neat, I think. It’s totally ad-hoc and fragile,
|
|
40
|
+
tho, so we will see what happens.
|
|
41
|
+
• Modified “clu.config.abc” to go with all of this
|
|
42
|
+
• Added some mapping fixture thingees to “clu.constants.data”
|
|
43
|
+
• Much other miscellany I am sure
|
|
44
|
+
|
|
45
|
+
… Yes!
|
|
46
|
+
|
|
47
|
+
* Rethinking and reworking how `KeyMap.submap(…)` thinks and works. [Alexander Böhn]
|
|
48
|
+
|
|
49
|
+
* An array of tweaks and optimizations to be found in `clu.dicts` [Alexander Böhn]
|
|
50
|
+
|
|
51
|
+
So. We got:
|
|
52
|
+
• A rewrite of “clu.dicts.merge_as(…)” that doesn’t just hopelessly
|
|
53
|
+
piggyback on “merge_two(¬)” of the same module, and keeps the dicts
|
|
54
|
+
in the right order
|
|
55
|
+
• Some of that “right order” mojo was sprinkled into the constructor
|
|
56
|
+
for “clu.dicts.ChainMap”
|
|
57
|
+
• “clu.dicts.ChainRepr” won’t identify builtin types (namely, “dict”)
|
|
58
|
+
as irritatingly coming from the “builtins” package
|
|
59
|
+
• Used frozensets in place of sets, wherever speedier
|
|
60
|
+
• Inline test names in “clu.dicts” make some a lot of sense
|
|
61
|
+
• Other miscellaneous shit
|
|
62
|
+
|
|
63
|
+
* Regex flags in `clu.fs.misc` are now handled cheaply and gracefully. [Alexander Böhn]
|
|
64
|
+
|
|
65
|
+
… meaning the defaults are computed in the function sigs, which also
|
|
66
|
+
means they may be modified at the whim of you, the user
|
|
67
|
+
|
|
68
|
+
* My my, there was much reserved-word-clobbering up in there. [Alexander Böhn]
|
|
69
|
+
|
|
70
|
+
… by “there” I mean “clu.dicts”; q.v. previous commit supra.
|
|
71
|
+
|
|
72
|
+
* No longer clobbering a reserved word (“map”) in `clu.dicts.ChainMap` [Alexander Böhn]
|
|
73
|
+
|
|
74
|
+
* Just a small addenda to my favorite CLU docstring. [Alexander Böhn]
|
|
75
|
+
|
|
76
|
+
* A bunch of new namespace tools for use in `clu.config` [Alexander Böhn]
|
|
77
|
+
|
|
78
|
+
To wit:
|
|
79
|
+
• The very deeply abstract base class now has an abstract method
|
|
80
|
+
definition specifically for the “submap(…)” signature (which this
|
|
81
|
+
was previously lacking).
|
|
82
|
+
|
|
83
|
+
• There’s a new “KeyedAccessor” class in “clu.config.keymap”, allowing
|
|
84
|
+
for proxied simple access to keymap elements. Like you can be like:
|
|
85
|
+
|
|
86
|
+
>>> nested = Nested(nested_data)
|
|
87
|
+
>>> accessor = KeyedAccessor(nested, "some:namespace:keypath")
|
|
88
|
+
>>> assert nested['some:namespace:keypath:key'] = accessor['key']
|
|
89
|
+
|
|
90
|
+
… at least, that’s the goal with that RN.
|
|
91
|
+
|
|
92
|
+
• There is also a “clean_ns(namespaced_string)” function, to be found
|
|
93
|
+
in “clu.config.ns”, and support regexes and one-liner functions
|
|
94
|
+
based on those regexes, and an inline test function.
|
|
95
|
+
|
|
96
|
+
• Trivial (really) fixes in “clu.exporting” and “clu.predicates” too.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## v0.12.12 (2025-06-03)
|
|
100
|
+
|
|
101
|
+
### Other
|
|
102
|
+
|
|
103
|
+
* Bumped version: 0.12.11 → 0.12.12. [Alexander Böhn]
|
|
104
|
+
|
|
105
|
+
* [make] New changelog added. [Alexander Böhn]
|
|
106
|
+
|
|
107
|
+
* Reaffirming the commands’ non-erroneousness AGAIN!! [Alexander Böhn]
|
|
108
|
+
|
|
109
|
+
* Reaffirming the commands’ non-erroneousness. [Alexander Böhn]
|
|
110
|
+
|
|
111
|
+
* Supress raising pointless `ValueError`s when running “clu-ansidocs” [Alexander Böhn]
|
|
112
|
+
|
|
113
|
+
* Properly assigning `__doc__` string. [Alexander Böhn]
|
|
114
|
+
|
|
115
|
+
* Small updates to `clu.enums` and `clu.naming.qualified_import(…)` [Alexander Böhn]
|
|
116
|
+
|
|
117
|
+
… “clu.enums” uses its DUNDER constant internally
|
|
118
|
+
… “clu.naming.qualified_import(…)” has an internally-used “recurse”
|
|
119
|
+
argument that basically disables the whole “qualified” check,
|
|
120
|
+
which by the way I am starting to see as totally unnecessary
|
|
121
|
+
|
|
122
|
+
* Docstring MUST OCCUR FIRST!!! in a thing. [Alexander Böhn]
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
## v0.12.11 (2025-05-25)
|
|
126
|
+
|
|
127
|
+
### Other
|
|
128
|
+
|
|
129
|
+
* Bumped version: 0.12.10 → 0.12.11. [Alexander Böhn]
|
|
130
|
+
|
|
131
|
+
* [make] New changelog added. [Alexander Böhn]
|
|
132
|
+
|
|
8
133
|
* Ahhhh my home-brewed classifier didn’t work, booooo. [Alexander Böhn]
|
|
9
134
|
|
|
10
135
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.12.13'
|
|
@@ -15,6 +15,7 @@ from clu.config.ns import unpack_ns, pack_ns, get_ns, compare_ns
|
|
|
15
15
|
from clu.config.keymapview import KeyMapKeysView, KeyMapItemsView, KeyMapValuesView
|
|
16
16
|
from clu.config.keymapview import NamespaceWalkerKeysView, NamespaceWalkerItemsView
|
|
17
17
|
from clu.config.keymapview import NamespaceWalkerValuesView
|
|
18
|
+
from clu.config.utils import freeze_class
|
|
18
19
|
|
|
19
20
|
from clu.naming import qualified_import, qualified_name, nameof
|
|
20
21
|
from clu.predicates import (typeof,
|
|
@@ -61,6 +62,11 @@ class FrozenKeyMapBase(collections.abc.Mapping,
|
|
|
61
62
|
""" Iterate over all of the namespaces defined in the mapping. """
|
|
62
63
|
...
|
|
63
64
|
|
|
65
|
+
@abstract
|
|
66
|
+
def submap(self, *namespaces, unprefixed=False):
|
|
67
|
+
""" Return a flattened dict containing only the namespaced items. """
|
|
68
|
+
...
|
|
69
|
+
|
|
64
70
|
@abstract
|
|
65
71
|
def __iter__(self):
|
|
66
72
|
...
|
|
@@ -143,13 +149,13 @@ class FrozenKeyMap(FrozenKeyMapBase):
|
|
|
143
149
|
""" Used by `clu.config.codecs` to deserialize keymaps """
|
|
144
150
|
return cls(instance_dict)
|
|
145
151
|
|
|
146
|
-
def get(self, key, *
|
|
152
|
+
def get(self, key, *fragments, default=NoDefault):
|
|
147
153
|
""" Retrieve a (possibly namespaced) value for a given key.
|
|
148
154
|
|
|
149
155
|
An optional default value may be specified, to be returned
|
|
150
156
|
if the key in question is not found in the mapping.
|
|
151
157
|
"""
|
|
152
|
-
nskey = pack_ns(key, *
|
|
158
|
+
nskey = pack_ns(key, *fragments)
|
|
153
159
|
if default is NoDefault:
|
|
154
160
|
return self[nskey]
|
|
155
161
|
if nskey in self:
|
|
@@ -158,12 +164,15 @@ class FrozenKeyMap(FrozenKeyMapBase):
|
|
|
158
164
|
|
|
159
165
|
def submap(self, *namespaces, unprefixed=False):
|
|
160
166
|
""" Return a flattened dict containing only the namespaced items. """
|
|
167
|
+
cls = freeze_class(type(self))
|
|
161
168
|
if unprefixed:
|
|
162
|
-
return { nskey : self[nskey] for nskey in self if NAMESPACE_SEP not in nskey }
|
|
169
|
+
return cls({ nskey : self[nskey] for nskey in self if NAMESPACE_SEP not in nskey })
|
|
163
170
|
if not namespaces:
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
return cls(self)
|
|
172
|
+
out = dict()
|
|
173
|
+
for namespace in namespaces:
|
|
174
|
+
out.update({ nskey : self[nskey] for nskey in self if nskey.startswith(namespace) })
|
|
175
|
+
return cls(out)
|
|
167
176
|
|
|
168
177
|
def keys(self, *namespaces, unprefixed=False):
|
|
169
178
|
""" Return a namespaced view over either all keys in the mapping,
|
|
@@ -198,15 +207,6 @@ class FrozenKeyMap(FrozenKeyMapBase):
|
|
|
198
207
|
def _get_namespace_foset(self):
|
|
199
208
|
return FlatOrderedSet(get_ns(nskey) for nskey in sorted(self) if NAMESPACE_SEP in nskey)
|
|
200
209
|
|
|
201
|
-
def _namespaces(self): # pragma: no cover
|
|
202
|
-
""" Iterate over all of the namespaces defined in the mapping.
|
|
203
|
-
|
|
204
|
-
This is the generic implementation. It depends on “__iter__(…)”,
|
|
205
|
-
as implemented by the concrete descendant.
|
|
206
|
-
"""
|
|
207
|
-
nss = { get_ns(nskey) for nskey in self if NAMESPACE_SEP in nskey }
|
|
208
|
-
yield from sorted(nss)
|
|
209
|
-
|
|
210
210
|
def namespaces(self):
|
|
211
211
|
yield from self._get_namespace_foset()
|
|
212
212
|
|
|
@@ -237,17 +237,17 @@ class KeyMap(KeyMapBase, FrozenKeyMap):
|
|
|
237
237
|
supra. for further deets, my doggie
|
|
238
238
|
"""
|
|
239
239
|
|
|
240
|
-
def set(self, key, value, *
|
|
240
|
+
def set(self, key, value, *fragments):
|
|
241
241
|
""" Set a (possibly namespaced) value for a given key. """
|
|
242
|
-
nskey = pack_ns(key, *
|
|
242
|
+
nskey = pack_ns(key, *fragments)
|
|
243
243
|
self[nskey] = value
|
|
244
244
|
|
|
245
|
-
def delete(self, key, *
|
|
245
|
+
def delete(self, key, *fragments):
|
|
246
246
|
""" Delete a (possibly namespaced) value from the mapping. """
|
|
247
|
-
nskey = pack_ns(key, *
|
|
247
|
+
nskey = pack_ns(key, *fragments)
|
|
248
248
|
del self[nskey]
|
|
249
249
|
|
|
250
|
-
def pop(self, key, *
|
|
250
|
+
def pop(self, key, *fragments, default=NoDefault):
|
|
251
251
|
""" Pop a (possibly namespaced) value off of the mapping
|
|
252
252
|
and return either that value, or a default value
|
|
253
253
|
if it doesn’t exist – raising a KeyError if no
|
|
@@ -256,10 +256,12 @@ class KeyMap(KeyMapBase, FrozenKeyMap):
|
|
|
256
256
|
# NoDefault never escapes to userland – the call to
|
|
257
257
|
# get(…) will raise the KeyError if NoDefault was passed
|
|
258
258
|
# (Q.v. “get(¬)” definition supra.)
|
|
259
|
-
value = self.get(key, *
|
|
259
|
+
value = self.get(key, *fragments, default=default)
|
|
260
|
+
if value is NoDefault:
|
|
261
|
+
return None
|
|
260
262
|
if value == default or value is default:
|
|
261
263
|
return value
|
|
262
|
-
self.delete(key, *
|
|
264
|
+
self.delete(key, *fragments)
|
|
263
265
|
return value
|
|
264
266
|
|
|
265
267
|
def popitem(self):
|
|
@@ -297,7 +299,8 @@ class KeyMap(KeyMapBase, FrozenKeyMap):
|
|
|
297
299
|
return None
|
|
298
300
|
if not namespaces:
|
|
299
301
|
return super().clear()
|
|
300
|
-
|
|
302
|
+
submaps = self.submap(*namespaces)
|
|
303
|
+
for nskey in submaps.keys():
|
|
301
304
|
del self[nskey]
|
|
302
305
|
return None
|
|
303
306
|
|
|
@@ -346,10 +349,10 @@ class NamespaceWalker(FrozenKeyMap):
|
|
|
346
349
|
Concrete subclasses must implement “walk(…)” such that it iterates
|
|
347
350
|
over all items in a given instance, yielding them in a form like:
|
|
348
351
|
|
|
349
|
-
for *
|
|
352
|
+
for *fragments, key, value in self.walk():
|
|
350
353
|
# …
|
|
351
354
|
|
|
352
|
-
… So an item with no
|
|
355
|
+
… So an item with no namespace prefix would yield “['key', 'value']”,
|
|
353
356
|
but one with three would yield “['do', 're', 'me', 'key', 'value']”.
|
|
354
357
|
|
|
355
358
|
See the “mapwalk(…)” and “envwalk(…)” function implementations,
|
|
@@ -371,18 +374,10 @@ class NamespaceWalker(FrozenKeyMap):
|
|
|
371
374
|
if cls is None:
|
|
372
375
|
from clu.config.keymap import FrozenFlat
|
|
373
376
|
cls = FrozenFlat
|
|
374
|
-
return cls({ pack_ns(key, *
|
|
375
|
-
|
|
376
|
-
def _namespaces(self): # pragma: no cover
|
|
377
|
-
""" Iterate over all of the namespaces defined in the mapping. """
|
|
378
|
-
nss = set()
|
|
379
|
-
for *namespaces, key, value in self.walk():
|
|
380
|
-
if namespaces:
|
|
381
|
-
nss.add(concatenate_ns(*namespaces))
|
|
382
|
-
yield from sorted(nss)
|
|
377
|
+
return cls({ pack_ns(key, *fragments) : value for *fragments, key, value in self.walk() })
|
|
383
378
|
|
|
384
379
|
def _get_namespace_foset(self):
|
|
385
|
-
return FlatOrderedSet(concatenate_ns(*
|
|
380
|
+
return FlatOrderedSet(concatenate_ns(*fragments) for *fragments, _, _ in self.walk() if fragments)
|
|
386
381
|
|
|
387
382
|
def keys(self, *namespaces, unprefixed=False):
|
|
388
383
|
""" Return a namespaced view over either all keys in the mapping,
|
|
@@ -412,25 +407,25 @@ class NamespaceWalker(FrozenKeyMap):
|
|
|
412
407
|
return NamespaceWalkerValuesView(self, *namespaces)
|
|
413
408
|
|
|
414
409
|
def __iter__(self):
|
|
415
|
-
for *
|
|
416
|
-
yield pack_ns(key, *
|
|
410
|
+
for *fragments, key, value in self.walk():
|
|
411
|
+
yield pack_ns(key, *fragments)
|
|
417
412
|
|
|
418
413
|
def __len__(self):
|
|
419
414
|
return iterlen(self.walk())
|
|
420
415
|
|
|
421
416
|
def __contains__(self, nskey):
|
|
422
|
-
key,
|
|
417
|
+
key, fragments = unpack_ns(nskey)
|
|
423
418
|
for *ns, k, value in self.walk():
|
|
424
419
|
if k == key:
|
|
425
|
-
if compare_ns(ns,
|
|
420
|
+
if compare_ns(ns, fragments):
|
|
426
421
|
return True
|
|
427
422
|
return False
|
|
428
423
|
|
|
429
424
|
def __getitem__(self, nskey):
|
|
430
|
-
key,
|
|
425
|
+
key, fragments = unpack_ns(nskey)
|
|
431
426
|
for *ns, k, value in self.walk():
|
|
432
427
|
if k == key:
|
|
433
|
-
if compare_ns(ns,
|
|
428
|
+
if compare_ns(ns, fragments):
|
|
434
429
|
return value
|
|
435
430
|
raise KeyError(nskey)
|
|
436
431
|
|
|
@@ -27,9 +27,9 @@ def envwalk(appname, mapping):
|
|
|
27
27
|
"""
|
|
28
28
|
app_prefix = prefix_env(appname)
|
|
29
29
|
for envkey in (ek for ek in mapping.keys() if ek.startswith(app_prefix)):
|
|
30
|
-
an, key,
|
|
30
|
+
an, key, fragments = unpack_env(envkey)
|
|
31
31
|
assert an == appname
|
|
32
|
-
yield
|
|
32
|
+
yield fragments + [key, mapping[envkey]]
|
|
33
33
|
|
|
34
34
|
@export
|
|
35
35
|
class FrozenEnviron(NamespaceWalker, clu.abstract.ReprWrapper,
|
|
@@ -50,9 +50,14 @@ class FrozenEnviron(NamespaceWalker, clu.abstract.ReprWrapper,
|
|
|
50
50
|
| +–––––––––––– namespaces (uppercased, one value)
|
|
51
51
|
+––––––––––––––––––– app name (uppercased)
|
|
52
52
|
|
|
53
|
-
…
|
|
54
|
-
of
|
|
55
|
-
|
|
53
|
+
… this corresponds to the namespaced key “iheard:youlike” from
|
|
54
|
+
an instance of “clu.config.env.Environ” initialized for the
|
|
55
|
+
appname “yodogg” (say). You can have multiple namespaces in an
|
|
56
|
+
environment key like the above – just add underscores. For
|
|
57
|
+
example, “YODOGG_I_HEARD_YOU_LIKE” differs from our given example
|
|
58
|
+
because it translates to the namespaced key “i:heard:you:like”,
|
|
59
|
+
which, you will note, is different.
|
|
60
|
+
|
|
56
61
|
"""
|
|
57
62
|
|
|
58
63
|
__slots__ = ('environment', 'appname')
|
|
@@ -198,8 +203,8 @@ def test():
|
|
|
198
203
|
""" FrozenEnviron and “envwalk(…)” namespaced-key check """
|
|
199
204
|
env = FrozenEnviron()
|
|
200
205
|
|
|
201
|
-
for *
|
|
202
|
-
nskey = pack_ns(key, *
|
|
206
|
+
for *fragments, key, value in envwalk('clu', os.environ.copy()):
|
|
207
|
+
nskey = pack_ns(key, *fragments)
|
|
203
208
|
assert nskey in env
|
|
204
209
|
|
|
205
210
|
@inline
|
|
@@ -208,8 +213,8 @@ def test():
|
|
|
208
213
|
updates = { 'yo' : 'dogg', 'iheard' : 'you like' }
|
|
209
214
|
env = FrozenEnviron(**updates)
|
|
210
215
|
|
|
211
|
-
for *
|
|
212
|
-
nskey = pack_ns(key, *
|
|
216
|
+
for *fragments, key, value in envwalk('clu', os.environ.copy()):
|
|
217
|
+
nskey = pack_ns(key, *fragments)
|
|
213
218
|
assert nskey in env
|
|
214
219
|
|
|
215
220
|
# getenv(…) key check:
|