python-clu 0.11.5__tar.gz → 0.12.1__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.11.5 → python_clu-0.12.1}/.bumpversion.toml +1 -1
- {python_clu-0.11.5 → python_clu-0.12.1}/CLASSIFIERS.txt +0 -1
- {python_clu-0.11.5 → python_clu-0.12.1}/PKG-INFO +1 -2
- python_clu-0.12.1/README.md +445 -0
- python_clu-0.12.1/clu/__version__.py +1 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/abstract.py +12 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/abc.py +1 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/exporting.py +26 -16
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/filesystem.py +4 -3
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/naming.py +1 -1
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/ansi.py +7 -8
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/repl.py +5 -5
- python_clu-0.12.1/docs/.DS_Store +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/PKG-INFO +1 -2
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/SOURCES.txt +1 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/setup.py +1 -5
- python_clu-0.11.5/README.md +0 -51
- python_clu-0.11.5/clu/__version__.py +0 -1
- {python_clu-0.11.5 → python_clu-0.12.1}/.coveragerc +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/.editorconfig +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/.gitchangelog.rc +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/.gitignore +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/.landscape.yml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/.travis.yml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/ABOUT.md +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/CHANGELOG.md +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/CODE_OF_CONDUCT.md +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/COPYING.md +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/LICENSE.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/MANIFEST.in +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/Makefile +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/appveyor.yml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/all.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/api/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/api/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/application.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/compilation/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/compilation/compiledb.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/compilation/macros.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/base.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/codecs.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/env.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/fieldtypes.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/filebase.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/formats/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/formats/jsonfile.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/formats/picklefile.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/formats/tomlfile.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/formats/yamlfile.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/keymap.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/keymapview.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/ns.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/proxy.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/config/settings.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/consts.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/data.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/enums.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/exceptions.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/constants/polyfills.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/csv.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/dicts.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/dispatch.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/enums.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/extending.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/abc.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/appdirectories.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/misc.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/pypath.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/fs/sourcetree.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/importing/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/importing/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/importing/base.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/importing/proxy.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/keyvalue.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/mathematics.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/predicates.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/banners.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/cli/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/cli/boilerplate.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/cli/boilerplate_copy.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/cli/print_version.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/columnize.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repl/modules.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/repr.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/sanitizer.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/.gitignore +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/README.md +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/ansicolors.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/boilerplate.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/dictroast.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/forkumask.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/repl-bpython.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/repl-ipython.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/repl-ptpython.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/repl-pyzo.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/legacy/xdg-runtime.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/prediversus.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/scripts/treeline.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/shelving/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/shelving/redat.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/shelving/redis.conf +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/stdio.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/testing/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/testing/hook.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/testing/obsolete.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/testing/pytest.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/testing/utils.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/typespace/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/typespace/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/typespace/namespace.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/typology.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/version/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/version/__main__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/version/git_version.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/clu/version/read_version.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/codecov.yml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/conftest.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/Makefile +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/doctrees/api.doctree +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/doctrees/environment.pickle +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/doctrees/generated/clu.doctree +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/doctrees/index.doctree +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/.buildinfo +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_sources/api.rst.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_sources/index.rst.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/alabaster.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/basic.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/badge_only.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/css/theme.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/custom.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/doctools.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/documentation_options.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/file.png +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/jquery-3.6.0.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/jquery.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/js/badge_only.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/js/html5shiv.min.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/js/theme.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/language_data.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/minus.png +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/plus.png +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/pygments.css +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/searchtools.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/underscore-1.13.1.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/_static/underscore.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/api.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/generated/clu.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/genindex.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/index.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/objects.inv +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/py-modindex.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/search.html +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/html/searchindex.js +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/build/man/clu.1 +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/make.bat +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/source/api.rst +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/source/conf.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/source/generated/clu.rst +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/docs/source/index.rst +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/autohook.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/post-push/00-coverage.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/pre-push/00-noop.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/scripts/coverage.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/scripts/display-issues.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/scripts/git-pushex +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/hooks/scripts/noop.sh +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/mypy.ini +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/noxfile.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/pyproject.toml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/pytest.ini +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/dependency_links.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/entry_points.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/requires.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/top_level.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/python_clu.egg-info/zip-safe +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/pytype.cfg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/changelog.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/dev.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/docs.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/install.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/nox/codecov.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/nox/docs.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/nox/manifest.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/nox/repl.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/nox/tests.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/tox.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/requirements/typecheck.txt +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/scratch/direnv_transformed_env.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/scratch/nteract.ipynb +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/setup.cfg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/1-58.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/8600JC.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/8ba.png +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/IMG_20180505_205153567.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/cheetah-003.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/config/clu-config.toml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/config/yodogg.toml +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/shutterstock_90194617.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/data/yodogg/video-pride-serval.jpg +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_abstract.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_all.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_boilerplate.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_config.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_config_abc.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_csv.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_dicts.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_dispatch.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_enum_aliases.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_exporting.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_extending.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_fs_abc.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_fs_appdirectories.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_fs_filesystem.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_fs_misc.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_importing.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_keyvalue.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_mathematics.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_naming.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_predicates.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_repl_columnize.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_repl_modules.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_repr.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_scripts_repl.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_typespace_namespace.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_typology.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/test_version.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/.tm_properties +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/yodogg/__init__.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/yodogg/config.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/yodogg/exporting.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tests/yodogg/yodogg/iheard.py +0 -0
- {python_clu-0.11.5 → python_clu-0.12.1}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.1
|
|
4
4
|
Summary: CLU - Common Lightweight Utilities, or Command-Line Utilities (your pick)
|
|
5
5
|
Home-page: https://github.com/fish2000/clu
|
|
6
6
|
Download-URL: https://github.com/fish2000/clu/zipball/master
|
|
@@ -10,7 +10,6 @@ License: MIT
|
|
|
10
10
|
Keywords: command utilities clu fish2000 command-line modules predicates REPL tools
|
|
11
11
|
Platform: any
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
13
|
Classifier: Framework :: Pytest
|
|
15
14
|
Classifier: Intended Audience :: Developers
|
|
16
15
|
Classifier: Topic :: Software Development
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
[Python-CLU][clu] – Common Lightweight Utilities
|
|
2
|
+
========================================================
|
|
3
|
+
|
|
4
|
+
[](https://codecov.io/gh/fish2000/CLU/)
|
|
5
|
+
|
|
6
|
+
Install it right now! [Download][download-link] or type: `$ pip install -U python-clu`
|
|
7
|
+
------------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
The deal with CLU is, it is a bunch of stuff. Like, a junk drawer… but a junk drawer
|
|
10
|
+
full of building sets: [Legos][lego-link], [Robotix][robotix-link], [Capsela][capsela-link]
|
|
11
|
+
– and also magic interfaces that let somehow you plug Legos into Capselas and all
|
|
12
|
+
that. It’s a la carte: you can use one part of CLU (say the [inline testing stuff][clu.testing.utils])
|
|
13
|
+
and ignore the rest. Or just the [`exporter`][clu.exporting], or just the [`predicates`][clu.predicates]
|
|
14
|
+
collection. Naturally, these things taste great and also taste great together, too.
|
|
15
|
+
|
|
16
|
+
[](https://www.reddit.com/r/Xennials/comments/1aixaq7/construx_and_capsela_anyone_else_have_any/)
|
|
17
|
+
|
|
18
|
+
CLU started out as a packaged-up and sanely written version of
|
|
19
|
+
[the Python tools I wrote for my REPLs][homage-replutilities-link], divided up into
|
|
20
|
+
a bunch of subordinate packages. It’s grown magnificently since then (if I do say so myself).
|
|
21
|
+
And if you are wondering if “CLU” is a Tron reference, [you are correct][clu-tron-link].
|
|
22
|
+
“CLU” stands for “Common Lightweight Utilities” – it started out as an acronym for
|
|
23
|
+
“Command-Line Utilities” but it has grown useful beyond that scope, indeed.
|
|
24
|
+
|
|
25
|
+
The subordinate packages are pretty well-divided: [`clu.config`][clu.config] contains
|
|
26
|
+
things to help with configuration, like [config-file loading and saving][clu.config.filebase],
|
|
27
|
+
and data structures like [our famous namespaced keymaps][clu.config.keymap].
|
|
28
|
+
[`clu.exporting`][clu.exporting] has the `@export` decorator, a utility to easily label module
|
|
29
|
+
members for export by adding them to a modules’ `__all__` and `__dir__` members,
|
|
30
|
+
plus other stuff like real-name determination. Which, speaking of which, [`clu.naming`][clu.naming]
|
|
31
|
+
has additional easy functions for dealing with the names of your things and other peoples’,
|
|
32
|
+
and [`clu.repr`][clu.repr] has stuff for easily printing, getting, and specifying an objects’
|
|
33
|
+
string representation.
|
|
34
|
+
|
|
35
|
+
You’ll like [`clu.abstract`][clu.abstract] if you like building class towers – we have ABCs
|
|
36
|
+
for all types of things. If you like [`dict`s][dicts], check out the aforementioned [`clu.config.keymap`][clu.config.keymap]
|
|
37
|
+
and [`clu.dicts`][clu.dicts] modules – you’ll find things to build dictionary types, represent
|
|
38
|
+
them, and deal with them later. [`clu.dispatch`][clu.dispatch] will help you manage
|
|
39
|
+
subprocesses easily, [`clu.version`][clu.version] is better then [`semver`][semver-link]
|
|
40
|
+
(I promise), [`clu.testing`][clu.testing] is great for inlining some quick unit tests, and
|
|
41
|
+
[`clu.scripts`][clu.scripts] and [`clu.repl`][clu.repl] are what you want for whatever your
|
|
42
|
+
REPL environment may be… [`bpython`][bpython-link], [`ipython`][ipython-link],
|
|
43
|
+
[`ptpython`][ptpython-link], and many others I am sure!
|
|
44
|
+
|
|
45
|
+
So do have a look around. Here’s an abridged breakdown of some things within:
|
|
46
|
+
|
|
47
|
+
* [`config`][clu.config]: Tons of useful things for dealing with your app’s configuration. These are centered
|
|
48
|
+
around lexically namespaced dictionaries called “KeyMaps”, which basic examples of which can be
|
|
49
|
+
found in [`clu.config.keymap`][clu.config.keymap]. If your nested data looks like:
|
|
50
|
+
|
|
51
|
+
data = {
|
|
52
|
+
'yo' : {
|
|
53
|
+
'dogg' : {
|
|
54
|
+
'i-heard' : {
|
|
55
|
+
'you-like' : "nested data"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
… and you assign it to a keymap, like e.g. `keyed = keymap.Nested(data).flatten()`, then you can
|
|
62
|
+
use `keyed` like so:
|
|
63
|
+
|
|
64
|
+
assert keyed["yo:dogg:i-heard:you-like"] == "nested data"
|
|
65
|
+
|
|
66
|
+
… The `Flat` and `Nested` classes are cheap to construct and lightweight, and generally act like most
|
|
67
|
+
[`dict`][dicts] instances in most of the expected ways. There is also an environment-variable [`keymap`][clu.config.keymap]
|
|
68
|
+
adapter in [`clu.config.env`][clu.config.env], which if your app uses environment variables that look like like
|
|
69
|
+
`MYAPP_CONFIG_THINGY`, they can be accessed through `env.FrozenEnviron(appname='myapp')` or
|
|
70
|
+
`env.Environ(appname='myapp')` like so:
|
|
71
|
+
|
|
72
|
+
appenv = Environ(appname='myapp')
|
|
73
|
+
assert appenv['config:thingy'] == "some value"
|
|
74
|
+
appenv['config:doohickey'] = "a different value" # sets MYAPP_CONFIG_DOOHICKEY
|
|
75
|
+
# in the current env
|
|
76
|
+
|
|
77
|
+
… and there are plenty of tools for rolling your own `KeyMap`s in [`clu.config`][clu.config]: the
|
|
78
|
+
[`proxy`][clu.config.proxy] subpackage has a `KeyMap` proxy class, [`ns`][clu.config.ns] has utility functions
|
|
79
|
+
for manipulating namespace strings, [`keymapview`][clu.config.keymapview] has a class tower for
|
|
80
|
+
[`KeyMap`][clu.config.keymap] key/value/item views, and [`abc`][clu.config.abc] has, as you’d expect, all
|
|
81
|
+
the abstract base classes upon which our [`KeyMap`s][clu.config.keymap] are built, for your perusal and
|
|
82
|
+
eventual enjoyment.
|
|
83
|
+
|
|
84
|
+
* [`constants`][clu.constants]: Definitions of [useful constants][clu.constants.consts], as well as
|
|
85
|
+
[polyfills][clu.constants.polyfills] to allow certain dependencies from the Python standard library to work even
|
|
86
|
+
when some of their moving parts are missing (i.e. Ye Olde Pythone 2.7, various PyPy implementations, etc).
|
|
87
|
+
|
|
88
|
+
* [`fs`][clu.fs]: Filesystem-related things. Submodules include:
|
|
89
|
+
|
|
90
|
+
* [`fs.filesystem`][clu.fs.filesystem]: classes representing filesystem primitives like `Directory`,
|
|
91
|
+
`TemporaryDirectory`, `TemporaryName`; a version of [`tempfile.NamedTemporaryFile`][tempfile.NamedTemporaryFile]
|
|
92
|
+
that works with or without the leading dot in the provided suffix (a peeve of mine); functions
|
|
93
|
+
for common filesystem operations like `which(…)`, `back_ticks(…)`, `rm_rf(…)` (be careful
|
|
94
|
+
with that one), and so forth.
|
|
95
|
+
|
|
96
|
+
* The `Directory` class is particularly extensive, with methods for [Zipfile][zipfile] archiving, searching
|
|
97
|
+
for importable Python files and others, file-suffix histograms, context-managed working-directory
|
|
98
|
+
management, walking and reverse-walking, and much more.
|
|
99
|
+
|
|
100
|
+
* [`fs.appdirectories`][clu.fs.appdirectories]: Started out as a pretty much wholesale duplication of the popular
|
|
101
|
+
[`appdirs`][appdirs-link] package[<sup>†</sup>](#dagger) – but it’s been kitted out with man CLUish things, e.g.
|
|
102
|
+
[`clu.fs.filesystem.Directory`][clu.fs.filesystem] instances. A solid upgrade in my opinion!
|
|
103
|
+
|
|
104
|
+
* [`fs.misc`][clu.fs.misc]: a bunch of useful miscellany – noteworthy standouts include regex utility functions for
|
|
105
|
+
constructing filename regex match or exclusion tests.
|
|
106
|
+
|
|
107
|
+
* [`fs.pypath`][clu.fs.pypath]: functions for safe manipulation of [`sys.path`][sys.path] – `enhance(…)`,
|
|
108
|
+
`remove_paths(…)`, `remove_invalid_paths()`, &c.
|
|
109
|
+
|
|
110
|
+
* [`importing`][clu.importing]: a whole class-based-module system! Basically you can do this:
|
|
111
|
+
|
|
112
|
+
class Derived(clu.importing.base.Module):
|
|
113
|
+
|
|
114
|
+
""" I heard you like docstrings """
|
|
115
|
+
|
|
116
|
+
yo = 'dogg'
|
|
117
|
+
|
|
118
|
+
@export
|
|
119
|
+
def yodogg(self):
|
|
120
|
+
return "I heard you like"
|
|
121
|
+
|
|
122
|
+
@export
|
|
123
|
+
def nodogg(self):
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
export(yo, name='yo')
|
|
127
|
+
|
|
128
|
+
from clu.app import Derived as derived # TAKE NOTE!!!
|
|
129
|
+
|
|
130
|
+
assert isinstance(derived, Module)
|
|
131
|
+
assert derived.yo == 'dogg'
|
|
132
|
+
assert derived.yodogg() == "I heard you like"
|
|
133
|
+
assert derived.nodogg() is None
|
|
134
|
+
|
|
135
|
+
… see that? just by subclassing [`clu.importing.base.Module`][clu.importing.base] you can create something
|
|
136
|
+
instantly importable. Awesome, wouldn’t you say? I would say. We’re working out the best way to create the
|
|
137
|
+
base `Module` for your own project (the machinery is there but the semantics are not yet perfect) but do feel
|
|
138
|
+
free to play around with the stuff in [`clu.importing.base`][clu.importing.base], and have a look at the
|
|
139
|
+
implementation in [`clu.importing.proxy`][clu.importing.proxy] of the “parameterized” `ProxyModule` (there’s a
|
|
140
|
+
`ChainModuleMap` container available in the [`proxy`][clu.importing.proxy] submodule, too).
|
|
141
|
+
|
|
142
|
+
* [`repl`][clu.repl] and [`scripts`][clu.scripts]: Tools useful in Python REPL environments. In [`clu.repl`][clu.repl],
|
|
143
|
+
there’s a while module full of ANSI printing and formatting utilities, many of them as classes, a [`columnize`][clu.repl.columnize]
|
|
144
|
+
function for, uh, printing things in columns[<sup>†</sup>](#dagger), and a [`modules`][clu.repl.modules] submodule
|
|
145
|
+
focused on printing things about your project’s modules and submodules.
|
|
146
|
+
|
|
147
|
+
[`clu.scripts`][clu.scripts] contains a [“repl.py”][clu.scripts.repl] file, which is meant to be loaded into an interactive interpreter like e.g.:
|
|
148
|
+
|
|
149
|
+
$ bpython -i «PATH_TO_CLU»/clu/scripts/repl.py
|
|
150
|
+
|
|
151
|
+
… which will set all of CLU up for you to use interactively. N.B. if you have your own script you want to include
|
|
152
|
+
but stil want to use CLU, you can set the `CLU_USER_SCRIPT` environment variable to the path to your own script,
|
|
153
|
+
and our “repl.py” script will pick it up.
|
|
154
|
+
|
|
155
|
+
[`clu.scripts`][clu.scripts] also contains [`treeline`][clu.scripts.treeline] and [`dictroast`][clu.scripts.dictroast], which
|
|
156
|
+
are CLU’s nascent command-line parsing utilities. They make use of the CLU `KeyMap` idiom (q.v. note _supra_)
|
|
157
|
+
and are being worked on right this very µsecond!
|
|
158
|
+
|
|
159
|
+
* [`typespace`][clu.typespace]: Contains a submodule `typespace.namespace` defining `SimpleNamespace` (á la Python 3’s
|
|
160
|
+
[`types.SimpleNamespace`][types.SimpleNamespace]) and a slightly more useful `Namespace` ancestor class;
|
|
161
|
+
these are used to furnish a `typespace.types` namespace that contains everything in the standard-library
|
|
162
|
+
[`types`][types] module, but with all the typenames shortened so they no longer gratuitously end in “Type”. Like e.g.
|
|
163
|
+
[`types.ModuleType`][types.ModuleType] is to be found in `typespace.types.Module`, [`types.FunctionType`][types.FunctionType]
|
|
164
|
+
is `typespace.types.Function`, et cetera, ad nauseum, so you can just do `from clu.typespace import types`
|
|
165
|
+
to lose the redundant “Type” naming suffix – which I don’t know about you but that annoys me, I mean we all know
|
|
166
|
+
that these things are types because they are in the fucking [`types`][types] module and don’t need those overly verbose extra four characters
|
|
167
|
+
there at the end. ALSO, there are additional useful types, from Python’s standard library and common packages,
|
|
168
|
+
in the [`types` namespace][clu.typespace.namespace]. YOU’RE WELCOME!!
|
|
169
|
+
|
|
170
|
+
* [`dicts`][clu.dicts]: Functions and classes for wrangling [`dict`s][dicts] (and actually [`Mapping`][collections.abc.Mapping]
|
|
171
|
+
and [`MutableMapping`][collections.abc.MutableMapping] descendants in general). There are ABCs for
|
|
172
|
+
key/value/item views for your own mappings, a much better `ChainMap`, written from scratch and improving
|
|
173
|
+
on [`collections.ChainMap`][collections.ChainMap], plus a `ChainRepr` based on [`reprlib.Repr`][reprlib.Repr],
|
|
174
|
+
and a whole bunch of fast dict-merging functions.
|
|
175
|
+
|
|
176
|
+
* [`exporting`][clu.exporting]: This is kind of the heart of CLU. At the beginning of all internal CLU modules, you’ll find something
|
|
177
|
+
using the `Exporter`, like this:
|
|
178
|
+
|
|
179
|
+
from clu.exporting import Exporter
|
|
180
|
+
|
|
181
|
+
exporter = Exporter(path=__file__)
|
|
182
|
+
export = exporter.decorator()
|
|
183
|
+
|
|
184
|
+
… which I know, I know, the use of `__file__` there is kind of irritating. But that `exporter` instance is now
|
|
185
|
+
registered with CLU, and whenever there’s a class or function you want made available outside the module,
|
|
186
|
+
you can specify it like:
|
|
187
|
+
|
|
188
|
+
@export
|
|
189
|
+
def public_function():
|
|
190
|
+
print("I’m so public")
|
|
191
|
+
|
|
192
|
+
class PrivateAncestor:
|
|
193
|
+
""" I’m more private, don’t play with me """
|
|
194
|
+
|
|
195
|
+
@export
|
|
196
|
+
class PublicThing(PrivateAncestor):
|
|
197
|
+
""" I’m very public, indeed, and available """
|
|
198
|
+
|
|
199
|
+
At the end of the module (but before your CLU tests, q.v. note _sub_.) you put:
|
|
200
|
+
|
|
201
|
+
__all__, __dir__ = exporter.all_and_dir()
|
|
202
|
+
|
|
203
|
+
… which makes things clear what is public and what is private to consumers of your code, without messing
|
|
204
|
+
around with underscore prefixes, which I find coarse, and vulgar. You’re not just labeling things for export,
|
|
205
|
+
though: [`clu.exporting`][clu.exporting] has tons of machinery for finding out the **“true name”** of a thing,
|
|
206
|
+
be it a class (easy), a function (trickier but still easy), an instance (trickier still), and a module variable (totally
|
|
207
|
+
very tricky indeed).
|
|
208
|
+
|
|
209
|
+
For your own project, at some part in your code, all you have to do is: `from clu.exporting import ExporterBase`,
|
|
210
|
+
and then subclass `ExporterBase` with your app’s name and base path. Like so:
|
|
211
|
+
|
|
212
|
+
class Exporter(ExporterBase, basepath="/your/project", appname="MyProject"):
|
|
213
|
+
pass
|
|
214
|
+
|
|
215
|
+
… then import your own importer (or call it whatever you want) at the top of your own CLUish modules and
|
|
216
|
+
instantiate per the example _supra_. See also [`clu.scripts.dictroast`][clu.scripts.dictroast] for other tricks your
|
|
217
|
+
`Exporter` instances can perform.
|
|
218
|
+
|
|
219
|
+
* [`testing`][clu.testing]: a handy inline unit-test writing setup. It works fine with [`coverage`][coverage-link] and
|
|
220
|
+
[`pytest`][pytest-link] – all you have to do is, after your line assigning `__all__` and `__dir__` at the end
|
|
221
|
+
of the module proper, something like:
|
|
222
|
+
|
|
223
|
+
def test():
|
|
224
|
+
from clu.testing.utils import inline
|
|
225
|
+
|
|
226
|
+
@inline.precheck
|
|
227
|
+
def before_everything_else():
|
|
228
|
+
""" This function runs once before testing """
|
|
229
|
+
# ...
|
|
230
|
+
|
|
231
|
+
@inline
|
|
232
|
+
def first_test():
|
|
233
|
+
""" This test does one thing """
|
|
234
|
+
# ...
|
|
235
|
+
|
|
236
|
+
@inline
|
|
237
|
+
def second_test():
|
|
238
|
+
""" This test does another thing """
|
|
239
|
+
# ...
|
|
240
|
+
|
|
241
|
+
@inline.runif(something == something_else)
|
|
242
|
+
def test_conditionally_run():
|
|
243
|
+
""" This test only does something if `something` == `something_else` """
|
|
244
|
+
# ...
|
|
245
|
+
|
|
246
|
+
@inline.diagnostic
|
|
247
|
+
def apres_testing():
|
|
248
|
+
""" This function runs once after testing """
|
|
249
|
+
# ...
|
|
250
|
+
|
|
251
|
+
return inline.test(100)
|
|
252
|
+
|
|
253
|
+
if __name__ == '__main__':
|
|
254
|
+
sys.exit(test())
|
|
255
|
+
|
|
256
|
+
… running the module (with either `python -m yourapp.yourmodule` or, say, [Nox][nox-link]) will show
|
|
257
|
+
you each tests’ output. But see that `return inline.test(100)` line? That integer argument tells
|
|
258
|
+
the CLU testrunner how many times to run each test (we here like to go a hundred times). You’ll get a
|
|
259
|
+
report – each test function only prints its output on the first run, the other 99 in this case are muted –
|
|
260
|
+
that shows you the time totals, which will look like this:
|
|
261
|
+
|
|
262
|
+
[](https://github.com/fish2000/CLU)
|
|
263
|
+
|
|
264
|
+
… which the astute will note is the output from a non-CLU module. [`clu.testing.utils`][clu.testing.utils]
|
|
265
|
+
is very easy to integrate, as it doesn’t require any other part of CLU. Look over [our noxfile][clu-noxfile] for
|
|
266
|
+
examples of how to run your inline tests as part of a larger suite.
|
|
267
|
+
|
|
268
|
+
… there are other testing support tools in[ `clu.testing.utils`][clu.testing.utils], have a look. There’s
|
|
269
|
+
also a [`clu.testing.pytest`][clu.testing.pytest] submodule, with some currently-under-development
|
|
270
|
+
[`pytest`][pytest-link] plugins.
|
|
271
|
+
|
|
272
|
+
* [`mathematics`][clu.mathematics]: the future home for math-related stuff. All there is right now is a `clamp(…)` function that works with
|
|
273
|
+
[`numpy`][numpy-link] [dtypes][numpy-dtype-link].
|
|
274
|
+
|
|
275
|
+
* [`naming`][clu.naming]: functions for determining the names of things (even module constants and other random things
|
|
276
|
+
that generally lack things like `__name__` attributes) and for the importing and exporting of things by
|
|
277
|
+
“qualified names” – for instance, you can use `naming.qualified_import(…)` to import a class [`CurveSet`][instakit.processors.curves.CurveSet]
|
|
278
|
+
from its package [`instakit.processors.curves`][instakit.processors.curves] by doing `CurveSet = qualified_import('instakit.processors.curves.CurveSet')`,
|
|
279
|
+
which that may be handier for you than composing and hard-coding an `import` statement. See also the
|
|
280
|
+
`nameof(…)` and `moduleof(…)` functions, and the utility functions (e.g. `qualified_name(…)`) and
|
|
281
|
+
predicates (e.g. `isnative(…)`). Most of these functions take literally anything for their argument.
|
|
282
|
+
|
|
283
|
+
* [`predicates`][clu.predicates]: If [`clu.exporting`][clu.exporting] is the heart, [`clu.predicates`][clu.predicates] is
|
|
284
|
+
all of the eyes, ears, fingers and toes of CLU.
|
|
285
|
+
|
|
286
|
+
* Do you want to know if a class is a metaclass? We have an `ismetaclass(…)` predicate for it, for example.
|
|
287
|
+
* Do you want to get an attribute from something you have, but not sure which attributes this _something_
|
|
288
|
+
may have (due to versioning or being passed around, or whatever)? `attr(thing, 'one', 'two', default=None)`
|
|
289
|
+
will give you `thing.one` if that exists, `thing.two`, if `thing.one` doesn’t, and `None` if neither of them
|
|
290
|
+
are there.
|
|
291
|
+
* But… would you maybe like to get a tuple with all of the `one` attributes across multiple things?
|
|
292
|
+
`attr_across('one', *things)` will do exactly that.
|
|
293
|
+
* Similar to the above, `pyattr(…)` does like `attr(…)` except `one` will be expanded to `__one__`, and
|
|
294
|
+
`item(…)` searches over mapping keys rather than attribute names.
|
|
295
|
+
|
|
296
|
+
Sweet, right? These functions, and others in the [`predicates`][clu.predicates] module, are based on `accessor`,
|
|
297
|
+
`aquirer`, `searcher`, and `collator` – abstract functions that can themselves be used. In fact most of
|
|
298
|
+
[`clu.predicates`][clu.predicates] is written in the functional style – that is to say they are built successively
|
|
299
|
+
out of multiple `lambda` statements. If this is not your taste, everything there has been documented thoroughly
|
|
300
|
+
for your use and you shouldn’t have to program in this style. But… if you _do_ enjoy a spot of FP, the primitives
|
|
301
|
+
in the module perhaps will interest you more than the more utilitarian contents.
|
|
302
|
+
|
|
303
|
+
* [`sanitizer`][clu.sanitizer]: functions for cleaning up unicode. Right now there is just a list-based `sanitize(…)`
|
|
304
|
+
function that tones down anything with high-value code points to the point where it can be safely `ascii`-ified.
|
|
305
|
+
|
|
306
|
+
* [`typology`][clu.typology]: This is like [`clu.predicates`][clu.predicates] but with more predicates, many of which are
|
|
307
|
+
based on typelists. The module is full of typelists and it uses them extensively in its predicates, via `isinstance(…)`,
|
|
308
|
+
`issubclass(…)` and a custom version of same called `subclasscheck(…)` which tries very hard to work with
|
|
309
|
+
what you give it (instead of just crapping out with a `False` return value). You will want to explore this one!
|
|
310
|
+
|
|
311
|
+
* [`version`][clu.version]: This is basically my take on the [`semver`][semver-link] package, only with improvements.
|
|
312
|
+
I originally developed it for internal use in some of my Python projects, but it stands on its own. You can
|
|
313
|
+
construct [`clu.version.VersionInfo`][clu.version.VersionInfo] instances using [`semver`][semver-link]
|
|
314
|
+
primitives amongst other things. The (skeletal) [`git_version`][clu.version.git_version] subpackage has a
|
|
315
|
+
couple of [Git-related][git-link] functions, but what you really want is in [`read_version`][clu.version.read_version]
|
|
316
|
+
– therein you’ll find a `read_version_file(…)` function that uses the `ast` module to read one of those
|
|
317
|
+
`__version__.py` files I know you have lying around. Yes
|
|
318
|
+
|
|
319
|
+
* [The `pytest` testsuite][clu-testsuite]: CLU has a full set of [`pytest`][pytest-link]-compatible unit tests.
|
|
320
|
+
In addition to copious module-specific [CLU inline tests][clu.testing], you can run this test suite using
|
|
321
|
+
[`pytest`][pytest-link] – or, if you’d like to run *all* the tests, use the fantastic [Nox][nox-link] testrunner
|
|
322
|
+
(which we use) along with [our included noxfile][clu-noxfile].
|
|
323
|
+
|
|
324
|
+
… AND MORE!!! There really are a ton of useful things in here and one day I will list them (but not today).
|
|
325
|
+
Have fun with it!! [Download][download-link] CLU today and explore – if you want a full list of everything CLU
|
|
326
|
+
exports, install it and list them all in your terminal:
|
|
327
|
+
|
|
328
|
+
$ pip install -U python-clu
|
|
329
|
+
$ python -m clu
|
|
330
|
+
|
|
331
|
+
… which will give you a giant list that looks like this:
|
|
332
|
+
|
|
333
|
+
[](https://pypi.org/project/python-clu/)
|
|
334
|
+
|
|
335
|
+
<a name="dagger">†</a> – the original code for some modules in CLU (e.g.
|
|
336
|
+
[`clu.fs.appdirectories`][clu.fs.appdirectories], [`clu.repl.columnize`][clu.repl.columnize],
|
|
337
|
+
[`clu.version.read_version`][clu.version.read_version]) was vendored in from third-party code.
|
|
338
|
+
This has all been appropriately licensed and credits are inlined where due. Thanks to all CLU
|
|
339
|
+
contributors, big and small!
|
|
340
|
+
|
|
341
|
+
<!--- LINKS! LINKS! LINKS! -->
|
|
342
|
+
[pypi-link]: https://pypi.org/project/python-clu/
|
|
343
|
+
[download-link]: https://files.pythonhosted.org/packages/aa/da/b52556dd89b45f2267e8fc8972b10dfaad196e849c51bf143297851713ce/python_clu-0.11.6.tar.gz
|
|
344
|
+
[homage-replutilities-link]: https://github.com/fish2000/homage/blob/master/.script-bin/replutilities.py
|
|
345
|
+
[clu-tron-link]: https://tron.fandom.com/wiki/Clu
|
|
346
|
+
|
|
347
|
+
[appdirs-link]: https://github.com/ActiveState/appdirs
|
|
348
|
+
[coverage-link]: https://coverage.readthedocs.io/en/latest/
|
|
349
|
+
[git-link]: https://git-scm.com
|
|
350
|
+
[numpy-link]: https://numpy.org
|
|
351
|
+
[numpy-dtype-link]: https://numpy.org/doc/stable/user/basics.types.html
|
|
352
|
+
[bpython-link]: https://bpython-interpreter.org
|
|
353
|
+
[ipython-link]: https://ipython.org
|
|
354
|
+
[ptpython-link]: https://github.com/prompt-toolkit/ptpython
|
|
355
|
+
[semver-link]: https://pypi.org/project/semver/
|
|
356
|
+
[pytest-link]: https://docs.pytest.org/en/stable/
|
|
357
|
+
[nox-link]: https://nox.thea.codes/en/stable/
|
|
358
|
+
[lego-link]: https://www.lego.com/
|
|
359
|
+
[capsela-link]: https://hackaday.com/2017/09/15/retrotectactular-capsela-is-dead-long-live-capsela/
|
|
360
|
+
[robotix-link]: https://en.wikipedia.org/wiki/Robotix
|
|
361
|
+
|
|
362
|
+
[clu.config]: https://github.com/fish2000/CLU/tree/master/clu/config
|
|
363
|
+
[clu.config.abc]: https://github.com/fish2000/CLU/tree/master/clu/config/abc.py
|
|
364
|
+
[clu.config.env]: https://github.com/fish2000/CLU/tree/master/clu/config/env.py
|
|
365
|
+
[clu.config.filebase]: https://github.com/fish2000/CLU/tree/master/clu/config/filebase.py
|
|
366
|
+
[clu.config.keymap]: https://github.com/fish2000/CLU/tree/master/clu/config/keymap.py
|
|
367
|
+
[clu.config.keymapview]: https://github.com/fish2000/CLU/tree/master/clu/config/keymapview.py
|
|
368
|
+
[clu.config.ns]: https://github.com/fish2000/CLU/tree/master/clu/config/ns.py
|
|
369
|
+
[clu.config.proxy]: https://github.com/fish2000/CLU/tree/master/clu/config/proxy.py
|
|
370
|
+
|
|
371
|
+
[clu.constants]: https://github.com/fish2000/CLU/tree/master/clu/constants
|
|
372
|
+
[clu.constants.consts]: https://github.com/fish2000/CLU/tree/master/clu/constants/consts.py
|
|
373
|
+
[clu.constants.polyfills]: https://github.com/fish2000/CLU/tree/master/clu/constants/polyfills.py
|
|
374
|
+
|
|
375
|
+
[clu.fs]: https://github.com/fish2000/CLU/tree/master/clu/fs
|
|
376
|
+
[clu.fs.abc]: https://github.com/fish2000/CLU/tree/master/clu/fs/abc.py
|
|
377
|
+
[clu.fs.appdirectories]: https://github.com/fish2000/CLU/tree/master/clu/fs/appdirectories.py
|
|
378
|
+
[clu.fs.filesystem]: https://github.com/fish2000/CLU/tree/master/clu/fs/filesystem.py
|
|
379
|
+
[clu.fs.misc]: https://github.com/fish2000/CLU/tree/master/clu/fs/misc.py
|
|
380
|
+
[clu.fs.pypath]: https://github.com/fish2000/CLU/tree/master/clu/fs/pypath.py
|
|
381
|
+
|
|
382
|
+
[clu.importing]: https://github.com/fish2000/CLU/tree/master/clu/importing
|
|
383
|
+
[clu.importing.base]: https://github.com/fish2000/CLU/tree/master/clu/importing/base.py
|
|
384
|
+
[clu.importing.proxy]: https://github.com/fish2000/CLU/tree/master/clu/importing/proxy.py
|
|
385
|
+
|
|
386
|
+
[clu.repl]: https://github.com/fish2000/CLU/tree/master/clu/repl
|
|
387
|
+
[clu.repl.ansi]: https://github.com/fish2000/CLU/tree/master/clu/repl/ansi.py
|
|
388
|
+
[clu.repl.banners]: https://github.com/fish2000/CLU/tree/master/clu/repl/banners.py
|
|
389
|
+
[clu.repl.columnize]: https://github.com/fish2000/CLU/tree/master/clu/repl/columnize.py
|
|
390
|
+
[clu.repl.modules]: https://github.com/fish2000/CLU/tree/master/clu/repl/modules.py
|
|
391
|
+
|
|
392
|
+
[clu.scripts]: https://github.com/fish2000/CLU/tree/master/clu/scripts
|
|
393
|
+
[clu.scripts.dictroast]: https://github.com/fish2000/CLU/tree/master/clu/scripts/dictroast.py
|
|
394
|
+
[clu.scripts.repl]: https://github.com/fish2000/CLU/tree/master/clu/scripts/repl.py
|
|
395
|
+
[clu.scripts.treeline]: https://github.com/fish2000/CLU/tree/master/clu/scripts/treeline.py
|
|
396
|
+
|
|
397
|
+
[clu.testing]: https://github.com/fish2000/CLU/tree/master/clu/testing
|
|
398
|
+
[clu.testing.pytest]: https://github.com/fish2000/CLU/tree/master/clu/testing/pytest.py
|
|
399
|
+
[clu.testing.utils]: https://github.com/fish2000/CLU/tree/master/clu/testing/utils.py
|
|
400
|
+
|
|
401
|
+
[clu.typespace]: https://github.com/fish2000/CLU/tree/master/clu/typespace
|
|
402
|
+
[clu.typespace.namespace]: https://github.com/fish2000/CLU/tree/master/clu/typespace/namespace.py
|
|
403
|
+
|
|
404
|
+
[clu.version]: https://github.com/fish2000/CLU/tree/master/clu/version
|
|
405
|
+
[clu.version.git_version]: https://github.com/fish2000/CLU/tree/master/clu/version/git_version.py
|
|
406
|
+
[clu.version.read_version]: https://github.com/fish2000/CLU/tree/master/clu/version/read_version.py
|
|
407
|
+
[clu.version.VersionInfo]: https://github.com/fish2000/CLU/blob/9f64200a947dbdcbf7eca44b87d0d9efeb4c6de7/clu/version/__init__.py#L100-L248
|
|
408
|
+
|
|
409
|
+
[clu]: https://github.com/fish2000/CLU
|
|
410
|
+
[clu-testsuite]: https://github.com/fish2000/CLU/tree/master/tests
|
|
411
|
+
[clu-noxfile]: https://github.com/fish2000/CLU/blob/master/noxfile.py
|
|
412
|
+
|
|
413
|
+
[clu.abstract]: https://github.com/fish2000/CLU/tree/master/clu/abstract.py
|
|
414
|
+
[clu.all]: https://github.com/fish2000/CLU/tree/master/clu/all.py
|
|
415
|
+
[clu.application]: https://github.com/fish2000/CLU/tree/master/clu/application.py
|
|
416
|
+
[clu.csv]: https://github.com/fish2000/CLU/tree/master/clu/csv.py
|
|
417
|
+
[clu.dicts]: https://github.com/fish2000/CLU/tree/master/clu/dicts.py
|
|
418
|
+
[clu.dispatch]: https://github.com/fish2000/CLU/tree/master/clu/dispatch.py
|
|
419
|
+
[clu.enums]: https://github.com/fish2000/CLU/tree/master/clu/enums.py
|
|
420
|
+
[clu.exporting]: https://github.com/fish2000/CLU/tree/master/clu/exporting.py
|
|
421
|
+
[clu.extending]: https://github.com/fish2000/CLU/tree/master/clu/extending.py
|
|
422
|
+
[clu.keyvalue]: https://github.com/fish2000/CLU/tree/master/clu/keyvalue.py
|
|
423
|
+
[clu.mathematics]: https://github.com/fish2000/CLU/tree/master/clu/mathematics.py
|
|
424
|
+
[clu.naming]: https://github.com/fish2000/CLU/tree/master/clu/naming.py
|
|
425
|
+
[clu.predicates]: https://github.com/fish2000/CLU/tree/master/clu/predicates.py
|
|
426
|
+
[clu.repr]: https://github.com/fish2000/CLU/tree/master/clu/repr.py
|
|
427
|
+
[clu.sanitizer]: https://github.com/fish2000/CLU/tree/master/clu/sanitizer.py
|
|
428
|
+
[clu.stdio]: https://github.com/fish2000/CLU/tree/master/clu/stdio.py
|
|
429
|
+
[clu.typology]: https://github.com/fish2000/CLU/tree/master/clu/typology.py
|
|
430
|
+
|
|
431
|
+
[instakit]: https://github.com/fish2000/instakit
|
|
432
|
+
[instakit.processors.curves]: https://github.com/fish2000/instakit/blob/master/instakit/processors/curves.py
|
|
433
|
+
[instakit.processors.curves.CurveSet]: https://github.com/fish2000/instakit/blob/ad5591c88176c2c997d86833b93dde017545277f/instakit/processors/curves.py#L109-L240
|
|
434
|
+
[collections.abc.Mapping]: https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping
|
|
435
|
+
[collections.abc.MutableMapping]: https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping
|
|
436
|
+
[collections.ChainMap]: https://docs.python.org/3/library/collections.html#chainmap-objects
|
|
437
|
+
[reprlib.Repr]: https://docs.python.org/3/library/reprlib.html#reprlib.Repr
|
|
438
|
+
[sys.path]: https://docs.python.org/3/library/sys_path_init.html
|
|
439
|
+
[tempfile.NamedTemporaryFIle]: https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile
|
|
440
|
+
[types]: https://docs.python.org/3/library/types.html
|
|
441
|
+
[types.ModuleType]: https://docs.python.org/3/library/types.html#types.ModuleType
|
|
442
|
+
[types.FunctionType]: https://docs.python.org/3/library/types.html#types.FunctionType
|
|
443
|
+
[types.SimpleNamespace]: https://docs.python.org/3/library/types.html#additional-utility-classes-and-functions
|
|
444
|
+
[zipfile]: https://docs.python.org/3/library/zipfile.html
|
|
445
|
+
[dicts]: https://docs.python.org/3/tutorial/datastructures.html#dictionaries
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.12.1'
|
|
@@ -145,11 +145,23 @@ class Sanitizer(Format):
|
|
|
145
145
|
|
|
146
146
|
class Serializable(abc.ABC):
|
|
147
147
|
|
|
148
|
+
""" An abstract class for something “serializable” – furnishing two
|
|
149
|
+
functions. A “from_dict(…)” class method takes a standard dict,
|
|
150
|
+
and returns a corresponding instance of the serializable class.
|
|
151
|
+
|
|
152
|
+
The “to_dict(…)” instance method, by contrast, takes no arguments
|
|
153
|
+
and returns a plain dict based on the instance of the serializable
|
|
154
|
+
class. This dict is based on the class, and contains whatever the
|
|
155
|
+
“from_dict(…)” method expects.
|
|
156
|
+
"""
|
|
157
|
+
|
|
148
158
|
@classmethod
|
|
149
159
|
def from_dict(cls, instance_dict):
|
|
160
|
+
""" Returns an instance, per the plain dict passed """
|
|
150
161
|
...
|
|
151
162
|
|
|
152
163
|
def to_dict(self):
|
|
164
|
+
""" Returns a plain dict, representing the instance """
|
|
153
165
|
...
|
|
154
166
|
|
|
155
167
|
class Cloneable(abc.ABC):
|
|
@@ -442,6 +442,7 @@ class FlatOrderedSet(collections.abc.Set,
|
|
|
442
442
|
collections.abc.Reversible,
|
|
443
443
|
collections.abc.Hashable, clu.abstract.Cloneable,
|
|
444
444
|
clu.abstract.ReprWrapper,
|
|
445
|
+
clu.abstract.Serializable,
|
|
445
446
|
metaclass=clu.abstract.Slotted):
|
|
446
447
|
|
|
447
448
|
""" FlatOrderedSet is a structure designed to coalesce any nested
|
|
@@ -14,7 +14,7 @@ import importlib
|
|
|
14
14
|
import inspect
|
|
15
15
|
import itertools
|
|
16
16
|
import shelve
|
|
17
|
-
import sys, os
|
|
17
|
+
import sys, os, re
|
|
18
18
|
import warnings
|
|
19
19
|
import weakref
|
|
20
20
|
|
|
@@ -106,9 +106,9 @@ def search_by_id(thingID):
|
|
|
106
106
|
`sys.modules.values()` (which is potentially completely
|
|
107
107
|
fucking enormous).
|
|
108
108
|
|
|
109
|
-
This function
|
|
109
|
+
This function helps implement `search_for_name(…)` – q.v.
|
|
110
110
|
the calling function code sub., and is also used in the
|
|
111
|
-
implementation of `
|
|
111
|
+
implementation of `search_for_module(…)`, - also q.v.
|
|
112
112
|
the calling function code sub.
|
|
113
113
|
|
|
114
114
|
Caching courtesy the `functools.lru_cache(…)` decorator.
|
|
@@ -232,6 +232,9 @@ def determine_name(thing, name=None, try_repr=False):
|
|
|
232
232
|
# up returning None:
|
|
233
233
|
return search_for_name(thing)
|
|
234
234
|
|
|
235
|
+
# Regexp for matching dashes in dotpaths:
|
|
236
|
+
dash_re = re.compile("\-")
|
|
237
|
+
|
|
235
238
|
# N.B. Items in the “replaceable_endings” tuple that
|
|
236
239
|
# possibly contain other such items should appear
|
|
237
240
|
# *before* the items that they contain, e.g.:
|
|
@@ -246,14 +249,16 @@ replaceable_endings = tuple(f"{pre}{suf}" \
|
|
|
246
249
|
ending_suffixes))
|
|
247
250
|
replaceable_endings += ending_suffixes
|
|
248
251
|
|
|
249
|
-
def path_to_dotpath(path, relative_to=None
|
|
252
|
+
def path_to_dotpath(path, relative_to=None,
|
|
253
|
+
convert_dashes=True):
|
|
250
254
|
""" Convert a file path (e.g. “/yo/dogg/iheard/youlike.py”)
|
|
251
255
|
to a dotpath (á la “yo.dogg.iheard.youlike”) in what I
|
|
252
256
|
would call a “quick and dirty” fashion.
|
|
253
257
|
|
|
254
258
|
Issues a BadDotpathWarning if the converted path contains
|
|
255
|
-
dashes
|
|
256
|
-
|
|
259
|
+
dashes, and the “convert_datshes” flag is set to False
|
|
260
|
+
– I don’t quite know what to do about something like that
|
|
261
|
+
besides warn, so erm. There you go.
|
|
257
262
|
"""
|
|
258
263
|
# Garbage in, garbage out:
|
|
259
264
|
if path is None:
|
|
@@ -274,11 +279,15 @@ def path_to_dotpath(path, relative_to=None):
|
|
|
274
279
|
while dotpath.startswith(QUALIFIER):
|
|
275
280
|
dotpath = dotpath[1:]
|
|
276
281
|
|
|
277
|
-
# Warn before returning, if the converted path
|
|
278
|
-
# should contain dashes:
|
|
279
282
|
if '-' in dotpath:
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
if convert_dashes:
|
|
284
|
+
# Substitute underscores for any dashes found:
|
|
285
|
+
dotpath = dash_re.subn('_', dotpath)[0]
|
|
286
|
+
else:
|
|
287
|
+
# Warn before returning, if the converted path
|
|
288
|
+
# should contain dashes:
|
|
289
|
+
warnings.warn(f"Dotpath contains dashes: “{dotpath}”",
|
|
290
|
+
BadDotpathWarning, stacklevel=2)
|
|
282
291
|
|
|
283
292
|
return dotpath
|
|
284
293
|
|
|
@@ -310,11 +319,12 @@ class Registry(abc.ABC, metaclass=clu.abstract.Slotted):
|
|
|
310
319
|
def __init_subclass__(cls, appname=None, **kwargs):
|
|
311
320
|
if not appname:
|
|
312
321
|
appname = determine_name(cls)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
322
|
+
else:
|
|
323
|
+
if appname in classes:
|
|
324
|
+
raise TypeError(f"appname already registered: {appname}")
|
|
325
|
+
appnames.add(appname)
|
|
326
|
+
classes[appname] = cls
|
|
327
|
+
super().__init_subclass__(**kwargs) # type: ignore
|
|
318
328
|
cls.instances = weakref.WeakValueDictionary()
|
|
319
329
|
cls.appname = clu.abstract.ValueDescriptor(appname)
|
|
320
330
|
|
|
@@ -860,7 +870,7 @@ class ExporterBase(collections.abc.MutableMapping,
|
|
|
860
870
|
'has_appname',
|
|
861
871
|
'for_appname',
|
|
862
872
|
'unregister'),
|
|
863
|
-
super(
|
|
873
|
+
super().__dir__()))
|
|
864
874
|
|
|
865
875
|
class Exporter(ExporterBase, basepath=BASEPATH, appname=APPNAME):
|
|
866
876
|
|
|
@@ -614,12 +614,12 @@ class Directory(BaseFSName,
|
|
|
614
614
|
setattr(self, 'old', old)
|
|
615
615
|
setattr(self, 'new', old)
|
|
616
616
|
return self
|
|
617
|
-
setattr(self, 'old', old
|
|
617
|
+
setattr(self, 'old', old or self.target)
|
|
618
618
|
setattr(self, 'new', self.target)
|
|
619
619
|
delattr(self, 'target')
|
|
620
620
|
return self
|
|
621
621
|
|
|
622
|
-
def ctx_prepare(self):
|
|
622
|
+
def ctx_prepare(self, old=None):
|
|
623
623
|
""" Prepares the member values of the Directory instance according
|
|
624
624
|
to a requisite `self.target` directory-path value; the primary
|
|
625
625
|
logic performed by this function determines whether or not it
|
|
@@ -635,7 +635,8 @@ class Directory(BaseFSName,
|
|
|
635
635
|
cause invincibly undebuggable behavioral oddities to crop up
|
|
636
636
|
in a variety of circumstances.
|
|
637
637
|
"""
|
|
638
|
-
self.
|
|
638
|
+
if not self.prepared:
|
|
639
|
+
self.ctx_set_targets(old=old or os.getcwd())
|
|
639
640
|
if os.path.isdir(self.new):
|
|
640
641
|
self.will_change = differentfile(self.old, self.new)
|
|
641
642
|
else:
|
|
@@ -30,7 +30,7 @@ def determine_module(thing, name=None):
|
|
|
30
30
|
return None
|
|
31
31
|
|
|
32
32
|
import pickle
|
|
33
|
-
return pickle.whichmodule(thing,
|
|
33
|
+
return pickle.whichmodule(thing, name) # type: ignore
|
|
34
34
|
|
|
35
35
|
"""
|
|
36
36
|
NAME AND MODULE SEARCH FUNCTIONS: the “nameof(…)” and “moduleof(…)”
|