Skip to content

Latest commit

 

History

History
343 lines (238 loc) · 17.3 KB

CHANGELOG.md

File metadata and controls

343 lines (238 loc) · 17.3 KB

Changelog

v1.27.1 (2025-01-09)

Fix

  • Prepare for Python 3.14's new annotation behavior (81da4e5)

v1.27.0 (2024-05-01)

Feature

  • Support Path (and other already initialized class instances to be used as properties) (f500095)

v1.26.2 (2024-03-20)

Fix

  • Add _skip_none to also skip None values for optional fields (set to False by default for backwards compat) (a2169a6)
  • Improved pyproject.toml detection handling (swapped out black implementation by custom one) (85433ff)

v1.26.1 (2024-03-01)

Fix

  • Explicly add typing-extensions as a dependency (4bfba65)

v1.26.0 (2024-01-29)

Feature

  • @beautify is now automatically applied to subclassses of TypedConfig, unless beautify=False is added. (ab72585)

v1.25.2 (2024-01-25)

Fix

  • Updating an optional field to None via _update or normal attribute was ignored (b9b8cec)

v1.25.1 (2024-01-22)

Fix

  • beautify: Minor tweaks and cleanup (fdfe1fe)

v1.25.0 (2024-01-22)

Feature

  • beautify: Added the @beautify decorator to automatically set a nice repr and str (since these don't inherit) (366a8b0)

Documentation

  • beautify: Include an example for @beautify (b51d8d5)

v1.24.4 (2024-01-22)

Fix

  • Extracted convert_key to own function so it can be used elsewhere (d923802)

v1.24.3 (2024-01-17)

Fix

  • mypy: Proper return type for @register_dumper decorated functions like asjson (77a96ce)

v1.24.2 (2024-01-17)

Fix

  • Allow excluding internal variables from asdict/asjson/etc (35af912)

v1.24.1 (2023-12-04)

Fix

  • Postpone() now gives a more descriptive error when being accessed (da69257)

v1.24.0 (2023-11-27)

Feature

  • alias: Move alias helpers to alias module + add is_alias helper (b19b89f)

v1.23.5 (2023-11-23)

Fix

  • alias: Alias not always detected (e.g. in the case of postponed) (041f82c)

v1.23.4 (2023-11-20)

Fix

  • alias: Freeze and set slots so it can be used in a dataclass (a382269)

v1.23.3 (2023-11-20)

Fix

  • If alias points to an Optional key and it is missing, don't throw an error but set the value to None (26ec586)

v1.23.2 (2023-11-15)

Fix

  • Require a reasonable modern version of typeguard (1f1cbee)

v1.23.1 (2023-11-09)

Fix

  • alias: Work with postpone and update (3dc2ada)

v1.23.0 (2023-11-09)

Feature

  • alias: You can now define aliases for keys (5c72993)

Documentation

  • alias: Added to example readme (72efe8f)

v1.22.3 (2023-11-09)

Fix

  • postponed: Sometimes the two objects are not the same, so use type check instead of identity check (af9c1bb)

v1.22.2 (2023-11-09)

Fix

  • env: Default to converting types when loading from env (e939e48)

v1.22.1 (2023-11-09)

Fix

  • .env: Use cwd when looking for .env instead of package path (40df59d)

v1.22.0 (2023-11-09)

Feature

  • update: Improved updating via |= syntax and from env (b846ff4)

v1.21.0 (2023-11-07)

Feature

  • env: Cls.from_env function to load config from env (os.environ or dotenv) (1b16350)

v1.20.0 (2023-09-28)

Feature

  • helpers: Add as_binaryio helper (20e4f29)

v1.19.1 (2023-09-26)

v1.19.0 (2023-09-20)

Feature

  • core: Allow loading from a URL like you would a local file (aca52a9)

Documentation

  • Explained usage of URLs in load in readme (cb265a4)

v1.18.2 (2023-09-20)

Fix

  • mypy: Load_into also accepts bytes so return value is fixed (db509f0)

v1.18.1 (2023-09-20)

Fix

  • asbytes: Also expose from top-level lib + update examples (375ea47)

v1.18.0 (2023-09-20)

Feature

  • binary: Add asbytes() as shortcut for ._pack() (5caaa7d)

v1.17.3 (2023-09-18)

Fix

  • binary: Swapping out values with a different field now updates the container size (c76261a)

v1.17.2 (2023-09-18)

Fix

  • binary: Made ._pack work with split binary blocks (0393846)

Documentation

  • binary: Explained length is optional (65634f4)

v1.17.1 (2023-09-18)

Fix

  • binary: Allow splitting binary config into multiple blocks (f96adbb)

v1.17.0 (2023-09-18)

Feature

  • Allow a new type of config: binary config (06a70df)

Fix

  • binary: .load should now also work with just a bytestring, no wrapping dict. (2f7f8fc)

Documentation

  • Explained binary config in readme's (923b9e7)

v1.16.0 (2023-07-25)

Feature

  • A list of data can now also be loaded (e962cf8)

v1.15.0 (2023-07-21)

Feature

  • Added 'fill' to TypedConfig class to update without overwrite (8e27361)

v1.14.0 (2023-07-21)

Feature

  • Use empty data in load to read from pyproject.toml (6e48899)

v1.13.1 (2023-07-17)

Fix

  • If nested key is missing, don't crash but return empty data (and deal with error handling later) (822b671)

v1.13.0 (2023-07-06)

Feature

  • Allow defining custom converters for load_into(..., convert_types=True) using @configuraptor.converter (2cf8c44)
  • Support custom File types using @configuraptor.loader (4d5ccb3)

v1.12.1 (2023-07-06)

Documentation

  • readme: Added info about .env and .ini (c6acc09)

v1.12.0 (2023-07-03)

Feature

  • Support .ini files and fix convert_types for recursion (9333029)

v1.11.0 (2023-06-28)

Feature

  • dotenv: Support dotenv and add lower_keys and convert_types to load_into for dotenv (4d41197)

v1.10.0 (2023-06-26)

Feature

  • init: Allow ([args], {kwargs}) and [args] and {kwargs} for init! (0d19df8)

v1.9.2 (2023-06-22)

Fix

  • Internal values (_) should be updatable without TypedConfig._update logic (ef24673)

v1.9.1 (2023-06-22)

Fix

  • Key="" workaround no longer required (2c5fcaf)
  • mapping: Made mapping immutable, so MutableMapping actually has different behavior (a68ef56)

Documentation

  • mapping: Add example for TypedMapping (e430f40)

v1.9.0 (2023-06-22)

Feature

  • mapping: Add configuraptor.TypedMapping and .TypedMutableMapping to support **unpacking (but not on default TypedConfig) (b4c6b9d)

v1.8.0 (2023-06-21)

Feature

  • format: Allow TypedConfig._format (0b46646)

v1.7.2 (2023-06-20)

Fix

  • toml: Tomlkit had own types, move to tomli (0b5f0a4)

v1.7.1 (2023-06-20)

Fix

  • 310: Backwards compatible code (8f90aec)

v1.7.0 (2023-06-20)

v1.6.0 (2023-06-19)

Feature

  • TypedConfig: Added config.update (57a21c2)

v1.5.1 (2023-06-15)

Fix

  • core: Patch issue with is_optional (fd4a897)

v1.5.0 (2023-06-15)

Feature

  • dumping: Add methods to dump class instances to dict/toml/yaml/json (ea8232b)

v1.4.0 (2023-06-15)

Feature

  • postpone: Allow marking a field as postponed if you can't fill it in right away or from config (useful for cli tools with cli args) (1494000)

v1.3.2 (2023-06-15)

Documentation

  • examples: Added more examples (884d11a)
  • examples: Added more example code for the basic category (9782442)
  • examples: Started on providing more examples (ca84ecb)

v1.3.1 (2023-06-15)

Fix

  • mypy: Type[C] | C confused mypy so load_into (officially) only supports classes (not instances) now. (cd1c45e)

v1.3.0 (2023-06-14)

Feature

  • strict: Allow strict=False for load_into to ignore types (not recommended) (16853bb)

v1.2.1 (2023-06-14)

Fix

  • lib: Exposed wrong method (d57b6df)

v1.2.0 (2023-06-14)

Feature

  • lib: Expose more methods externally + make second arg of all_annotations optional (63605ba)

v1.1.2 (2023-06-14)

Fix

  • dataclass: Support for default_factory (031c68d)

Documentation

  • readme: Wrong package name oops (a9f7fad)

v1.1.1 (2023-06-14)

Documentation

  • readme: Change fixed image height to width for responsiveness (4ea3557)

v1.1.0 (2023-06-14)

Feature

  • Added JSON and YAML file loading. (e4f920f)

v1.0.3 (2023-06-14)

Fix

  • core: Checking for a required parameterized type (e.g. list[str]) crashed for a missing key (with the wrong error) (68ccc1c)

Documentation

  • readme: Added first example code (da0b13d)
  • changelog: Manually added changes (c1c40ef)
  • image: Set height (78896b8)

v1.0.2 (2023-06-14)

Documentation

  • set image size

Build

  • added hatch as dev dependency

v1.0.1 (2023-06-14)

Documentation

  • Fix changelog and url in readme (59bc18b)

v1.0.0 (2023-06-14)

BREAKING CHANGE

  • renamed to 'configuraptor'

Feature

  • py: Trying to support python 3.10 (9f7b0f7)

Documentation

  • readme: Fixed urls and extended sections (5fecc97)

v0.1.0 (2023-06-13)

Feature

  • Work in progress, second beta version with 100% cov (37f4fb4)
  • Work in progress, first working beta version without full docs etc. (cf90a93)

Fix

  • init: One step closer to a more logical init handling, just no args yet (only kwargs) (9274317)

Documentation

  • examples: Todo: example about the singleton mixin (7b6b0c0)

v0.1.0 (2023-06-05)

Feature

  • Initial version of the demo plugin (dc02818)