Beartype 0.10.3 released.
This patch release positively vibrates with superlative support for functional beartype validators (i.e., beartype.vale.Is[...]
).
This patch release resolves 5 issues and merges 2 pull requests. Noteworthy changes include:
Issues Resolved
beartype.vale.Is[@beartype(...)]
.** The functional beartype validator API (i.e., thebeartype.vale.Is[...]
factory) now permissively accepts any low-level callable accepting one parameter wrapped by a higher-level callable, resolving issue #104 kindly submitted by the munificent typing maestro @dycw (Derek Wan). Specifically, thebeartype.vale.Is[...]
factory may now be subscripted (indexed) with any validation function wrapped by a decorator wrapper wrapped by the standard@functools.wraps
decorator, including any@beartype
-decorated validation function. Thus is the circle of validation complete. Cue Hakuna Matata.setup.py
circularity. Our top-levelbeartype.__init__
submodule no longer implicitly imports from anybeartype
submodule (except the guaranteeably safebeartype.meta
submodule) when imported at install time by our rootsetup.py
script, resolving issue #108 kindly discovered by @posita in a distressing comment embedded within the murky depths of PR #103. Specifically,setup.py
now dynamically populates the standardsys.modules
list with a fakebeartype.__is_installing__
"module;"beartype.__init__
then detects the presence of that "module" and avoids implicitly importing from unsafebeartype
submodules. In short: insane hackery. That's just how we roll.
Tests Improved
- Import isolation. The
test_package_import_isolation()
integration test minimizing importation costs by ensuring that the first import of the top-level lightweight :mod:beartype
package does not accidentally import from one or more heavyweight third-party packages now omits the third-partytyping_extensions
module from scrutiny. Thanks a bundle of crypto that I do not have to @posita for his deep profiling sacrifice at #103! @posita: still dah best in 2022.
(Jubilant sibilance entranced a sigil's brilliance!)