diff --git a/CHANGELOG.md b/CHANGELOG.md index 85076147..e4b81353 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.17.1] - 2021-04-29 + +### Fixed + +- Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]). + ## [0.17.0] - 2021-04-02 ### Changed @@ -232,6 +238,7 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). [@andrewsmith]: https://github.com/andrewsmith [@asyncee]: https://github.com/asyncee [@bbc2]: https://github.com/bbc2 +[@befeleme]: https://github.com/befeleme [@cjauvin]: https://github.com/cjauvin [@earlbread]: https://github.com/earlbread [@ekohl]: https://github.com/ekohl @@ -250,7 +257,8 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). [@yannham]: https://github.com/yannham [@zueve]: https://github.com/zueve -[Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.17.0...HEAD +[Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.17.1...HEAD +[0.17.1]: https://github.com/theskumar/python-dotenv/compare/v0.17.0...v0.17.1 [0.17.0]: https://github.com/theskumar/python-dotenv/compare/v0.16.0...v0.17.0 [0.16.0]: https://github.com/theskumar/python-dotenv/compare/v0.15.0...v0.16.0 [0.15.0]: https://github.com/theskumar/python-dotenv/compare/v0.14.0...v0.15.0 diff --git a/README.md b/README.md index f8d49562..9757e672 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ from io import StringIO from dotenv import load_dotenv config = StringIO("USER=foo\nEMAIL=foo@example.org") -load_dotenv(stream=stream) +load_dotenv(stream=config) ``` ### Load .env files in IPython diff --git a/setup.cfg b/setup.cfg index a2b27bfc..58054071 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.17.0 +current_version = 0.17.1 commit = True tag = True diff --git a/src/dotenv/version.py b/src/dotenv/version.py index fd86b3ee..c6eae9f8 100644 --- a/src/dotenv/version.py +++ b/src/dotenv/version.py @@ -1 +1 @@ -__version__ = "0.17.0" +__version__ = "0.17.1" diff --git a/tests/test_cli.py b/tests/test_cli.py index b21725ca..bc6b8d47 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +import os + import pytest import sh @@ -143,8 +145,10 @@ def test_run_with_existing_variable(tmp_path): dotenv_file = str(tmp_path / ".env") with open(dotenv_file, "w") as f: f.write("a=b") + env = dict(os.environ) + env.update({"LANG": "en_US.UTF-8", "a": "c"}) - result = sh.dotenv("run", "printenv", "a", _env={"LANG": "en_US.UTF-8", "a": "c"}) + result = sh.dotenv("run", "printenv", "a", _env=env) assert result == "b\n" @@ -154,14 +158,10 @@ def test_run_with_existing_variable_not_overridden(tmp_path): dotenv_file = str(tmp_path / ".env") with open(dotenv_file, "w") as f: f.write("a=b") + env = dict(os.environ) + env.update({"LANG": "en_US.UTF-8", "a": "c"}) - result = sh.dotenv( - "run", - "--no-override", - "printenv", - "a", - _env={"LANG": "en_US.UTF-8", "a": "c"}, - ) + result = sh.dotenv("run", "--no-override", "printenv", "a", _env=env) assert result == "c\n"