Config-resolver

Latest version: v5.1.0

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

Scan your dependencies

Page 1 of 5

5.1.0

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

Support
~~~~~~~

* Improved type-hints for the result of ``get_config``
* **Dropped Support for Python 3.5**

5.0.15.0.2.post1

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

Support
~~~~~~~

* Fix typos in code examples in docs (as of 5.0.2.post1)
* Even less aggressive logging (as of 5.0.2)
* Slightly less aggressive logging (as of 5.0.1 by Vince Broz)
* Compatibility with Python 3.5.2
* Improved unit-test on fresh clone (skip test with incorrect file-permissions
as they are not stored in git)

5.0.0

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

.. warning::

Major API changes! Read the full documentation before upgrading!

* Python 2 support is now dropped!
* Add the possibility to supply a custom file "handler" (f.ex. YAML or other
custom parsers).
* Add ``config_resolver.handler.json`` as optional file-handler.
* Refactored from a simple module to a full-fledged Python package
* Retrieving a config instance no longer returns a subclass of the
``configparser.ConfigParser`` class. Instead, it will return whatever the
supplied handler creates.
* External API changed to a functional API. You no longer call the ``Config``
constructor, but instead use the ``get_config()`` function. See the API docs
for the changes in function signature.
* Retrieval meta-data is returned along-side the retrieved config. This
separation allows a custom handler to return any type without impacting the
internal logic of ``config_resolver``.
* Dropped the deprectaed lookup in ``~/.group-name/app-name`` in favor of the
XDG standard ``~/.config/group-name/app-name``.
* Fully type-hinted

Upgrading from 4.x
~~~~~~~~~~~~~~~~~~

* Replace ``Config`` with ``get_config``
* The result from the call to ``get_config`` now returns a named-tuple with two
objects: The config instance (``.config``) and additional metadata
(``.meta``).
* The following attributes moved to the meta-data object:

* ``active_path``
* ``prefix_filter``
* ``loaded_files``

* Return types for INI files is now a standard library instance of
:py:class:`configparser.ConfigParser`. This means that the ``default``
keyword argument to ``get`` has been replaced with ``fallback``.

4.3.9

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

Fixed
~~~~~

* Blacklist setuptools 50.0.0 (See
https://github.com/pypa/setuptools/issues/2356)

4.3.8

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

Fixed
~~~~~

* Fixed a regression introduced in 4.3.7 which caused log-files no longer to be
loaded if ``meta.version`` had a mismatching minor-version


.. note::

While it may make sense to refuse loading config-version 1.2 when the app
asks for 1.4 (larger minor-version, same major-version), this would
introduce a backwards incompatibility and will break some apps using this.

This fix reverts that change from 4.3.7 but keeps the change on the test
deciding whether to log a warning or not, Before 4.3.7 we always emitted a
warning whenever the minor-version was *different*. Now we only emit one
when the minor version is too low in the loaded config-file.

4.3.7

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

Fixed
~~~~~

* Fix changelog in generated docs
* Don't log a warning when loading a config-file with a compatible (but
different) version.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.