Everett

Latest version: v3.3.0

Safety actively analyzes 619159 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

3.3.0

--------------------------

Backwards incompatible changes:

* Dropped support for Python 3.7. (220)

Fixes and features:

* Added support for Python 3.12 (221)

* Fix env file parsing in regards to quotes. (230)

3.2.0

------------------------

Fixes and features:

* Implement ``default_if_empty`` argument which will return the default value
(if specified) if the value is the empty string. (205)

* Implement ``parse_time_period`` parser for converting time periods like "10m4s"
into the total number of seconds that represents.

::

>>> from everett.manager import parse_time_period
>>> parse_time_period("4m")
240

(203)

* Implement ``parse_data_size`` parser for converting values like "40gb" into
the total number of bytes that represents.

::

>>> from everett.manager import parse_data_size
>>> parse_time_period("40gb")
40000000000

(204)

* Fix an ``UnboundLocalError`` when using ``automoduleconfig`` and providing a
Python dotted path to a thing that either kicks up an ``ImportError`` or
doesn't exist. Now it raises a more helpful error. (201)

3.1.0

--------------------------

Fixes and features:

* Add support for Python 3.11. (187)

* Add ``raise_configuration_error`` method on ``ConfigManager``. (185)

* Improve ``automoduleconfig`` to walk the whole AST and document configuration
set by assign::

SOMEVAR = _config("somevar")

and dict::

SOMEGROUP = {
"SOMEVAR": _config("somevar"),
}

(184)

* Fix options not showing up on ReadTheDocs. (186)

3.0.0

--------------------------

Backwards incompatible changes:

* Dropped support for Python 3.6. (176)

* Dropped ``autocomponent`` Sphinx directive in favor of
``autocomponentconfig``.

Fixes and features:

* Add support for Python 3.10. (173)

* Rework namespaces so that you can apply a namespace (``with_namespace()``)
after binding a component (``with_options()``) (175)

* Overhauled, simplified, and improved documentation. Files with example output
are now generated using `cog <https://pypi.org/project/cogapp/>`_.

* Rewrite Sphinx extension.

This now supports manually documenting configuration using
``everett:component`` and ``everett:option`` directives.

This adds ``:everett:component:`` and ``:everett:option:`` roles for linking
to specific configuration in the docs.

It also addsh ``autocomponentconfig`` and ``automoduleconfig`` directives for
automatically generating documentation.

When using these directives, items are added to the index and everything is
linkable making it easier to find and talk to users about specific
configuration items. (172)

2.0.1

--------------------------

Fixes:

* Fix Sphinx warning about roles in Everett sphinxext. (165)

* Fix ``get_runtime_config`` to work with slots (166)

2.0.0

-----------------------

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.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.