Skip to content

Commit

Permalink
Deprecated the consul dynamic settings reader
Browse files Browse the repository at this point in the history
  • Loading branch information
drgarcia1986 committed Dec 29, 2021
1 parent 44b5cc8 commit 4e032fb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.rst
Expand Up @@ -438,8 +438,8 @@ In redis dynamic reader the binary types is automatically decoded.
To install with redis dependencies use:
``pip install simple-settings[redis]``

Consul
^^^^^^
Consul - Deprecated
^^^^^^^^^^^^^^^^^^^

You can read your settings dynamically from a consul server if you
activate the ``DYNAMIC_SETTINGS`` special setting with the ``consul``
Expand Down Expand Up @@ -636,6 +636,12 @@ Any other config of dynamic settings will be pass to reader backend on argument

Changelog
---------
[NEXT_RELEASE]
~~~~~~~~~~~~~~~~~~~~

- Update dependencies
- Deprecated Consul Dynamic Settings Reader


[1.1.0] - 2021-10-26
~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 6 additions & 0 deletions simple_settings/dynamic_settings/consul_reader.py
@@ -1,3 +1,5 @@
import warnings

from .base import BaseReader

try:
Expand All @@ -24,6 +26,10 @@ class Reader(BaseReader):

def __init__(self, conf):
super(Reader, self).__init__(conf)
warnings.warn(
'Consul Dynamic Settings Reader is deprecated',
DeprecationWarning
)

self.session = consulate.Consul(
host=self.conf['host'],
Expand Down
1 change: 1 addition & 0 deletions tests/dynamic_settings/test_consul.py
Expand Up @@ -13,6 +13,7 @@
skip = True


@pytest.mark.xfail
@pytest.mark.skipif(skip, reason='Installed without consul')
class TestDynamicConsulSettings:

Expand Down

0 comments on commit 4e032fb

Please sign in to comment.