Skip to content

Commit

Permalink
Add deprecation warning for parsenvy.dict()
Browse files Browse the repository at this point in the history
  • Loading branch information
nkantar committed May 3, 2019
1 parent 4a9ed99 commit 8499fd3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Parsenvy Changelog


## [2.1.0] - 2019-05-03

### Deprecated
- `dict()`


## [2.0.10] - 2019-02-15

### Added
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
2 changes: 2 additions & 0 deletions parsenvy/parsenvy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8499fd3

Please sign in to comment.