python-clu 0.8.5__tar.gz → 0.10.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.
Files changed (270) hide show
  1. python_clu-0.10.1/.bumpversion.toml +32 -0
  2. {python-clu-0.8.5 → python_clu-0.10.1}/MANIFEST.in +1 -1
  3. {python-clu-0.8.5 → python_clu-0.10.1}/Makefile +2 -2
  4. {python-clu-0.8.5 → python_clu-0.10.1}/PKG-INFO +37 -2
  5. python_clu-0.10.1/clu/__version__.py +1 -0
  6. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/filebase.py +2 -3
  7. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/keymap.py +2 -2
  8. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/ns.py +94 -75
  9. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/proxy.py +9 -9
  10. {python-clu-0.8.5 → python_clu-0.10.1}/clu/exporting.py +1 -1
  11. {python-clu-0.8.5 → python_clu-0.10.1}/clu/extending.py +29 -29
  12. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/filesystem.py +16 -19
  13. {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/base.py +3 -2
  14. {python-clu-0.8.5 → python_clu-0.10.1}/clu/keyvalue.py +7 -7
  15. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/ansi.py +0 -2
  16. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/dictroast.py +9 -8
  17. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/repl.py +3 -0
  18. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/treeline.py +19 -27
  19. {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/utils.py +3 -3
  20. {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/__init__.py +5 -5
  21. {python-clu-0.8.5 → python_clu-0.10.1}/noxfile.py +2 -2
  22. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/PKG-INFO +37 -2
  23. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/SOURCES.txt +1 -1
  24. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/requires.txt +1 -0
  25. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/dev.txt +1 -1
  26. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/install.txt +1 -0
  27. {python-clu-0.8.5 → python_clu-0.10.1}/setup.py +1 -1
  28. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_config.py +5 -4
  29. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_exporting.py +10 -6
  30. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_extending.py +6 -8
  31. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_keyvalue.py +12 -10
  32. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_version.py +6 -6
  33. python-clu-0.8.5/.bumpversion.cfg +0 -16
  34. python-clu-0.8.5/clu/__version__.py +0 -1
  35. {python-clu-0.8.5 → python_clu-0.10.1}/.coveragerc +0 -0
  36. {python-clu-0.8.5 → python_clu-0.10.1}/.editorconfig +0 -0
  37. {python-clu-0.8.5 → python_clu-0.10.1}/.gitchangelog.rc +0 -0
  38. {python-clu-0.8.5 → python_clu-0.10.1}/.gitignore +0 -0
  39. {python-clu-0.8.5 → python_clu-0.10.1}/.landscape.yml +0 -0
  40. {python-clu-0.8.5 → python_clu-0.10.1}/.travis.yml +0 -0
  41. {python-clu-0.8.5 → python_clu-0.10.1}/ABOUT.md +0 -0
  42. {python-clu-0.8.5 → python_clu-0.10.1}/CHANGELOG.md +0 -0
  43. {python-clu-0.8.5 → python_clu-0.10.1}/CLASSIFIERS.txt +0 -0
  44. {python-clu-0.8.5 → python_clu-0.10.1}/CODE_OF_CONDUCT.md +0 -0
  45. {python-clu-0.8.5 → python_clu-0.10.1}/COPYING.md +0 -0
  46. {python-clu-0.8.5 → python_clu-0.10.1}/LICENSE.txt +0 -0
  47. {python-clu-0.8.5 → python_clu-0.10.1}/README.md +0 -0
  48. {python-clu-0.8.5 → python_clu-0.10.1}/appveyor.yml +0 -0
  49. {python-clu-0.8.5 → python_clu-0.10.1}/clu/__init__.py +0 -0
  50. {python-clu-0.8.5 → python_clu-0.10.1}/clu/__main__.py +0 -0
  51. {python-clu-0.8.5 → python_clu-0.10.1}/clu/abstract.py +0 -0
  52. {python-clu-0.8.5 → python_clu-0.10.1}/clu/all.py +0 -0
  53. {python-clu-0.8.5 → python_clu-0.10.1}/clu/api/__init__.py +0 -0
  54. {python-clu-0.8.5 → python_clu-0.10.1}/clu/api/__main__.py +0 -0
  55. {python-clu-0.8.5 → python_clu-0.10.1}/clu/application.py +0 -0
  56. {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/__init__.py +0 -0
  57. {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/compiledb.py +0 -0
  58. {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/macros.py +0 -0
  59. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/__init__.py +0 -0
  60. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/abc.py +0 -0
  61. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/base.py +0 -0
  62. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/codecs.py +0 -0
  63. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/env.py +0 -0
  64. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/fieldtypes.py +0 -0
  65. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/__init__.py +0 -0
  66. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/jsonfile.py +0 -0
  67. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/picklefile.py +0 -0
  68. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/tomlfile.py +0 -0
  69. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/yamlfile.py +0 -0
  70. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/keymapview.py +0 -0
  71. {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/settings.py +0 -0
  72. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/__init__.py +0 -0
  73. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/__main__.py +0 -0
  74. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/consts.py +0 -0
  75. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/data.py +0 -0
  76. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/enums.py +0 -0
  77. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/exceptions.py +0 -0
  78. {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/polyfills.py +0 -0
  79. {python-clu-0.8.5 → python_clu-0.10.1}/clu/csv.py +0 -0
  80. {python-clu-0.8.5 → python_clu-0.10.1}/clu/dicts.py +0 -0
  81. {python-clu-0.8.5 → python_clu-0.10.1}/clu/dispatch.py +0 -0
  82. {python-clu-0.8.5 → python_clu-0.10.1}/clu/enums.py +0 -0
  83. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/__init__.py +0 -0
  84. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/abc.py +0 -0
  85. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/appdirectories.py +0 -0
  86. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/misc.py +0 -0
  87. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/pypath.py +0 -0
  88. {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/sourcetree.py +0 -0
  89. {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/__init__.py +0 -0
  90. {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/__main__.py +0 -0
  91. {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/proxy.py +0 -0
  92. {python-clu-0.8.5 → python_clu-0.10.1}/clu/mathematics.py +0 -0
  93. {python-clu-0.8.5 → python_clu-0.10.1}/clu/naming.py +0 -0
  94. {python-clu-0.8.5 → python_clu-0.10.1}/clu/predicates.py +0 -0
  95. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/__init__.py +0 -0
  96. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/banners.py +0 -0
  97. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/__init__.py +0 -0
  98. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/boilerplate.py +0 -0
  99. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/boilerplate_copy.py +0 -0
  100. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/print_version.py +0 -0
  101. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/columnize.py +0 -0
  102. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/modules.py +0 -0
  103. {python-clu-0.8.5 → python_clu-0.10.1}/clu/repr.py +0 -0
  104. {python-clu-0.8.5 → python_clu-0.10.1}/clu/sanitizer.py +0 -0
  105. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/.gitignore +0 -0
  106. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/README.md +0 -0
  107. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/__init__.py +0 -0
  108. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/ansicolors.py +0 -0
  109. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/boilerplate.py +0 -0
  110. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/forkumask.py +0 -0
  111. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-bpython.py +0 -0
  112. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-ipython.py +0 -0
  113. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-ptpython.py +0 -0
  114. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-pyzo.py +0 -0
  115. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/xdg-runtime.py +0 -0
  116. {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/prediversus.py +0 -0
  117. {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/__init__.py +0 -0
  118. {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/redat.py +0 -0
  119. {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/redis.conf +0 -0
  120. {python-clu-0.8.5 → python_clu-0.10.1}/clu/stdio.py +0 -0
  121. {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/__init__.py +0 -0
  122. {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/hook.py +0 -0
  123. {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/obsolete.py +0 -0
  124. {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/pytest.py +0 -0
  125. {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/__init__.py +0 -0
  126. {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/__main__.py +0 -0
  127. {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/namespace.py +0 -0
  128. {python-clu-0.8.5 → python_clu-0.10.1}/clu/typology.py +0 -0
  129. {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/__main__.py +0 -0
  130. {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/git_version.py +0 -0
  131. {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/read_version.py +0 -0
  132. {python-clu-0.8.5 → python_clu-0.10.1}/codecov.yml +0 -0
  133. {python-clu-0.8.5 → python_clu-0.10.1}/conftest.py +0 -0
  134. {python-clu-0.8.5 → python_clu-0.10.1}/docs/Makefile +0 -0
  135. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/api.doctree +0 -0
  136. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/environment.pickle +0 -0
  137. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/generated/clu.doctree +0 -0
  138. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/index.doctree +0 -0
  139. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/.buildinfo +0 -0
  140. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/api.rst.txt +0 -0
  141. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
  142. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/index.rst.txt +0 -0
  143. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
  144. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/alabaster.css +0 -0
  145. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/basic.css +0 -0
  146. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/badge_only.css +0 -0
  147. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  148. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  149. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  150. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  151. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  152. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
  153. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  154. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  155. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  156. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  157. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  158. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
  159. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  160. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  161. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  162. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
  163. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  164. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/theme.css +0 -0
  165. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/custom.css +0 -0
  166. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/doctools.js +0 -0
  167. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/documentation_options.js +0 -0
  168. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/file.png +0 -0
  169. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/jquery-3.6.0.js +0 -0
  170. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/jquery.js +0 -0
  171. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/badge_only.js +0 -0
  172. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
  173. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/html5shiv.min.js +0 -0
  174. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/theme.js +0 -0
  175. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/language_data.js +0 -0
  176. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/minus.png +0 -0
  177. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/plus.png +0 -0
  178. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/pygments.css +0 -0
  179. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/searchtools.js +0 -0
  180. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/underscore-1.13.1.js +0 -0
  181. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/underscore.js +0 -0
  182. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/api.html +0 -0
  183. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/generated/clu.html +0 -0
  184. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/genindex.html +0 -0
  185. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/index.html +0 -0
  186. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/objects.inv +0 -0
  187. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/py-modindex.html +0 -0
  188. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/search.html +0 -0
  189. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/searchindex.js +0 -0
  190. {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/man/clu.1 +0 -0
  191. {python-clu-0.8.5 → python_clu-0.10.1}/docs/make.bat +0 -0
  192. {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/api.rst +0 -0
  193. {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/conf.py +0 -0
  194. {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/generated/clu.rst +0 -0
  195. {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/index.rst +0 -0
  196. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/autohook.sh +0 -0
  197. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/post-push/00-coverage.sh +0 -0
  198. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/pre-push/00-noop.sh +0 -0
  199. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
  200. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/coverage.sh +0 -0
  201. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/display-issues.sh +0 -0
  202. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/git-pushex +0 -0
  203. {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/noop.sh +0 -0
  204. {python-clu-0.8.5 → python_clu-0.10.1}/mypy.ini +0 -0
  205. {python-clu-0.8.5 → python_clu-0.10.1}/pyproject.toml +0 -0
  206. {python-clu-0.8.5 → python_clu-0.10.1}/pytest.ini +0 -0
  207. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/dependency_links.txt +0 -0
  208. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/entry_points.txt +0 -0
  209. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/top_level.txt +0 -0
  210. {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/zip-safe +0 -0
  211. {python-clu-0.8.5 → python_clu-0.10.1}/pytype.cfg +0 -0
  212. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/changelog.txt +0 -0
  213. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/docs.txt +0 -0
  214. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/codecov.txt +0 -0
  215. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/docs.txt +0 -0
  216. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/manifest.txt +0 -0
  217. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/repl.txt +0 -0
  218. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/tests.txt +0 -0
  219. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/tox.txt +0 -0
  220. {python-clu-0.8.5 → python_clu-0.10.1}/requirements/typecheck.txt +0 -0
  221. {python-clu-0.8.5 → python_clu-0.10.1}/scratch/direnv_transformed_env.py +0 -0
  222. {python-clu-0.8.5 → python_clu-0.10.1}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
  223. {python-clu-0.8.5 → python_clu-0.10.1}/scratch/nteract.ipynb +0 -0
  224. {python-clu-0.8.5 → python_clu-0.10.1}/setup.cfg +0 -0
  225. {python-clu-0.8.5 → python_clu-0.10.1}/tests/__init__.py +0 -0
  226. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/1-58.jpg +0 -0
  227. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
  228. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
  229. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/8600JC.jpg +0 -0
  230. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/8ba.png +0 -0
  231. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/IMG_20180505_205153567.jpg +0 -0
  232. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/cheetah-003.jpg +0 -0
  233. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/config/clu-config.toml +0 -0
  234. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/config/yodogg.toml +0 -0
  235. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/shutterstock_90194617.jpg +0 -0
  236. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
  237. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
  238. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
  239. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
  240. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
  241. {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/video-pride-serval.jpg +0 -0
  242. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_abstract.py +0 -0
  243. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_all.py +0 -0
  244. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_boilerplate.py +0 -0
  245. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_config_abc.py +0 -0
  246. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_csv.py +0 -0
  247. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_dicts.py +0 -0
  248. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_dispatch.py +0 -0
  249. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_enum_aliases.py +0 -0
  250. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_abc.py +0 -0
  251. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_appdirectories.py +0 -0
  252. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_filesystem.py +0 -0
  253. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_misc.py +0 -0
  254. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_importing.py +0 -0
  255. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_mathematics.py +0 -0
  256. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_naming.py +0 -0
  257. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_predicates.py +0 -0
  258. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repl_columnize.py +0 -0
  259. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repl_modules.py +0 -0
  260. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repr.py +0 -0
  261. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_scripts_repl.py +0 -0
  262. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_typespace_namespace.py +0 -0
  263. {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_typology.py +0 -0
  264. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/.tm_properties +0 -0
  265. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/__init__.py +0 -0
  266. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/__init__.py +0 -0
  267. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/config.py +0 -0
  268. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/exporting.py +0 -0
  269. {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/iheard.py +0 -0
  270. {python-clu-0.8.5 → python_clu-0.10.1}/tox.ini +0 -0
@@ -0,0 +1,32 @@
1
+
2
+ [tool.bumpversion]
3
+ current_version = "0.10.1"
4
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
5
+ serialize = ["{major}.{minor}.{patch}"]
6
+ search = "{current_version}"
7
+ replace = "{new_version}"
8
+ regex = true
9
+ ignore_missing_version = false
10
+ ignore_missing_files = false
11
+ tag = true
12
+ sign_tags = true
13
+ tag_name = "v{new_version}"
14
+ tag_message = "Bump version: {current_version} → {new_version}"
15
+ allow_dirty = false
16
+ commit = true
17
+ message = "Bumped version: {current_version} → {new_version}"
18
+ moveable_tags = []
19
+ commit_args = ""
20
+ setup_hooks = []
21
+ pre_commit_hooks = []
22
+ post_commit_hooks = []
23
+
24
+ [[tool.bumpversion.files]]
25
+ filename = "setup.py"
26
+ search = """__version__ = '{current_version}'"""
27
+ replace = """__version__ = '{new_version}'"""
28
+
29
+ [[tool.bumpversion.files]]
30
+ filename = "clu/__version__.py"
31
+ search = """__version__ = '{current_version}'"""
32
+ replace = """__version__ = '{new_version}'"""
@@ -1,6 +1,6 @@
1
1
  exclude *.pyc *~ *.so .DS_Store
2
2
 
3
- include .bumpversion.cfg
3
+ include .bumpversion.toml
4
4
  include .coveragerc
5
5
  include .editorconfig
6
6
  include .gitchangelog.rc
@@ -47,10 +47,10 @@ twine-upload: cython sdist wheel
47
47
  twine upload -s $(PROJECT_BASE)/dist/*
48
48
 
49
49
  bump:
50
- bump2version --verbose patch
50
+ bump-my-version bump patch --verbose
51
51
 
52
52
  bigbump:
53
- bump2version --verbose minor
53
+ bump-my-version bump minor --verbose
54
54
 
55
55
  check: clean-test-artifacts
56
56
  check-manifest -v
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-clu
3
- Version: 0.8.5
3
+ Version: 0.10.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
@@ -29,6 +29,41 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE.txt
31
31
  License-File: COPYING.md
32
+ Requires-Dist: Click>=7.0
33
+ Requires-Dist: colorama>=0.4.0
34
+ Requires-Dist: dataclasses>=0.6; python_version < "3.7"
35
+ Requires-Dist: dbx-stopwatch>=1.6
36
+ Requires-Dist: enum34>=1.1.0; python_version < "3.4"
37
+ Requires-Dist: heapdict>=1.0.0
38
+ Requires-Dist: humanize>=1.0.0
39
+ Requires-Dist: importlib-metadata>=1.4.0; python_version < "3.8"
40
+ Requires-Dist: mock>=4.0.0
41
+ Requires-Dist: multidict>=4.7.0
42
+ Requires-Dist: packaging
43
+ Requires-Dist: pout>=0.8.13
44
+ Requires-Dist: pygments>=2.0.0
45
+ Requires-Dist: PyYAML>=5.3.0
46
+ Requires-Dist: redis>=3.4.0
47
+ Requires-Dist: setuptools>=30.0.0
48
+ Requires-Dist: six>=1.10.0
49
+ Requires-Dist: termcolor>=1.1.0
50
+ Requires-Dist: toml>=0.10.0
51
+ Requires-Dist: wheel>=0.34.0
52
+ Requires-Dist: zict>=0.1.2
53
+ Requires-Dist: zipp>=2.0.0
54
+ Dynamic: author
55
+ Dynamic: author-email
56
+ Dynamic: classifier
57
+ Dynamic: description
58
+ Dynamic: description-content-type
59
+ Dynamic: download-url
60
+ Dynamic: home-page
61
+ Dynamic: keywords
62
+ Dynamic: license
63
+ Dynamic: license-file
64
+ Dynamic: platform
65
+ Dynamic: requires-dist
66
+ Dynamic: summary
32
67
 
33
68
  CLU – Common Lightweight Utilities (née Command-Line Utilities)
34
69
  ==================================================
@@ -0,0 +1 @@
1
+ __version__ = '0.10.1'
@@ -9,8 +9,7 @@ import sys
9
9
  abstract = abc.abstractmethod
10
10
 
11
11
  from clu.constants.enums import System, SYSTEM
12
- # from clu.config.abc import FrozenKeyMap
13
- from clu.config.base import NamespacedMutableMapping
12
+ from clu.config.keymap import Nested
14
13
  from clu.fs.appdirectories import AppDirs
15
14
  from clu.fs.filesystem import TemporaryName, Directory
16
15
  from clu.fs.misc import extension, filesize
@@ -138,7 +137,7 @@ class FileName(clu.abstract.AppName, metaclass=abc.ABCMeta):
138
137
  return Directory(root_dir.realpath()).subpath(file_name)
139
138
 
140
139
  @export
141
- class FileBase(NamespacedMutableMapping, FileName): # type: ignore
140
+ class FileBase(Nested, FileName): # type: ignore
142
141
 
143
142
  """ The FileBase abstract base class furnishes two methods:
144
143
 
@@ -71,11 +71,11 @@ class FrozenFlat(FrozenKeyMap, clu.abstract.ReprWrapper,
71
71
  if updates:
72
72
  self.dictionary.update(**updates)
73
73
 
74
- def nestify(self, cls=None):
74
+ def nestify(self, cls=None, walker=flatwalk):
75
75
  """ Articulate a flattened KeyMap instance out into one that is nested. """
76
76
  if cls is None:
77
77
  cls = FrozenNested
78
- return cls(tree=articulate(self.dictionary, walker=flatwalk))
78
+ return cls(tree=articulate(self.dictionary, walker=walker))
79
79
 
80
80
  def __iter__(self):
81
81
  yield from self.dictionary
@@ -188,82 +188,14 @@ __all__, __dir__ = exporter.all_and_dir()
188
188
  def test():
189
189
 
190
190
  from clu.testing.utils import inline
191
- from clu.config.keymap import Flat
191
+ from clu.config.keymap import Flat, Nested
192
+ from clu.config.keymap import nestedmaps, flatdict, arbitrary
192
193
  from clu.fs.filesystem import which
193
194
  from pprint import pprint
194
195
  import os, re, textwrap
195
196
 
196
- flat = Flat()
197
-
198
- javaprop_re = re.compile(r"^(?P<name>[\w\.]+): “(?P<value>.*)”", re.IGNORECASE | re.MULTILINE)
199
- java_source = textwrap.dedent("""
200
- package ost.%s;
201
-
202
- import java.util.Enumeration;
203
- import java.util.Properties;
204
-
205
- public class ShowJavaSystemProperties {
206
-
207
- public static void main(String... args) {
208
- Properties properties = System.getProperties();
209
- Enumeration names = properties.propertyNames();
210
- while (names.hasMoreElements()) {
211
- String name = (String) names.nextElement();
212
- String value = properties.getProperty(name);
213
- System.out.println(name + ": “" + value + "”");
214
- }
215
- }
216
-
217
- }
218
- """ % exporter.dotpath)
219
-
220
- @inline.precheck
221
- def load_java_system_properties():
222
- """ Load the Java JDK’s system properties """
223
- from clu.fs.filesystem import back_tick, TemporaryName
224
- from clu.naming import dotpath_to_prefix
225
-
226
- with TemporaryName(prefix="show-java-system-properties-",
227
- suffix="java",
228
- randomized=True) as java_file:
229
- java_file.write(java_source)
230
- java_path = java_file.realpath()
231
- output = back_tick(f"java {java_path}")
232
-
233
- assert not java_file.exists
234
-
235
- for line in output.splitlines():
236
- match = javaprop_re.match(line)
237
- if match:
238
- # BEWARE: dotpath_to_prefix(…) does a casefold():
239
- name = dotpath_to_prefix(match.group('name'),
240
- sep=NAMESPACE_SEP, end='')
241
- value = match.group('value')
242
- flat[name] = value
243
-
244
- pprint(flat)
245
-
246
- @inline.precheck
247
- def show_java_system_properties():
248
- """ Show namespaced Java system properties """
249
- count = flat.namespace_count()
250
- plural = count == 1 and '' or 's'
251
-
252
- print(f"* {count} namespace{plural} total:")
253
- print()
254
-
255
- for namespace in flat.namespaces():
256
- namespaces = split_ns(namespace)
257
- print(f"+ {namespace}:")
258
- for nskey, value in flat.items(*namespaces):
259
- bare_key = strip_ns(nskey)
260
- key = nskey.replace(prefix_for(*namespaces), '', 1)
261
- print(f" {key} : “{value}”")
262
- assert key.endswith(bare_key)
263
- print()
264
-
265
- print("- «unprefixed»:")
266
- pprint(flat.submap(unprefixed=True), indent=4)
197
+ flat = Flat(flatdict())
198
+ nested = Nested(nestedmaps())
267
199
 
268
200
  @inline
269
201
  def test_flat_validate_ns():
@@ -277,6 +209,18 @@ def test():
277
209
  for namespace in flat.freeze().namespaces():
278
210
  assert validate_ns(*split_ns(namespace))
279
211
 
212
+ @inline
213
+ def test_nested_validate_ns():
214
+ """ Validate a Nested keymap’s namespaces """
215
+ for namespace in nested.namespaces():
216
+ assert validate_ns(*split_ns(namespace))
217
+
218
+ @inline
219
+ def test_frozennested_validate_ns():
220
+ """ Validate a FrozenNested keymap’s namespaces """
221
+ for namespace in nested.freeze().namespaces():
222
+ assert validate_ns(*split_ns(namespace))
223
+
280
224
  @inline
281
225
  def test_validate_ns_errors():
282
226
  """ Check “validate_ns(…)” error conditions """
@@ -290,9 +234,84 @@ def test():
290
234
  except ValueError as exc:
291
235
  assert "namespace contains separator" in str(exc)
292
236
 
293
- if not which('java'):
294
- print("[WARNING] skipping `clu.config.ns` tests – `java` executable not found")
295
- return os.EX_OK
237
+ namespaces = ('yo', 'dogg')
238
+ key = 'iheard'
239
+ nskey = "yo:dogg:iheard"
240
+ value = "you like this sort of thing"
241
+
242
+ @inline
243
+ def test_concatenate_ns():
244
+ assert concatenate_ns(*namespaces) == "yo:dogg"
245
+
246
+ @inline
247
+ def test_prefix_for():
248
+ assert prefix_for(*namespaces) == "yo:dogg:"
249
+
250
+ @inline
251
+ def test_strip_ns():
252
+ assert strip_ns(nskey) == "iheard"
253
+
254
+ @inline
255
+ def test_split_ns():
256
+ assert tuple(split_ns(nskey)) == ('yo', 'dogg', 'iheard')
257
+ assert split_ns(nskey) == ['yo', 'dogg', 'iheard']
258
+
259
+ @inline
260
+ def test_startswith_ns():
261
+ assert startswith_ns(namespaces, ('yo', 'dogg'))
262
+
263
+ @inline
264
+ def test_unpack_ns():
265
+ assert unpack_ns(nskey) == (key, list(namespaces))
266
+ assert unpack_ns(nskey) == ('iheard', ['yo', 'dogg'])
267
+
268
+ @inline
269
+ def test_pack_ns():
270
+ assert pack_ns(key, *namespaces) == nskey
271
+ assert pack_ns(key, *namespaces) == "yo:dogg:iheard"
272
+
273
+ @inline
274
+ def test_get_ns():
275
+ assert get_ns(nskey) == "yo:dogg"
276
+
277
+ @inline
278
+ def test_get_ns_and_key():
279
+ assert get_ns_and_key(nskey) == ("yo:dogg", 'iheard')
280
+
281
+ @inline
282
+ def test_compare_ns():
283
+ assert compare_ns(namespaces, ('yo', 'dogg'))
284
+
285
+ appname = 'testing'
286
+ envkey = "TESTING_YO_DOGG_IHEARD"
287
+
288
+ @inline
289
+ def test_concatenate_env():
290
+ assert concatenate_env(*namespaces) == "YO_DOGG"
291
+ assert concatenate_env(*chain(tuplize(appname), namespaces)) == "TESTING_YO_DOGG"
292
+ assert concatenate_env(*chain(tuplize(appname), namespaces, tuplize(key))) == "TESTING_YO_DOGG_IHEARD"
293
+
294
+ @inline
295
+ def test_prefix_env():
296
+ assert prefix_env(appname, *namespaces) == "TESTING_YO_DOGG_"
297
+
298
+ @inline
299
+ def test_pack_env():
300
+ assert pack_env(appname, key, *namespaces) == "TESTING_YO_DOGG_IHEARD"
301
+
302
+ @inline
303
+ def test_unpack_env():
304
+ assert unpack_env(envkey) == (appname, key, list(namespaces))
305
+ assert unpack_env(envkey) == ('testing', 'iheard', ['yo', 'dogg'])
306
+
307
+ @inline
308
+ def test_nskey_from_env():
309
+ assert nskey_from_env(envkey) == (appname, pack_ns(key, *namespaces))
310
+ assert nskey_from_env(envkey) == ('testing', "yo:dogg:iheard")
311
+
312
+ @inline
313
+ def test_nskey_to_env():
314
+ assert nskey_to_env(appname, nskey) == "TESTING_YO_DOGG_IHEARD"
296
315
 
297
316
  return inline.test(100)
298
317
 
@@ -162,7 +162,7 @@ def test():
162
162
 
163
163
  from clu.testing.utils import inline
164
164
  from clu.config.ns import unpack_ns
165
- from clu.config.keymap import FrozenFlat, Flat
165
+ from clu.config.keymap import FrozenFlat, Flat, Nested
166
166
  from clu.config.keymap import nestedmaps, flatdict
167
167
  from pprint import pprint
168
168
 
@@ -311,19 +311,19 @@ def test():
311
311
  return test_fn
312
312
 
313
313
  # Add inline test functions using the metafunction test generators:
314
- inline.add_function(test_one_fn(FrozenFlat, KeyMapView, flatdict), 'test_one')
315
- inline.add_function(test_two_fn(FrozenFlat, KeyMapView, flatdict), 'test_two')
316
- inline.add_function(test_one_fn(Flat, KeyMapView, flatdict), 'test_three')
317
- inline.add_function(test_one_fn(Flat, KeyMapProxy, flatdict), 'test_three_point_five')
314
+ inline.add_function(test_one_fn(FrozenFlat, KeyMapView, flatdict), 'test_one_frozenflat_keymapview')
315
+ inline.add_function(test_two_fn(FrozenFlat, KeyMapView, flatdict), 'test_two_frozenflat_keymapview')
316
+ inline.add_function(test_one_fn(Flat, KeyMapView, flatdict), 'test_one_flat_keymapview')
317
+ inline.add_function(test_one_fn(Flat, KeyMapProxy, flatdict), 'test_one_flat_keymapproxy')
318
318
  inline.add_function(test_two_fn(Flat, KeyMapProxy, flatdict,
319
- KeyMapView), 'test_four')
319
+ KeyMapView), 'test_two_flat_keymapproxy')
320
320
 
321
321
  # N.B. These two take FUCKING FOREVER to run:
322
- # inline.add_function(test_one_fn(Nested, KeyMapView, nestedmaps), 'test_five')
323
- # inline.add_function(test_one_fn(Nested, KeyMapProxy, nestedmaps), 'test_five_point_five')
322
+ inline.add_function(test_one_fn(Nested, KeyMapView, nestedmaps), 'test_one_nested_keymapview')
323
+ inline.add_function(test_one_fn(Nested, KeyMapProxy, nestedmaps), 'test_one_nested_keymapproxy')
324
324
 
325
325
  @inline
326
- def test_six():
326
+ def test_view_proxy_exceptions():
327
327
  """ View/Proxy error conditions """
328
328
  try:
329
329
  KeyMapView(None)
@@ -555,7 +555,7 @@ class ExporterBase(collections.abc.MutableMapping,
555
555
  path = self.datafile()
556
556
 
557
557
  # Yield out a proper shelving database instance:
558
- with shelve.open(os.fspath(path), writeback=True) as shelving:
558
+ with contextlib.closing(shelve.open(os.fspath(path), writeback=True)) as shelving:
559
559
  yield shelving
560
560
 
561
561
  def exports(self):
@@ -12,8 +12,8 @@ import zict # type: ignore
12
12
 
13
13
  iterchain = chain.from_iterable
14
14
 
15
- from clu.constants.consts import CPYTHON, pytuple
16
- from clu.predicates import typeof, tuplize, attr
15
+ from clu.constants.consts import CPYTHON, QUALIFIER, pytuple
16
+ from clu.predicates import typeof, tuplize, attr, pyattr
17
17
  from clu.exporting import Exporter
18
18
 
19
19
  exporter = Exporter(path=__file__)
@@ -148,15 +148,12 @@ class DoubleDutchRegistry(clu.abstract.ReprWrapper,
148
148
 
149
149
  def funcname(self, key):
150
150
  function = self.cache[key]
151
- name = attr(function, '__qualname__', '__name__')
152
- signature = inspect.signature(function)
151
+ name = pyattr(function, 'name', 'qualname')
152
+ signature = str(inspect.signature(function)).strip('[]').split(QUALIFIER)[0]
153
153
  return f"{name!s}{signature!s}"
154
154
 
155
155
  def inner_repr(self):
156
- from pprint import pformat
157
156
  most = max(len(self.keyname(key)) for key in self)
158
- # cacheout = { self.keyname(key) : self.cache[key] for key in self }
159
- # return "\n%s" % pformat(cacheout, indent=4)
160
157
  out = ""
161
158
  for key in self:
162
159
  out += " %s : %s \n" % (self.keyname(key).ljust(most),
@@ -260,25 +257,24 @@ __all__, __dir__ = exporter.all_and_dir()
260
257
 
261
258
  def test():
262
259
 
263
- from clu.config.abc import FlatOrderedSet as FOSet
264
- from clu.config.base import NamespacedMutableMapping as NaMutMap
260
+ from clu.config.abc import KeyMap, FlatOrderedSet as FOSet
265
261
  from clu.testing.utils import pout, inline
266
262
 
267
263
  @inline
268
- def test_one():
264
+ def test_pairs_and_products():
269
265
  pair = []
270
266
  product = []
271
267
 
272
- for tup in ω(FOSet, NaMutMap):
273
- pair.append(tuple(str(el) for el in tup))
268
+ for mro_tuple in ω(FOSet, KeyMap):
269
+ pair.append(tuple(str(element) for element in mro_tuple))
274
270
 
275
- for itp in dot_product(FOSet.__mro__, NaMutMap.__mro__):
276
- product.append(tuple(str(el) for el in itp))
271
+ for mro_tuple in dot_product(FOSet.__mro__, KeyMap.__mro__):
272
+ product.append(tuple(str(element) for element in mro_tuple))
277
273
 
278
274
  # pout.v(pair[:10], product[:10])
279
275
 
280
- sorter = lambda t: ''.join(iterchain(t))
281
- retros = lambda t: ''.join(reversed(list(iterchain(t))))
276
+ sorter = lambda two_tuple: ''.join(iterchain(two_tuple))
277
+ retros = lambda two_tuple: ''.join(reversed(list(iterchain(two_tuple))))
282
278
 
283
279
  assert sorted(pair, key=sorter) == sorted(product, key=sorter)
284
280
  assert sorted(pair, key=retros) == sorted(product, key=retros)
@@ -286,9 +282,9 @@ def test():
286
282
  assert pair == product
287
283
 
288
284
  @inline
289
- def test_two():
290
- pairs = list(ω(FOSet, NaMutMap))
291
- products = list(dot_product(FOSet.mro(), NaMutMap.mro()))
285
+ def test_pair_mro():
286
+ pairs = list(ω(FOSet, KeyMap))
287
+ products = list(dot_product(FOSet.mro(), KeyMap.mro()))
292
288
 
293
289
  print()
294
290
  print("PAIRS »", len(pairs))
@@ -297,14 +293,14 @@ def test():
297
293
  assert set(pairs) == set(products) # REALLY.
298
294
 
299
295
  @inline
300
- def test_three():
296
+ def test_extend_pairtype():
301
297
 
302
298
  class __extend__(ΩΩ(int, int)): # type: ignore
303
299
 
304
300
  __name__ = "Coordinate"
305
301
 
306
- def ratio(xy):
307
- x, y = xy
302
+ def ratio(point_tuple):
303
+ x, y = point_tuple
308
304
  return x / y
309
305
 
310
306
  assert Ω(2, 3).ratio() == 2 / 3
@@ -313,14 +309,14 @@ def test():
313
309
 
314
310
  __name__ = "NamespacedKey"
315
311
 
316
- def pack(tup):
317
- ns, key = tup
312
+ def pack(two_tuple):
313
+ ns, key = two_tuple
318
314
  return f"{ns}:{key}"
319
315
 
320
316
  assert Ω('yo', 'dogg').pack() == "yo:dogg"
321
317
 
322
318
  @inline
323
- def test_four():
319
+ def test_doubledutch_function():
324
320
 
325
321
  @doubledutch
326
322
  def yodogg(x, y):
@@ -334,6 +330,8 @@ def test():
334
330
  def yodogg(x, y): # pragma: no cover
335
331
  return f"WAT: {x}, {y}"
336
332
 
333
+ assert yodogg('yo', 'dogg').startswith("WAT")
334
+
337
335
  assert yodogg.remove(str)
338
336
  assert not yodogg.remove(complex)
339
337
 
@@ -345,12 +343,14 @@ def test():
345
343
  def yodogg(x: float, y: float):
346
344
  return f"FLTS: {x}, {y}"
347
345
 
348
- print(yodogg(10, 20))
349
- print(yodogg('yo', 'dogg'))
350
- print(yodogg(3.14, 2.78))
351
- print("DEFAULTING »", yodogg(object(), object()))
346
+ default_return = yodogg(object(), object())
347
+ assert default_return is None
348
+ assert yodogg(10, 20).startswith("INTS")
349
+ assert yodogg('yo', 'dogg').startswith("STRS")
350
+ assert yodogg(3.14, 2.78).startswith("FLTS")
352
351
 
353
352
  print()
353
+
354
354
  regcount = len(yodogg.registry)
355
355
  print(f"REGISTRY ({regcount} items) »", repr(yodogg.registry))
356
356
 
@@ -676,12 +676,11 @@ class Directory(BaseFSName,
676
676
  Specify an optional “suffix” parameter to filter the list by a
677
677
  particular file suffix (leading dots unnecessary but unharmful).
678
678
  """
679
- if not self.exists:
680
- return tuple()
681
- with os.scandir(self.realpath(source)) as iterscan:
682
- return tuple(filter(suffix_searcher(suffix),
683
- filter(non_dotfile_matcher,
684
- (direntry.name for direntry in iterscan))))
679
+ if self.exists:
680
+ with os.scandir(self.realpath(source)) as iterscan:
681
+ yield from filter(suffix_searcher(suffix),
682
+ filter(non_dotfile_matcher,
683
+ (direntry.name for direntry in iterscan)))
685
684
 
686
685
  def ls_la(self, suffix=None, source=None):
687
686
  """ List all files, including files whose name starts with a dot.
@@ -697,11 +696,10 @@ class Directory(BaseFSName,
697
696
  commands I ever learned, and it reads better than `ls_a()` which
698
697
  I think looks awkward and goofy.)
699
698
  """
700
- if not self.exists:
701
- return tuple()
702
- with os.scandir(self.realpath(source)) as iterscan:
703
- return tuple(filter(suffix_searcher(suffix),
704
- (direntry.name for direntry in iterscan)))
699
+ if self.exists:
700
+ with os.scandir(self.realpath(source)) as iterscan:
701
+ yield from filter(suffix_searcher(suffix),
702
+ (direntry.name for direntry in iterscan))
705
703
 
706
704
  def subpath(self, subpath, source=None, requisite=False):
707
705
  """ Returns the path to a subpath of the instances’ target path. """
@@ -731,13 +729,12 @@ class Directory(BaseFSName,
731
729
  Specify an optional “pattern” parameter to filter the list
732
730
  by a particular regex pattern, as applied to directory names.
733
731
  """
734
- if not self.exists:
735
- return tuple()
736
- with os.scandir(self.realpath(source)) as iterscan:
737
- return tuple(map(lambda dirname: self.directory(dirname),
738
- filter(re_searcher(pattern),
739
- (direntry.name for direntry in iterscan \
740
- if direntry.is_dir()))))
732
+ if self.exists:
733
+ with os.scandir(self.realpath(source)) as iterscan:
734
+ yield from map(lambda dirname: self.directory(dirname),
735
+ filter(re_searcher(pattern),
736
+ (direntry.name for direntry in iterscan \
737
+ if direntry.is_dir())))
741
738
 
742
739
  def makedirs(self, subpath=None, mode=0o755):
743
740
  """ Creates any parts of the target directory path that don’t
@@ -943,7 +940,7 @@ class Directory(BaseFSName,
943
940
  dotpaths.update(path_to_dotpath(os.path.join(root, filename),
944
941
  relative_to=self.name)
945
942
  for filename in filenames)
946
- return sorted(dotpaths)
943
+ yield from sorted(dotpaths)
947
944
 
948
945
  def suffix_histogram(self, subdir=None,
949
946
  source=None,
@@ -13,6 +13,7 @@ import abc
13
13
  import collections.abc
14
14
  import clu.abstract
15
15
  import clu.dicts
16
+ import copy
16
17
  import importlib
17
18
  import importlib.abc
18
19
  import importlib.machinery
@@ -288,8 +289,8 @@ class ArgumentSink(collections.abc.Callable,
288
289
  and/or keyword arguments
289
290
  """
290
291
  instance = super().__new__(cls)
291
- instance.args = args
292
- instance.kwargs = kwargs
292
+ instance.args = copy.deepcopy(args)
293
+ instance.kwargs = copy.deepcopy(kwargs)
293
294
  return instance
294
295
 
295
296
  def __call__(self, function):
@@ -58,7 +58,7 @@ class CLUInterface(AppDirs):
58
58
  self.migrate_from_previous()
59
59
 
60
60
  # Configure zicts for key-value I/O:
61
- self.zfile = zict.File(str(self.datadir), mode='a')
61
+ self.zfile = zict.File(str(self.datadir))
62
62
  self.zutf8 = zict.Func(dump=attr(plistlib, 'dumps', 'writePlistToString'),
63
63
  load=attr(plistlib, 'loads', 'readPlistFromString'),
64
64
  d=self.zfile)
@@ -125,15 +125,15 @@ class CLUInterface(AppDirs):
125
125
 
126
126
  def keys(self):
127
127
  """ Return an iterable with all of the keys in this key-value store. """
128
- return self.zfunc.keys()
128
+ yield from self.zfunc.keys()
129
129
 
130
130
  def values(self):
131
131
  """ Return an iterable with all of the values in this key-value store. """
132
- return self.zfunc.values()
132
+ yield from self.zfunc.values()
133
133
 
134
134
  def items(self):
135
135
  """ Return an iterable yielding (key, value) for all items in this key-value store. """
136
- return self.zfunc.items()
136
+ yield from self.zfunc.items()
137
137
 
138
138
  def as_dict(self):
139
139
  """ Return a plain dict with the key-value stores’ contents. """
@@ -245,17 +245,17 @@ def update(dictish=NoDefault, **updates):
245
245
  @export
246
246
  def keys():
247
247
  """ Return an iterable with all of the keys in the key-value store. """
248
- return interface.keys()
248
+ yield from interface.keys()
249
249
 
250
250
  @export
251
251
  def values():
252
252
  """ Return an iterable with all of the values in the key-value store. """
253
- return interface.values()
253
+ yield from interface.values()
254
254
 
255
255
  @export
256
256
  def items():
257
257
  """ Return an iterable yielding (key, value) for all items in the key-value store. """
258
- return interface.items()
258
+ yield from interface.items()
259
259
 
260
260
  # NO DOCS ALLOWED:
261
261
  export(interface, name='interface')
@@ -25,8 +25,6 @@ from clu.exporting import Exporter
25
25
  exporter = Exporter(path=__file__)
26
26
  export = exporter.decorator()
27
27
 
28
- # colorama.init()
29
-
30
28
  print_separator = lambda filler='-': print(filler * SEPARATOR_WIDTH)
31
29
 
32
30
  @export