Skip to content

Release: 0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Oct 22:54
  • Breaking: ChainDict.parents is now a property, as in collections.ChainMap. Use chain.parents instead of chain.parents()
  • Breaking: removed settings.set_method_namer and settings._METHOD_NAMER, which nothing used, along with the unused kinds.GenericSet and kinds._MISSING sentinel
  • Breaking: DictList.subset now selects items by name (as DictList indexing, get and delete do) instead of by equality
  • in now only checks a mapping's stored keys, so the all, default and none wildcards are no longer always "in" a Catalog, and a list of keys is never "in" one. ChainDict checks each stored mapping
  • subset now returns deep copies of the selected values whether include, exclude or both are passed. Before, values chosen with include were shared with the original
  • Updated astral-sh/setup-uv to 10.3.1 and the locked markdown-exec, mkdocs-coverage, mypy, pre-commit, ruff and uv versions (replacing the open Dependabot pull requests), and the ruff and uv pre-commit hooks to match
  • Restyled the README examples (single quotes and spaces around keyword argument =)
  • Added a py.typed marker so that type checkers (such as mypy in bobbie) use the package's type hints
  • Fixed the mypy error from the __delitem__ signatures of Bunch and MutableSequence disagreeing
  • Dictionary.fromkeys and ChainDict.fromkeys now accept any iterable of keys and default value to None, as dict.fromkeys does
  • Fixed Catalog lookups and Catalog.delete with a tuple that is itself a stored key, which were treated as a sequence of separate keys
  • ChainDict.new_child now accepts a plain mapping (wrapped in a Dictionary, as add does) or no mapping (an empty Dictionary), as collections.ChainMap.new_child does
  • Fixed Repository.add ignoring an empty str key
  • Repository.add now raises a ValueError when no key is passed and the key namer cannot name the item, instead of storing it under None
  • Fixed unique key suffixes when _uniquify starts from an index other than 1
  • ChainDict.return_first and Repository.overwrite are now typed as bool instead of bool | None
  • Updated to the snickerdoodle 0.5.0 template (Codecov coverage, a coverage page in the docs, Python 3.15, SPDX license metadata, the version read from __version__, GitHub CLI releases, and CI that runs mypy and pre-commit once). Added .cruft.json so that cruft update can apply future template changes
  • Replaced the misnamed ,python-version file with .python-version and converted the files with Windows line endings to Unix line endings
  • Ruff now enforces single quotes and the 80 character line limit, and its force-exclude setting keeps pre-commit from linting the excluded folders
  • Restyled the package and tests (spaces around keyword argument =, closing brackets on the last line, Public Methods section markers, and complete docstrings with Returns before Raises)
  • Fixed the changelog entries, which were indented so that Markdown showed them as code
  • Added tests for the fixes above, the + and += operators of every class, tuple keys, ChainDict.get, the py.typed marker, and more (149 tests in total)