From 8499fd3a7e750b27fd0fcf9aa321aa9b6af21d46 Mon Sep 17 00:00:00 2001 From: Nik Kantar Date: Thu, 2 May 2019 15:41:35 -0600 Subject: [PATCH] Add deprecation warning for parsenvy.dict() --- CHANGELOG.md | 9 ++++++++- README.rst | 2 ++ parsenvy/parsenvy.py | 2 ++ setup.py | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 309f3cd..d1e49ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Parsenvy Changelog +## [2.1.0] - 2019-05-03 + +### Deprecated +- `dict()` + + ## [2.0.10] - 2019-02-15 ### Added @@ -130,7 +136,8 @@ - Basic functionality -[Unreleased]: https://github.com/nkantar/Parsenvy/compare/2.0.10...HEAD +[Unreleased]: https://github.com/nkantar/Parsenvy/compare/2.1.0...HEAD +[2.1.0]: https://github.com/nkantar/Parsenvy/compare/2.0.10...2.1.0 [2.0.10]: https://github.com/nkantar/Parsenvy/compare/2.0.9...2.0.10 [2.0.9]: https://github.com/nkantar/Parsenvy/compare/2.0.8...2.0.9 [2.0.8]: https://github.com/nkantar/Parsenvy/compare/2.0.7...2.0.8 diff --git a/README.rst b/README.rst index c3f805b..2f6e061 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,8 @@ Examples 'meep' >>> parsenvy.set('SET_ENV_VAR') # SET_ENV_VAR=wat,wut,wot set(['wat', 'wut', 'wot']) + + # Note: Version 3 will deprecate parsenvy.dict(). >>> parsenvy.dict('DICT_ENV_VAR') # DICT_ENV_VAR=a:1,b:2 {'a': '1', 'b': '2'} diff --git a/parsenvy/parsenvy.py b/parsenvy/parsenvy.py index 1acb4fb..cbd3d88 100644 --- a/parsenvy/parsenvy.py +++ b/parsenvy/parsenvy.py @@ -100,6 +100,8 @@ def set(arg: builtins.str, default: builtins.set = None) -> Optional[builtins.se def dict(arg: builtins.str, default: builtins.dict = None) -> Optional[builtins.dict]: + print("[WARNING] parsenvy.dict() will be deprecated in version 3.") + var: Optional[builtins.str] = _env_var(arg) if var is not None: diff --git a/setup.py b/setup.py index f4371ce..2315d88 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="Parsenvy", - version="2.0.10", + version="2.1.0", author="Nik Kantar", author_email="nik@nkantar.com", description="Enviously elegant environment variable parsing",