python-clu 0.11.3__tar.gz → 0.11.5__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.3 → python_clu-0.11.5}/.bumpversion.toml +1 -1
- {python_clu-0.11.3 → python_clu-0.11.5}/Makefile +1 -2
- {python_clu-0.11.3 → python_clu-0.11.5}/PKG-INFO +1 -1
- python_clu-0.11.5/clu/__version__.py +1 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/abstract.py +1 -1
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/data.py +60 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/abc.py +3 -2
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/filesystem.py +6 -8
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/predicates.py +10 -8
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/modules.py +42 -22
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/repl.py +24 -17
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/PKG-INFO +1 -1
- {python_clu-0.11.3 → python_clu-0.11.5}/setup.py +1 -1
- python_clu-0.11.3/clu/__version__.py +0 -1
- {python_clu-0.11.3 → python_clu-0.11.5}/.coveragerc +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/.editorconfig +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/.gitchangelog.rc +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/.gitignore +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/.landscape.yml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/.travis.yml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/ABOUT.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/CHANGELOG.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/CLASSIFIERS.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/CODE_OF_CONDUCT.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/COPYING.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/LICENSE.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/MANIFEST.in +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/README.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/appveyor.yml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/all.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/api/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/api/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/application.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/compilation/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/compilation/compiledb.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/compilation/macros.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/abc.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/base.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/codecs.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/env.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/fieldtypes.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/filebase.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/formats/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/formats/jsonfile.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/formats/picklefile.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/formats/tomlfile.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/formats/yamlfile.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/keymap.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/keymapview.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/ns.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/proxy.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/config/settings.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/consts.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/enums.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/exceptions.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/constants/polyfills.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/csv.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/dicts.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/dispatch.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/enums.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/exporting.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/extending.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/appdirectories.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/misc.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/pypath.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/fs/sourcetree.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/importing/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/importing/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/importing/base.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/importing/proxy.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/keyvalue.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/mathematics.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/naming.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/ansi.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/banners.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/cli/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/cli/boilerplate.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/cli/boilerplate_copy.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/cli/print_version.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repl/columnize.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/repr.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/sanitizer.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/.gitignore +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/README.md +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/ansicolors.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/boilerplate.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/dictroast.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/forkumask.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/repl-bpython.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/repl-ipython.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/repl-ptpython.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/repl-pyzo.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/legacy/xdg-runtime.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/prediversus.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/scripts/treeline.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/shelving/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/shelving/redat.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/shelving/redis.conf +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/stdio.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/testing/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/testing/hook.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/testing/obsolete.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/testing/pytest.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/testing/utils.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/typespace/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/typespace/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/typespace/namespace.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/typology.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/version/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/version/__main__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/version/git_version.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/clu/version/read_version.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/codecov.yml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/conftest.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/Makefile +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/doctrees/api.doctree +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/doctrees/environment.pickle +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/doctrees/generated/clu.doctree +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/doctrees/index.doctree +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/.buildinfo +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_sources/api.rst.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_sources/index.rst.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/alabaster.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/basic.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/badge_only.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/css/theme.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/custom.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/doctools.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/documentation_options.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/file.png +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/jquery-3.6.0.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/jquery.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/js/badge_only.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/js/html5shiv.min.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/js/theme.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/language_data.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/minus.png +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/plus.png +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/pygments.css +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/searchtools.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/underscore-1.13.1.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/_static/underscore.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/api.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/generated/clu.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/genindex.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/index.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/objects.inv +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/py-modindex.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/search.html +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/html/searchindex.js +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/build/man/clu.1 +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/make.bat +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/source/api.rst +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/source/conf.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/source/generated/clu.rst +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/docs/source/index.rst +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/autohook.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/post-push/00-coverage.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/pre-push/00-noop.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/scripts/coverage.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/scripts/display-issues.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/scripts/git-pushex +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/hooks/scripts/noop.sh +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/mypy.ini +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/noxfile.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/pyproject.toml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/pytest.ini +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/SOURCES.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/dependency_links.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/entry_points.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/requires.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/top_level.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/python_clu.egg-info/zip-safe +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/pytype.cfg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/changelog.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/dev.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/docs.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/install.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/nox/codecov.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/nox/docs.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/nox/manifest.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/nox/repl.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/nox/tests.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/tox.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/requirements/typecheck.txt +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/scratch/direnv_transformed_env.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/scratch/nteract.ipynb +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/setup.cfg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/1-58.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/8600JC.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/8ba.png +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/IMG_20180505_205153567.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/cheetah-003.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/config/clu-config.toml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/config/yodogg.toml +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/shutterstock_90194617.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/data/yodogg/video-pride-serval.jpg +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_abstract.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_all.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_boilerplate.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_config.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_config_abc.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_csv.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_dicts.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_dispatch.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_enum_aliases.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_exporting.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_extending.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_fs_abc.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_fs_appdirectories.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_fs_filesystem.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_fs_misc.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_importing.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_keyvalue.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_mathematics.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_naming.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_predicates.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_repl_columnize.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_repl_modules.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_repr.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_scripts_repl.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_typespace_namespace.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_typology.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/test_version.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/.tm_properties +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/yodogg/__init__.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/yodogg/config.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/yodogg/exporting.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tests/yodogg/yodogg/iheard.py +0 -0
- {python_clu-0.11.3 → python_clu-0.11.5}/tox.ini +0 -0
|
@@ -93,8 +93,7 @@ changelog: remove-changelog
|
|
|
93
93
|
gitchangelog > CHANGELOG.md
|
|
94
94
|
|
|
95
95
|
repl:
|
|
96
|
-
python -m bpython --config=$(PROJECT_ROOT)/.config/bpython/config.py3
|
|
97
|
-
-i $(PROJECT_BASE)/clu/scripts/repl.py
|
|
96
|
+
python -m bpython --config=$(PROJECT_ROOT)/.config/bpython/config.py3 -i $(PROJECT_BASE)/clu/scripts/repl.py
|
|
98
97
|
|
|
99
98
|
ipy:
|
|
100
99
|
python -m IPython --autoindent --pylab --colors=LightBG \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.5
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.11.5'
|
|
@@ -408,7 +408,7 @@ class ManagedContext(contextlib.AbstractContextManager):
|
|
|
408
408
|
__all__ = ('Slotted', 'SlotMatch', 'NonSlotted',
|
|
409
409
|
'UnhashableMeta', 'Unhashable',
|
|
410
410
|
'Format', 'NonFormat', 'SlottedFormat', 'Sanitizer',
|
|
411
|
-
'Cloneable',
|
|
411
|
+
'Serializable', 'Cloneable',
|
|
412
412
|
'ReprWrapper', 'SlottedRepr', 'MappingViewRepr',
|
|
413
413
|
'evict_announcer',
|
|
414
414
|
'BaseDescriptor', 'DataDescriptor', 'NamedDescriptor',
|
|
@@ -211,6 +211,66 @@ banners['python3.x'] = """
|
|
|
211
211
|
|
|
212
212
|
"""
|
|
213
213
|
|
|
214
|
+
banners['python3.15'] = """
|
|
215
|
+
888 888 .d8888b. d888 888888888
|
|
216
|
+
888 888 d88P Y88b d8888 888
|
|
217
|
+
888 888 .d88P 888 888
|
|
218
|
+
88888b. 888 888 888888 88888b. .d88b. 88888b. 8888" 888 8888888b.
|
|
219
|
+
888 "88b 888 888 888 888 "88b d88""88b 888 "88b "Y8b. 888 "Y88b
|
|
220
|
+
888 888 888 888 888 888 888 888 888 888 888 888 888 888 888
|
|
221
|
+
888 d88P Y88b 888 Y88b. 888 888 Y88..88P 888 888 Y88b d88P d8b 888 Y88b d88P
|
|
222
|
+
88888P" "Y88888 "Y888 888 888 "Y88P" 888 888 "Y8888P" Y8P 8888888 "Y8888P"
|
|
223
|
+
888 888
|
|
224
|
+
888 Y8b d88P
|
|
225
|
+
888 "Y88P"
|
|
226
|
+
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
banners['python3.14'] = """
|
|
230
|
+
888 888 .d8888b. d888 d8888
|
|
231
|
+
888 888 d88P Y88b d8888 d8P888
|
|
232
|
+
888 888 .d88P 888 d8P 888
|
|
233
|
+
88888b. 888 888 888888 88888b. .d88b. 88888b. 8888" 888 d8P 888
|
|
234
|
+
888 "88b 888 888 888 888 "88b d88""88b 888 "88b "Y8b. 888 d88 888
|
|
235
|
+
888 888 888 888 888 888 888 888 888 888 888 888 888 888 8888888888
|
|
236
|
+
888 d88P Y88b 888 Y88b. 888 888 Y88..88P 888 888 Y88b d88P d8b 888 888
|
|
237
|
+
88888P" "Y88888 "Y888 888 888 "Y88P" 888 888 "Y8888P" Y8P 8888888 888
|
|
238
|
+
888 888
|
|
239
|
+
888 Y8b d88P
|
|
240
|
+
888 "Y88P"
|
|
241
|
+
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
banners['python3.13'] = """
|
|
245
|
+
888 888 .d8888b. d888 .d8888b.
|
|
246
|
+
888 888 d88P Y88b d8888 d88P Y88b
|
|
247
|
+
888 888 .d88P 888 .d88P
|
|
248
|
+
88888b. 888 888 888888 88888b. .d88b. 88888b. 8888" 888 8888"
|
|
249
|
+
888 "88b 888 888 888 888 "88b d88""88b 888 "88b "Y8b. 888 "Y8b.
|
|
250
|
+
888 888 888 888 888 888 888 888 888 888 888 888 888 888 888 888
|
|
251
|
+
888 d88P Y88b 888 Y88b. 888 888 Y88..88P 888 888 Y88b d88P d8b 888 Y88b d88P
|
|
252
|
+
88888P" "Y88888 "Y888 888 888 "Y88P" 888 888 "Y8888P" Y8P 8888888 "Y8888P"
|
|
253
|
+
888 888
|
|
254
|
+
888 Y8b d88P
|
|
255
|
+
888 "Y88P"
|
|
256
|
+
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
banners['python3.12'] = """
|
|
260
|
+
888 888 .d8888b. d888 .d8888b.
|
|
261
|
+
888 888 d88P Y88b d8888 d88P Y88b
|
|
262
|
+
888 888 .d88P 888 888
|
|
263
|
+
88888b. 888 888 888888 88888b. .d88b. 88888b. 8888" 888 .d88P
|
|
264
|
+
888 "88b 888 888 888 888 "88b d88""88b 888 "88b "Y8b. 888 .od888P"
|
|
265
|
+
888 888 888 888 888 888 888 888 888 888 888 888 888 888 d88P"
|
|
266
|
+
888 d88P Y88b 888 Y88b. 888 888 Y88..88P 888 888 Y88b d88P d8b 888 888"
|
|
267
|
+
88888P" "Y88888 "Y888 888 888 "Y88P" 888 888 "Y8888P" Y8P 8888888 888888888
|
|
268
|
+
888 888
|
|
269
|
+
888 Y8b d88P
|
|
270
|
+
888 "Y88P"
|
|
271
|
+
|
|
272
|
+
"""
|
|
273
|
+
|
|
214
274
|
banners['python3.11'] = """
|
|
215
275
|
888 888 .d8888b. d888 d888
|
|
216
276
|
888 888 d88P Y88b d8888 d8888
|
|
@@ -136,12 +136,13 @@ class BaseFSName(collections.abc.Hashable,
|
|
|
136
136
|
os.path.realpath(
|
|
137
137
|
os.fspath(source or self.name)))
|
|
138
138
|
|
|
139
|
-
def parent(self):
|
|
139
|
+
def parent(self, followlinks=True):
|
|
140
140
|
""" Sugar for `self.directory(os.path.abspath(os.path.dirname(self.name)))`
|
|
141
141
|
…which, if you are curious, gets you the parent directory of the target
|
|
142
142
|
instance, wrapped in a new `Directory` instance.
|
|
143
143
|
"""
|
|
144
|
-
|
|
144
|
+
realifier = followlinks and os.path.realpath or os.path.abspath
|
|
145
|
+
return self.directory(realifier(os.path.dirname(self.name)))
|
|
145
146
|
|
|
146
147
|
def relparent(self, path):
|
|
147
148
|
""" Relativize a path, relative to its directory parent, and return it
|
|
@@ -759,11 +759,8 @@ class Directory(BaseFSName,
|
|
|
759
759
|
yield from os.walk(self.name, followlinks=followlinks)
|
|
760
760
|
|
|
761
761
|
def walkback(self, followlinks=True):
|
|
762
|
-
""" Iterator over reverse-walked directories and files.
|
|
763
|
-
|
|
764
|
-
N.B. Since I had to implement this myself, “followlinks”
|
|
765
|
-
doesn’t do anything yet. This is because I am lazy and
|
|
766
|
-
I lack intellectual rigor.
|
|
762
|
+
""" Iterator over reverse-walked directories and files. Use
|
|
763
|
+
the `followlinks=True` flag to do what you think it does.
|
|
767
764
|
|
|
768
765
|
The return triple resembles that yielded by “os.walk(…)” –
|
|
769
766
|
but unlike that function, modifying the directory listing
|
|
@@ -787,7 +784,7 @@ class Directory(BaseFSName,
|
|
|
787
784
|
yield directory, dirs, files
|
|
788
785
|
if directory.name == ROOT_PATH:
|
|
789
786
|
break
|
|
790
|
-
directory = directory.parent()
|
|
787
|
+
directory = directory.parent(followlinks=followlinks)
|
|
791
788
|
|
|
792
789
|
def flatten(self, destination, suffix=None, new_suffix=None):
|
|
793
790
|
""" Copy the entire directory tree, all contents included, to a new
|
|
@@ -937,8 +934,9 @@ class Directory(BaseFSName,
|
|
|
937
934
|
dirs[:] = list(filter(excluder, dirs))
|
|
938
935
|
filenames = filter(excluder,
|
|
939
936
|
filter(searcher, files))
|
|
940
|
-
dotpaths.update(path_to_dotpath(
|
|
941
|
-
|
|
937
|
+
dotpaths.update(path_to_dotpath(
|
|
938
|
+
os.path.join(root, filename),
|
|
939
|
+
relative_to=self.name)
|
|
942
940
|
for filename in filenames)
|
|
943
941
|
yield from sorted(dotpaths)
|
|
944
942
|
|
|
@@ -195,17 +195,18 @@ def try_items(itx, *things, default=NoDefault):
|
|
|
195
195
|
|
|
196
196
|
# SOME COMMON SHORTCUTS:
|
|
197
197
|
|
|
198
|
-
dunder_or
|
|
198
|
+
dunder_or = lambda thing, atx: getpyattr(thing, atx, thing)
|
|
199
199
|
|
|
200
|
-
mro
|
|
201
|
-
unwrap
|
|
202
|
-
origin
|
|
203
|
-
rmro
|
|
200
|
+
mro = lambda thing: getpyattr(typeof(thing), 'mro')
|
|
201
|
+
unwrap = lambda thing: dunder_or(thing, 'wrapped')
|
|
202
|
+
origin = lambda thing: typeof(dunder_or(thing, 'origin'))
|
|
203
|
+
rmro = reverse(mro)
|
|
204
204
|
|
|
205
|
-
isancestor
|
|
206
|
-
isorigin
|
|
205
|
+
isancestor = lambda cls, ancestor=object: ancestor in mro(cls)
|
|
206
|
+
isorigin = lambda cls, originator=object: isancestor(origin(cls), ancestor=typeof(originator))
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
ismarkedprivate = lambda string: string.startswith('_')
|
|
209
|
+
ispublic = lambda string: not ispyname(string) and not ismifflin(string)
|
|
209
210
|
|
|
210
211
|
@export
|
|
211
212
|
class Base(object):
|
|
@@ -566,6 +567,7 @@ export(unwrap, name='unwrap', doc="unwrap(thing) → Return ei
|
|
|
566
567
|
export(origin, name='origin', doc="origin(thing) → Return either `typeof(thing).__origin__` or `typeof(thing)` for a given `thing`")
|
|
567
568
|
export(isancestor, name='isancestor', doc="isancestor(thing, ancestor=object) → boolean predicate, True if `ancestor` is found in “mro(thing)”")
|
|
568
569
|
export(isorigin, name='isorigin', doc="isorigin(thing, original=object) → boolean predicate, True if `original` is an ancestor of “origin(thing)”")
|
|
570
|
+
export(ismarkedprivate, name='ismarkedprivate', doc="ismarkedprivate(string)) → boolean predicate, True if `string` doesn’t begin with an _underscore")
|
|
569
571
|
export(ispublic, name='ispublic', doc="ispublic(string) → boolean predicate, True if `string` is neither in __dunder__ or _sunder_ (née “_mifflin_”) form")
|
|
570
572
|
|
|
571
573
|
export(predicate_nop, name='predicate_nop', doc="predicate_nop(thing) → boolean predicate that always returns `None`")
|
|
@@ -7,6 +7,7 @@ import collections.abc
|
|
|
7
7
|
import clu.abstract
|
|
8
8
|
import clu.dicts
|
|
9
9
|
import clu.all
|
|
10
|
+
import importlib
|
|
10
11
|
import pickle
|
|
11
12
|
import sys
|
|
12
13
|
|
|
@@ -65,7 +66,7 @@ class ModuleMap(collections.abc.Mapping,
|
|
|
65
66
|
if not isinstance(module, (type(self), types.Module)):
|
|
66
67
|
raise TypeError("module instance required")
|
|
67
68
|
self.module = getattr(module, 'module', module)
|
|
68
|
-
self.reload()
|
|
69
|
+
self.reload(reload_module=False)
|
|
69
70
|
|
|
70
71
|
def __iter__(self):
|
|
71
72
|
yield from self.dir
|
|
@@ -97,7 +98,9 @@ class ModuleMap(collections.abc.Mapping,
|
|
|
97
98
|
def items(self):
|
|
98
99
|
return clu.dicts.OrderedItemsView(self)
|
|
99
100
|
|
|
100
|
-
def reload(self):
|
|
101
|
+
def reload(self, reload_module=True):
|
|
102
|
+
if reload_module:
|
|
103
|
+
self.module = importlib.reload(self.module)
|
|
101
104
|
self.dir = tuple(sorted(filter(notpyname, dir(self.module)), key=lowers))
|
|
102
105
|
length = len(self.dir)
|
|
103
106
|
if length < 1:
|
|
@@ -117,8 +120,12 @@ class ModuleMap(collections.abc.Mapping,
|
|
|
117
120
|
def inner_repr(self):
|
|
118
121
|
return repr(dict(self))
|
|
119
122
|
|
|
123
|
+
clu_importall = clu.all.import_all_modules
|
|
124
|
+
|
|
120
125
|
@cache
|
|
121
|
-
def compare_module_lookups_for_all_things(*modules,
|
|
126
|
+
def compare_module_lookups_for_all_things(*modules,
|
|
127
|
+
module_function=clu_importall,
|
|
128
|
+
**options):
|
|
122
129
|
""" Iterate through each exported item, for each exported module,
|
|
123
130
|
and look up the original module of the exported item with both:
|
|
124
131
|
|
|
@@ -139,23 +146,24 @@ def compare_module_lookups_for_all_things(*modules, **options):
|
|
|
139
146
|
appname = options.get('appname', consts.APPNAME)
|
|
140
147
|
exporter_name = options.get('exporter_name', consts.EXPORTER_NAME)
|
|
141
148
|
|
|
142
|
-
idx = 0
|
|
143
149
|
total = 0
|
|
144
|
-
|
|
150
|
+
item_idx = 0
|
|
151
|
+
module_idx = 0
|
|
152
|
+
mismatch_idx = 0
|
|
145
153
|
mismatches = []
|
|
146
154
|
results = []
|
|
147
155
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
exporter_name)
|
|
151
|
-
assert clumodules
|
|
156
|
+
loaded_modules = module_function(basepath, appname, exporter_name)
|
|
157
|
+
assert loaded_modules
|
|
152
158
|
|
|
153
159
|
modulenames = tuple(modules or Exporter.modulenames())
|
|
154
160
|
|
|
155
161
|
for modulename in modulenames:
|
|
156
162
|
exports = Exporter[modulename].exports()
|
|
157
163
|
total += len(exports)
|
|
158
|
-
results.append(Result(modulename,
|
|
164
|
+
results.append(Result(modulename,
|
|
165
|
+
tuple(exports.keys()),
|
|
166
|
+
module_idx))
|
|
159
167
|
|
|
160
168
|
for name, thing in exports.items():
|
|
161
169
|
whichmodule = pickle.whichmodule(thing, None)
|
|
@@ -167,17 +175,18 @@ def compare_module_lookups_for_all_things(*modules, **options):
|
|
|
167
175
|
determination,
|
|
168
176
|
modulename,
|
|
169
177
|
nameof(thing),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
178
|
+
mismatch_idx))
|
|
179
|
+
mismatch_idx += 1
|
|
180
|
+
item_idx += 1
|
|
181
|
+
module_idx += 1
|
|
173
182
|
|
|
174
183
|
# In practice the failure rate seemed to be around 7.65 %
|
|
175
|
-
failure_rate = 100 * (float(
|
|
184
|
+
failure_rate = 100 * (float(mismatch_idx) / float(total))
|
|
176
185
|
assert failure_rate < 10.0 # percent
|
|
177
186
|
|
|
178
|
-
return Results(
|
|
179
|
-
Mismatches(
|
|
180
|
-
|
|
187
|
+
return Results(item_idx, modulenames, tuple(results)), \
|
|
188
|
+
Mismatches(mismatch_idx, tuple(mismatches),
|
|
189
|
+
failure_rate)
|
|
181
190
|
|
|
182
191
|
export(notpyname, name='notpyname', doc="notpyname(string) → boolean predicate, returns True unless string is a __dunder__ name, when it returns False")
|
|
183
192
|
export(isplural, name='isplural', doc="isplural(integer) → returns an 's' unless the integer argument is 1, in which case it returns an empty string")
|
|
@@ -196,31 +205,38 @@ def test():
|
|
|
196
205
|
|
|
197
206
|
@inline.fixture
|
|
198
207
|
def predicate_modules():
|
|
199
|
-
modules = ('predicates', 'typology', 'mathematics', 'naming'
|
|
208
|
+
modules = ('predicates', 'typology', 'mathematics', 'naming',
|
|
209
|
+
'exporting', 'extending', 'all', 'enums')
|
|
200
210
|
prefixd = tuple(f"clu.{nm}" for nm in modules)
|
|
201
211
|
return prefixd
|
|
202
212
|
|
|
203
213
|
@inline
|
|
204
|
-
def
|
|
214
|
+
def test_compare_all():
|
|
205
215
|
""" Basic checks for compare_module_lookups_for_all_things(…) """
|
|
206
216
|
results, mismatches = compare_module_lookups_for_all_things()
|
|
207
217
|
|
|
218
|
+
for idx, result in enumerate(results.result_records):
|
|
219
|
+
assert result.idx == idx
|
|
220
|
+
|
|
208
221
|
assert results.total > 100
|
|
209
222
|
assert mismatches.total > 0
|
|
210
223
|
assert mismatches.failure_rate < 10.0
|
|
211
224
|
|
|
212
225
|
@inline
|
|
213
|
-
def
|
|
226
|
+
def test_compare_all_with_varargs():
|
|
214
227
|
""" With-vararg checks for compare_module_lookups_for_all_things(…) """
|
|
215
228
|
results, mismatches = compare_module_lookups_for_all_things(
|
|
216
229
|
*predicate_modules())
|
|
217
230
|
|
|
231
|
+
for idx, result in enumerate(results.result_records):
|
|
232
|
+
assert result.idx == idx
|
|
233
|
+
|
|
218
234
|
assert results.total > 100
|
|
219
235
|
assert mismatches.total > 0
|
|
220
236
|
assert mismatches.failure_rate < 10.0
|
|
221
237
|
|
|
222
238
|
@inline
|
|
223
|
-
def
|
|
239
|
+
def test_modulemap_with_clu_consts():
|
|
224
240
|
""" Basic checks for ModuleMap adapter """
|
|
225
241
|
constmap = ModuleMap(consts)
|
|
226
242
|
|
|
@@ -240,8 +256,12 @@ def test():
|
|
|
240
256
|
# doesn’t export any dunder-named things:
|
|
241
257
|
assert frozenconsts.issuperset(constmap.keys())
|
|
242
258
|
assert frozenconsts.issubset(constmap.keys())
|
|
259
|
+
|
|
260
|
+
# Try reloading:
|
|
261
|
+
constmap.reload()
|
|
262
|
+
assert constmap.reload() == len(constmap)
|
|
243
263
|
|
|
244
|
-
return inline.test(
|
|
264
|
+
return inline.test(100)
|
|
245
265
|
|
|
246
266
|
if __name__ == '__main__':
|
|
247
267
|
sys.exit(test())
|
|
@@ -35,23 +35,29 @@ from clu.all import import_clu_modules
|
|
|
35
35
|
from clu.config.env import Environ
|
|
36
36
|
from clu.constants import consts
|
|
37
37
|
from clu.naming import nameof, qualified_import
|
|
38
|
-
from clu.predicates import ispublic
|
|
38
|
+
from clu.predicates import ispublic, ismarkedprivate, listify
|
|
39
39
|
from clu.repl import columnize
|
|
40
40
|
|
|
41
|
+
# Set up the __all__ tuple:
|
|
42
|
+
__all__ = list()
|
|
43
|
+
|
|
44
|
+
# predicate for star-importing:
|
|
45
|
+
ok_for_star_import = lambda name: ispublic(name) and not ismarkedprivate(name)
|
|
46
|
+
|
|
41
47
|
# MODULE EXPORT FUNCTIONS: given a module name, export
|
|
42
48
|
# either the module or its contents into a given namespace:
|
|
43
|
-
|
|
44
|
-
def star_export(modulename, namespace):
|
|
49
|
+
def star_export(modulename, namespace, alltuple=__all__):
|
|
45
50
|
""" Safely bind everything a module exports to a namespace. """
|
|
46
51
|
try:
|
|
47
52
|
module = qualified_import(modulename)
|
|
48
53
|
except ValueError:
|
|
49
54
|
module = importlib.import_module(modulename)
|
|
50
55
|
for name in dir(module):
|
|
51
|
-
if
|
|
56
|
+
if ok_for_star_import(name):
|
|
52
57
|
namespace[name] = getattr(module, name)
|
|
58
|
+
alltuple += listify(name)
|
|
53
59
|
|
|
54
|
-
def module_export(modulename, namespace):
|
|
60
|
+
def module_export(modulename, namespace, alltuple=__all__):
|
|
55
61
|
""" Safely bind a module to a namespace. """
|
|
56
62
|
try:
|
|
57
63
|
module = qualified_import(modulename)
|
|
@@ -59,14 +65,12 @@ def module_export(modulename, namespace):
|
|
|
59
65
|
module = importlib.import_module(modulename)
|
|
60
66
|
name = nameof(module)
|
|
61
67
|
namespace[modulename] = namespace[name] = module
|
|
68
|
+
alltuple += listify(name)
|
|
62
69
|
|
|
63
70
|
# Warm up sys.modules and friends:
|
|
64
|
-
|
|
65
71
|
import_clu_modules()
|
|
66
72
|
|
|
67
|
-
# Set up the
|
|
68
|
-
|
|
69
|
-
__all__ = tuple()
|
|
73
|
+
# Set up the GLOBALS namespace:
|
|
70
74
|
GLOBALS = globals()
|
|
71
75
|
|
|
72
76
|
starmods = ('clu.repl.ansi',
|
|
@@ -132,20 +136,19 @@ for mod in mods:
|
|
|
132
136
|
|
|
133
137
|
# Additionals and corner-cases – imports requiring their own
|
|
134
138
|
# bespoke import-statement forms:
|
|
135
|
-
|
|
136
139
|
import collections.abc
|
|
137
|
-
from PIL import Image
|
|
138
140
|
from pprint import pprint, pformat
|
|
139
141
|
|
|
140
142
|
pp = pprint
|
|
141
143
|
ppt = lambda thing: pprint(tuple(thing))
|
|
142
144
|
|
|
143
145
|
# These two imports trigger module-level __getattr__ actions:
|
|
144
|
-
|
|
145
146
|
from clu.testing.utils import pout, inline
|
|
146
147
|
|
|
147
|
-
#
|
|
148
|
+
# Append to __all__:
|
|
149
|
+
__all__ += ['pout', 'inline', 'pp', 'ppt']
|
|
148
150
|
|
|
151
|
+
# Not quite sure where to put this, for now:
|
|
149
152
|
_explain = lambda thing=None: print(columnize(dir(thing),
|
|
150
153
|
display_width=consts.SEPARATOR_WIDTH,
|
|
151
154
|
ljust=True))
|
|
@@ -183,12 +186,13 @@ def explain(thing, width=None):
|
|
|
183
186
|
ljust=True))
|
|
184
187
|
|
|
185
188
|
try:
|
|
189
|
+
from PIL import Image
|
|
186
190
|
from instakit.utils.static import asset
|
|
187
191
|
except (ImportError, SyntaxError, TypeError): # pragma: no cover
|
|
188
192
|
pass
|
|
189
193
|
else:
|
|
190
194
|
# Extend `__all__`:
|
|
191
|
-
__all__ +=
|
|
195
|
+
__all__ += ['asset', 'image_paths', 'catimage']
|
|
192
196
|
# Prepare a list of readily open-able image file paths:
|
|
193
197
|
image_paths = list(map(
|
|
194
198
|
lambda image_file: asset.path('img', image_file),
|
|
@@ -197,7 +201,7 @@ else:
|
|
|
197
201
|
catimage = Image.open(image_paths[0])
|
|
198
202
|
|
|
199
203
|
# Access CLU app environment variables:
|
|
200
|
-
cluenv = Environ(appname=
|
|
204
|
+
cluenv = Environ(appname=consts.APPNAME)
|
|
201
205
|
|
|
202
206
|
# If you, the user, set up a CLU_USER_SCRIPT environment variable
|
|
203
207
|
# before running this repl script, you can have it executed herein:
|
|
@@ -206,17 +210,20 @@ if 'user:script' in cluenv:
|
|
|
206
210
|
if os.path.exists(user_script_path):
|
|
207
211
|
user_script_globals = runpy.run_path(user_script_path)
|
|
208
212
|
GLOBALS.update(user_script_globals)
|
|
213
|
+
__all__ += list(filter(ok_for_star_import, user_script_globals.keys()))
|
|
209
214
|
else:
|
|
210
215
|
message = "CLU_USER_SCRIPT needs to point to a Python file"
|
|
211
216
|
warnings.simplefilter('always')
|
|
212
217
|
warnings.warn(stacklevel=2, message=message)
|
|
213
218
|
|
|
214
|
-
# Remove duplicate and invalid sys.paths:
|
|
215
219
|
|
|
220
|
+
# Adjust __all__ again:
|
|
221
|
+
__all__ += ['_explain', 'explain', 'cluenv']
|
|
222
|
+
|
|
223
|
+
# Remove duplicate and invalid sys.paths:
|
|
216
224
|
pypath.remove_invalid_paths()
|
|
217
225
|
|
|
218
226
|
# Print the Python banner and/or warnings, messages, and other tripe:
|
|
219
|
-
|
|
220
227
|
if __name__ == '__main__':
|
|
221
228
|
# In theory, this will *not* run when repl.py
|
|
222
229
|
# is loaded into a REPL using a “-i” flag:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.5
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.11.3'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|