Add
* Added notes about caching where relevant to “clu.fs.misc” docstrings. [Alexander Böhn]
* Added a “clu.fs.misc” test for checking the users’ home directory. [Alexander Böhn]
* Added a “clu.fs.misc” test for checking the process’ umask values. [Alexander Böhn]
* Added tests for “clu.fs.misc.u8{bytes,str}(…)” functions. [Alexander Böhn]
* Added a test for “clu.fs.misc.suffix_searcher(…)” [Alexander Böhn]
* Added a test for “clu.fs.misc.swapext(…)” ... literally pulled right out of the functions’ docstring. [Alexander Böhn]
* Added a test for “clu.fs.misc.re_suffix(…)” [Alexander Böhn]
* Added a test for “clu.fs.misc.filesize(…)” [Alexander Böhn]
* Added some tests to the “clu.fs.misc” testsuite. [Alexander Böhn]
* Added walrus-operator-related nota-benne. [Alexander Böhn]
* Added “clu.importing.ModuleBase.__execute__()” hook method ... this allows class-module implementations to run code at the analogous point in the module lifecycle to, like, e.g. when a file-based modules’ code is run by the Python interpreter. ... There’s lots of explanatory docstrings and a working example in the testsuite, doggie, yes. [Alexander Böhn]
* Adding “setproctitle” to the dev requirements. [Alexander Böhn]
* Added another inline test to “clu.importing” using “importlib.import_module(…)” [Alexander Böhn]
* Added “clu.importing.SubModule” context-manager ... for creating temporary class-module subtypes, suitable for testing, among other things ... includes an inline test and a support predicate “newtype(…)” [Alexander Böhn]
* Added “clu.predicates.union(…)” as a shortcut for “set().union(…)” [Alexander Böhn]
Minutiae
* Minutiae. [Alexander Böhn]
Other
* Bump version: 0.4.0 → 0.4.1. [Alexander Böhn]
* Less precision is OK with me in this case. [Alexander Böhn]
* Fleshing out “clu.repr” tests and details. [Alexander Böhn]
* Simplified decorator usage in “clu.fs.misc” [Alexander Böhn]
* Tweaked “suffix_searcher(…)” test to explicitly check None operands. [Alexander Böhn]
* Another premature optimization in the testsuite. [Alexander Böhn]
* Further pairing down gratuitous filesystem work in some tests. [Alexander Böhn]
* Rolled the “clu.fs.misc.samesize(…)” test into its precedent. [Alexander Böhn]
* Fleshing out “clu.fs.misc” tests to check file-size functions. [Alexander Böhn]
* Avoiding gratuitous file-copy operations in some tests. [Alexander Böhn]
* Expand the “filesize(…)” test to check nonexistant file attributes. [Alexander Böhn]
* Allow “clu.exporting.determine_name(…)” to work on all wrappers – ... not just function-types (as defined with “def” or lambdas) but any callable types with a callable “__wrapped__” attribute. [Alexander Böhn]
* Ugh. [Alexander Böhn]
* Some of these tests are kind of circuitous. [Alexander Böhn]
* Whitespace. [Alexander Böhn]
* More “clu.abstract” unit tests – some adapted from existing tests. [Alexander Böhn]
* Test suites for metaclasses in “clu.abstract” [Alexander Böhn]
* Ported two “clu.importing” inline tests to the testsuite ... specifically it’s the two tests that exercize the code for the “clu.importing.SubModule” utility. [Alexander Böhn]
* All kinds of new tests. [Alexander Böhn]
* Moved “MappingViewRepr” to “clu.abstract” and documented it. [Alexander Böhn]
* Importing “clu.abstract” wholesale and not piecemeal in “clu.dicts” [Alexander Böhn]
* Updated some docstring references to “Slotted” and “Prefix” [Alexander Böhn]
* The “Prefix” metaclass has been moved to “clu.abstract” [Alexander Böhn]
* Using “clu.abstract” classes in “clu.dicts” [Alexander Böhn]
* Moved “wrap_value(…)”, “hoist(…)” and friends to “clu.predicates” ... also trying to trim some of the gratuitous no-op lambdas. [Alexander Böhn]
* Fleshed out some sensible-default base classes in “clu.abstract” ... like there is now an intermediate ancestor of the verenable “clu.abstract.ValueDescriptor” class called “Descriptor” that makes use of “clu.abstract.SlottedRepr” ... which that class, “SlottedWrapper” is itself derived from the “clu.abstract.ReprWrapper” class and uses ‘__slots__’ values across its inheritence chain to build its instances’ reprs through a call to “clu.repr.strfields(…)” (q.v. the latest few patches supra.) [Alexander Böhn]
* Moving “stringify(…)” and friends from “clu.fs.misc” to “clu.repr” ... made the change across the entire project ... still have to deal with a couple of dingleberries remaining in the “fs.misc” module – namely “wrap_value(…)”, “hoist(…)” etc. [Alexander Böhn]
* Refactored “clu.fs.misc.stringify(…)” ... it now consists of a sub-function, “strfields(…)” – and the internal type-switch repr helper is just called “strfield(…)”. ... this will allow it to be used with the nascent abstract type, “clu.abstract.ReprWrapper” ... also added new predicates: • “reverse(ƒ)” » returns a lambda that returns “reversed(ƒ)” • “rmro(cls)” » is basically “reverse(mro)” • “ancestral(atx, cls)” » like “attr_across(atx, *rmro(cls))” • “ancestral_union(atx, cls)” » basically this is an alias for “uniquify(chain.from_iterable(ancestral(…)))” [Alexander Böhn]
* “clu.testing.utils.countfiles(…)” can take strings, “pathlib.Path”¬ ... or anything that is “os.fspath(¬)”-able (whereas previously it called “target.walk()” on its primary argument, limiting its use to “clu.fs.filesystem.Directory” instances, pretty much) [Alexander Böhn]
* Simplified that “clu.fs.filesystem.TemporaryName.write(…)” call ... using a call to “TemporaryName.parent()” ... also added None checks to “Directory.{copy_all,flatten}(…)” [Alexander Böhn]
* Swapped a manual read of a “__doc__” attr for “inspect.getdoc(…)” ... also removed a call to “ensure_path_is_valid(…)” within the “clu.fs.filesystem” module, in favor of custom logic allowing for idempotency (as as it was, the existing logic would fail to write if a file existed, which why?) [Alexander Böhn]
* Changing all references to “Slotted” and the like to “clu.abstract” ... the “Slotted” metaclass and the “ValueDescriptor” read-only property class have been relocated to “clu.abstract”; ... The export machinery was removed from “clu.abstract” – enabling the types from that module to be used by “clu.exporting” itself ... “doctrim(…)” was also removed from “clu.exporting” – we are now using ‘importlib.cleandoc(…)’ generally in its stead ... other assorted updates to grease the wheels of this particular iota of progress were in fact made to shit in general, doggie. [Alexander Böhn]
* Lambda-ifying the “cache” decorator in “clu.exporting” [Alexander Böhn]
* Using “inspect.getdoc(…)” instead of manually retrieving ‘__doc__’ [Alexander Böhn]
* Docstring manipulation fixes and touchups. [Alexander Böhn]
* Type checks in “clu.importing.SubModule.__init__(…)” [Alexander Böhn]
* Invalidating module-finder caches when unregistering a class-module. [Alexander Böhn]
* You really just can’t reuse class-module names now can you. [Alexander Böhn]
* Made “clu.importing.cache” a properly reusable decorator ... with – you guessed it dogg – a lambda-expression OH YOU KNOW ME BY NOW OKAY. [Alexander Böhn]
* Caching with “functools.lru_cache(…)” in “create_module(…)” [Alexander Böhn]
* Relocated the “clu.importing.LoaderBase.module_repr(…)” logic ... it is now in “clu.importing.Package.__repr__(…)”, which is the place in which it should be, considering the fact that that “module_repr(…)” abstract method was actually depreciated at some point during the massive amount of “importlib” API churn, at which I mercifully came in at the very tail end when I wrote all of this shit here doggie. [Alexander Böhn]
* Ensure module.qualname uses module.name (not ModuleClass.name) [Alexander Böhn]
* Per-app Finder subclasses are added based on installed appnames ... as opposed to previously, wherein it was depending on identity hashes of class objects, which was fundamentally flawed as each call to “initialize_types(…)” would always install a new Finder subclass regardless of the appname used. [Alexander Böhn]
* Killed dead code. [Alexander Böhn]
* Simplified “clu.importing.SubModule” using new class properties. [Alexander Böhn]
* Made class-module properties name/prefix/qualname work on classes ... by moving the property methods to the MetaModule metaclass, and then proxying property methods on the class – those that work on the instances – to class property access ... this was in aid of furnishing an “iter_modules(…)” class method on “clu.importing.FinderBase” which as the docstring notes is a quote-unquote non-standard API used by the “pkgutil” module ... other support shit for “iter_modules(…)” includes a function “clu.importing.modules_for_appname(…)” which that does pretty much what you think it does. [Alexander Böhn]
* Ensure class-moduyles’ exporter type is properly named. [Alexander Böhn]
* Testing deferred export of a class-module attribute. [Alexander Böhn]
* Silence the GitHub security alert for Pillow. [Alexander Böhn]
* Timing and pretty-print decorator for inline test functions ... available now in “clu.testing.utils” as “inline” ... usage example in the docstring, plus it’s been added to a bunch of existing inline test functions. [Alexander Böhn]
* Testing module-level registry functions inline. [Alexander Böhn]
* Clarified now-module-level class-module registry functions. [Alexander Böhn]
* Moved “all_appnames()” and “all_modules()” into module-level ... and out of “clu.importing.MetaRegistry” where formerly they were staticmethods ... this is in an attempt to unclutter the starting namespace of newly defined class-modules. [Alexander Böhn]
* Minor docstring manscaping. [Alexander Böhn]