Found while verifying docstring claims for the WP6 documentation sweep (#100). Docs now state the current behaviour; the code itself was left alone.
dol.trans.disallow_overwrites(store, *, error_msg=None, disable_deletes=True) defines an inner __setitem__ but never assigns it to store, ignores error_msg and disable_deletes, and returns None. So disallow_overwrites(D) is None and D still overwrites. dol.mixins.OverWritesNotAllowedMixin does the intended job. Either finish it (attach the override, honour disable_deletes, return the class) or delete it.
dol.caching.cache_func_outputs(cache=HashableDict): with the default, get_cache(HashableDict) returns the class, so the first call raises TypeError: argument of type 'type' is not iterable. With an explicit cache, kwargs are wrapped in a fresh HashableDict whose hash is id(self), so calls with keyword arguments never hit the cache. Only positional-only calls with an explicit cache cache anything.
Also worth a look, not verified as a bug: dol.paths.add_prefix_filtering(d, relativize_prefix=True)['a/'] returned the whole dict for d = {'a/b': 1, 'a/c': 2, 'd': 3} in a quick run.
Found while verifying docstring claims for the WP6 documentation sweep (#100). Docs now state the current behaviour; the code itself was left alone.
dol.trans.disallow_overwrites(store, *, error_msg=None, disable_deletes=True)defines an inner__setitem__but never assigns it tostore, ignoreserror_msganddisable_deletes, and returnsNone. Sodisallow_overwrites(D)isNoneandDstill overwrites.dol.mixins.OverWritesNotAllowedMixindoes the intended job. Either finish it (attach the override, honourdisable_deletes, return the class) or delete it.dol.caching.cache_func_outputs(cache=HashableDict): with the default,get_cache(HashableDict)returns the class, so the first call raisesTypeError: argument of type 'type' is not iterable. With an explicit cache, kwargs are wrapped in a freshHashableDictwhose hash isid(self), so calls with keyword arguments never hit the cache. Only positional-only calls with an explicit cache cache anything.Also worth a look, not verified as a bug:
dol.paths.add_prefix_filtering(d, relativize_prefix=True)['a/']returned the whole dict ford = {'a/b': 1, 'a/c': 2, 'd': 3}in a quick run.