Bugfix for when multiple group_key
s are used within a composite config.
Initial release
Read properties in parallel for faster config loading. This does require the get_config_value
method of any ConfigSource
object to be thread safe.
Fix types for cast
property of key
.
Revert changes from 0.1.2. Parallel was unhelpful.
Add some logging
Add __repr__
method to ConfigSource
Add more __repr__
methods in ConfigSource
Fix: don't cast default value
Refactor to use a ConfigProvider
which can be shared as a provider between all Config
objects
Add replace_source
and set_sources
methods on Config
and ConfigProvider
for easier manipulation of sources
- Fix typing on
@section
decorator. This was previously preventing IDE autocompletion. The return type of the decorator now uses a generic to indicate that it returns the same type as it is passed. This means that whether or not it is passed aConfig
subclass is no longer type checked, but it means that the returned class has all the correct properties on it, which is more important. - Add basic
repr
function toConfig
Version bump to build after move from travis-ci.org to travis-ci.com
Version bump to build after move from travis-ci.org to travis-ci.com
Version bump to build after move from travis-ci.org to travis-ci.com
Add post_read_hook
method which can be added to Config
subclasses to allow parts of the config to be modified after it has been fully loaded
BREAKING CHANGE: The key
function now expects keyword arguments and will not accept non-keyword arguments any more.
Make compatible with mypy.
Remove include_package_data=True
from setup.py
to ensure py.typed
is included in source distributions
Make type annotations pass string Mypy checking.
Remove pointless casting of default
value, since the default
should be provided already cast, and should have the same type as the return value of the cast
function. The also means that the type of a custom cast
function should only need to accept a string as input, rather than having to check for if it has already been cast.
Fix ImportError
for typing_extensions
on Python <= 3.7, by requiring it as a dependency. This is because Literal
is used as a type. This did not become part of the built in typing
module until Python 3.8.
Enable CI testing on Python 3.10 and 3.11. Use sys.version_info
to help with imports as mypy plays nicely with this.
Drop running tests on Python 3.6 since it is end of life.
As part of a solution for issue #12, add cast submodule with enum_cast helper function