Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

v2.0.0

@willkg willkg tagged this 27 Jul 19:44
Backwards incompatible changes:

* This radically reduces the boilerplate required to define components. It also
  improves the connections between things so it's easier to:

  * determine the configuration required for a single component (taking into
    account superclasses, overriding, etc)
  * determine the runtime configuration for a component tree given a
    configuration manager

  Previously, components needed to subclass RequiredConfigMixin and provide a
  "required_config" class attribute. Something like this::

      from everett.component import RequiredConfigMixin, ConfigOptions

      class SomeClass(RequiredConfigMixin):
          required_config = ConfigOptions()
          required_config.add_option(
              "some_option",
              default="42",
          )

  That's been slimmed down and now looks like this::

      from everett.manager import Option

      class SomeClass:
          class Config:
              some_option = Option(default="42")

  That's much simpler and the underlying implementation code is less tangled
  and complex, too.

  If you used ``everett.component.RequiredConfigMixin`` or
  ``everett.component.ConfigOptions``, you'll need to update your classes.

  If you didn't use those things, then you don't have to make any changes.

  See the documentation on components for how it all works now.

* Changed the way configuration variables are referred to in configuration
  error messages. Previously, I tried to use a general way "namespace=something
  key=somethingelse" but that's confusing and won't match up with project
  documentation.

  I changed it to the convention used in the process environment and
  env files. For example, ``FOO_BAR``.

  If you use INI or YAML for configuration, you can specify a ``msg_builder``
  argument when you build the ``ConfigManager`` and build error messages
  tailored to your users.

Fixes:

* Switch to src/ repository layout.

* Added type annotations and type checking during CI. (#155)

* Standardized on f-strings across the codebase.

* Switched Sphinx theme.

* Update of documentation, fleshed out and simplified examples, cleaned up
  language, reworked structure of API section (previously called Library or
  some unhelpful thing like that), etc.
Assets 2
Loading