Changelog¶
All notable changes to this project will be documented in this file.
0.3.0¶
- Breaking:
settings + othernow returns a newSettingsand leaves both operands unchanged. Usesettings += otherto addotherin place (the old behavior of "+"). - Removed the claim that
Settings.createaccepts a sequence of paths or mappings, which it never supported. Passing one raises aTypeError. - Removed the commented-out
envandxmlloaders and their options. - Updated to the
snickerdoodle0.5.0 template (Codecov coverage, a coverage page in the docs,pydoclint, Python 3.15, SPDX license metadata, a version read from__version__, GitHub CLI releases, anduvupdates from Dependabot). Added.cruft.jsonso thatcruft updatecan apply future template changes. - Removed the leftovers from
pdm(pdm.lockand the credits page and script, which readpdm.lock) and moved the issue templates out of a nestedISSUE_TEMPLATEfolder. - Now requires
bunches0.3.0 andwonka0.3.0 or later, which ship type information, somypychecksSettingsagainst its base classes. The intentional differences frombunches.Dictionary(add,update,items,keys, andvalues) are marked with# type: ignore[override]. Settingsnow inheritsfromkeys,setdefault, andsubsetfrombunches.Dictionaryinstead of repeating them.subsetnow deep copies the values chosen withinclude(before, they were shared with the original) and accepts areturnsargument ("class", "copy", or "simple").fromkeysnow accepts any iterable of keys and defaultsvaluetoNone, asdict.fromkeysdoes.- Documented type inference in the README, including that
toml,yaml, and Python module values are not converted, and removed the README acknowledgments. - Added conversion of list and dict strings to Python lists and dicts when inferring types (such as from
inifiles).[x, y, z]becomes['x', 'y', 'z']and{a: 1, b: [x, y]}becomes{'a': 1, 'b': ['x', 'y']}. Items are converted recursively, may be nested, and may be quoted to keep commas or prevent conversion. - Splitting strings on ", " into lists now ignores commas inside brackets or quotes.
- Fixed
Settings.from_toml, which ignored its keyword arguments (such asparse_float). - Fixed
Settings.from_yaml, which raised aTypeErrorwhen given any keyword arguments. They are now accepted and ignored. - Fixed loading a file with an unsupported extension, which raised a
KeyErrorinstead of the documentedTypeError. - Fixed the
Settings.createexample in the docstring, which was not valid Python. - Restyled the package (single quotes, spaces around keyword argument
=, closing brackets on the last line, and complete docstrings). Ruff now enforces single quotes and the 80 character line limit. mypynow passes and runs in CI.yamlis treated as an untyped import.- Removed the
ruff formatpre-commit hook, which would undo the package style, and set ruff'sforce-excludeso pre-commit does not lint excluded folders. - Added tests for the
dictmethods,inject,subset,fromkeys, missing and unsupported files, keyword arguments, and the private utilities (44 tests in total).
0.2.1¶
- Fixed loading
inifiles with values that contain a "%" (such asfloat_format = %.4f), which raised aconfigparser.InterpolationSyntaxError. Interpolation is now off by default and can be turned back on withinterpolation = configparser.BasicInterpolation(). - Fixed loading a missing
inifile, which was silently ignored instead of raising aFileNotFoundError. - Fixed
Settings.inject, which ignored itsoverwriteandsectionsarguments. - Fixed
Settings.keys, which called itself forever and raised aRecursionError.
0.2.0¶
- Stable release version with all tests and lint checks passed
0.1.8¶
- Switched to
uvas dependency manager - Updated GitHub Actions and dependencies
- Added full support for yaml and toml
- Removed support for env (not nested) and xml (rarely used)
0.1.7¶
- Fixed GitHub actions bug with
pdmandruff - Fixed typo in readme
0.1.6¶
- Added documentation and readme
- Added more tests
- Added .env support
- Changed required Python version to 3.11 or later
0.1.5¶
- Changelogs not stored before the transitition to the
snickerdoodletemplate