Skip to content

Releases: frontdevops/magic-config

1.0.1

03 Jul 10:35
ee2aaf8

Choose a tag to compare

Magic Config 1.0.1 (2025-07-03)

🎉 Added

  • ENV_FILE override: honor the ENV_FILE environment variable to load a custom .env without needing to pass env_file= in code.
  • Flask integration: added a __dir__ override so that app.config.from_object(Config) imports all uppercase keys.
  • Arbitrary kwargs support: __new__ and __init__ now accept any **kwargs (e.g. BASE_DIR) without raising TypeError.
  • Python 3.13 features:
    • PEP 604 union types (str | None, etc.)
    • PEP 616 str.removeprefix() / str.removesuffix()
    • PEP 673 Self
    • PEP 591 Final
    • PEP 584 dict union/update operators (| and |=)

🔄 Changed

  • Minimum Python version bumped to 3.12+ (3.13 recommended) to leverage modern syntax and typing.
  • Type annotations modernized throughout the codebase.
  • Internal merging of config sources now uses |= for clearer, more performant updates.
  • Singleton initialization protected by an _initialized flag to avoid repeated loads.

🐛 Fixed

  • Resolved TypeError in __new__ when passing named arguments to the constructor.
  • Prevented infinite recursion in __delitem__.
  • Ensured Flask’s from_object picks up dynamic config keys via the new __dir__.

⚠️ Breaking Changes

  • Dropped support for Python versions prior to 3.12.
  • Constructor behavior changed: positional data and keyword args are now unified in a single merged dict—review any custom instantiations.

Migration Guide

  1. Upgrade Python if you’re running <3.12.
  2. Use the ENV_FILE env var or env_file= constructor arg to select your .env.
  3. No changes needed for Flask users—from_object(Config) now works out of the box.
  4. Audit any direct calls to MagicConfig.__new__/__init__ if you relied on the old signature.

Happy configuring! If you encounter any issues, please open a ticket on GitHub.

1.0.0

03 Jul 10:19
4ae3634

Choose a tag to compare

Magic Config 1.0.0 (2025-07-03)

🎉 Added

  • ENV_FILE override: honor the ENV_FILE environment variable to load a custom .env without needing to pass env_file= in code.
  • Flask integration: added a __dir__ override so that app.config.from_object(Config) imports all uppercase keys.
  • Arbitrary kwargs support: __new__ and __init__ now accept any **kwargs (e.g. BASE_DIR) without raising TypeError.
  • Python 3.13 features:
    • PEP 604 union types (str | None, etc.)
    • PEP 616 str.removeprefix() / str.removesuffix()
    • PEP 673 Self
    • PEP 591 Final
    • PEP 584 dict union/update operators (| and |=)

🔄 Changed

  • Minimum Python version bumped to 3.12+ (3.13 recommended) to leverage modern syntax and typing.
  • Type annotations modernized throughout the codebase.
  • Internal merging of config sources now uses |= for clearer, more performant updates.
  • Singleton initialization protected by an _initialized flag to avoid repeated loads.

🐛 Fixed

  • Resolved TypeError in __new__ when passing named arguments to the constructor.
  • Prevented infinite recursion in __delitem__.
  • Ensured Flask’s from_object picks up dynamic config keys via the new __dir__.

⚠️ Breaking Changes

  • Dropped support for Python versions prior to 3.13.
  • Constructor behavior changed: positional data and keyword args are now unified in a single merged dict—review any custom instantiations.

Migration Guide

  1. Upgrade Python if you’re running <3.13.
  2. Use the ENV_FILE env var or env_file= constructor arg to select your .env.
  3. No changes needed for Flask users—from_object(Config) now works out of the box.
  4. Audit any direct calls to MagicConfig.__new__/__init__ if you relied on the old signature.

Happy configuring! If you encounter any issues, please open a ticket on GitHub.

Fix

01 Nov 15:07

Choose a tag to compare

Fix
0.1.13

Merge branch 'main' of github.com:frontdevops/magic-config