python-dotenv
Advanced tools
| Copyright (c) 2014, Saurabh Kumar (python-dotenv), 2013, Ted Tieken (django-dotenv-rw), 2013, Jacob Kaplan-Moss (django-dotenv) | ||
| Redistribution and use in source and binary forms, with or without modification, | ||
| are permitted provided that the following conditions are met: | ||
| - Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
| - Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
| - Neither the name of django-dotenv nor the names of its contributors | ||
| may be used to endorse or promote products derived from this software | ||
| without specific prior written permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+65
-48
@@ -8,37 +8,47 @@ # Changelog | ||
| ## [1.0.0] | ||
| ## [0.21.1] - 2022-09-03 | ||
| **Fixed** | ||
| ### Added | ||
| * Use Python 3.11 non-beta in CI (#438 by @bbc2) | ||
| * Modernize variables code (#434 by @Nougat-Waffle) | ||
| * Modernize main.py and parser.py code (#435 by @Nougat-Waffle) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by @Nougat-Waffle) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by @bbc2) | ||
| * Updated Licence to align with BSD OSI template (#433 by @lsmith77) | ||
| * Drop support for python 3.7, add python 3.12-dev (#449 by [@theskumar]) | ||
| * Handle situations where the cwd does not exist. (#446 by [@jctanner]) | ||
| ## [0.21.1] - 2022-01-21 | ||
| ### Fixed | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by @theGOTOguy) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by @bbc2) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by @eaf) | ||
| **Added** | ||
| * Use Python 3.11 non-beta in CI (#438 by [@bbc2]) | ||
| * Modernize variables code (#434 by [@Nougat-Waffle]) | ||
| * Modernize main.py and parser.py code (#435 by [@Nougat-Waffle]) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by [@Nougat-Waffle]) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by [@bbc2]) | ||
| * Updated License to align with BSD OSI template (#433 by [@lsmith77]) | ||
| **Fixed** | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by [@theGOTOguy]) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by [@bbc2]) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by [@eaf]) | ||
| ## [0.21.0] - 2022-09-03 | ||
| ### Added | ||
| * CLI: add support for invocations via 'python -m'. (#395 by @theskumar) | ||
| * `load_dotenv` function now returns `False`. (#388 by @larsks) | ||
| * CLI: add --format= option to list command. (#407 by @sammck) | ||
| **Added** | ||
| ### Fixed | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by @eggplants) | ||
| * Use `open` instead of `io.open`. (#389 by @rabinadk1) | ||
| * Improve documentation for variables without a value (#390 by @bbc2) | ||
| * Add `parse_it` to Related Projects (#410 by @naorlivne) | ||
| * Update README.md (#415 by @harveer07) | ||
| * Improve documentation with direct use of MkDocs (#398 by @bbc2) | ||
| * CLI: add support for invocations via 'python -m'. (#395 by [@theskumar]) | ||
| * `load_dotenv` function now returns `False`. (#388 by [@larsks]) | ||
| * CLI: add --format= option to list command. (#407 by [@sammck]) | ||
| **Fixed** | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by [@eggplants]) | ||
| * Use `open` instead of `io.open`. (#389 by [@rabinadk1]) | ||
| * Improve documentation for variables without a value (#390 by [@bbc2]) | ||
| * Add `parse_it` to Related Projects (#410 by [@naorlivne]) | ||
| * Update README.md (#415 by [@harveer07]) | ||
| * Improve documentation with direct use of MkDocs (#398 by [@bbc2]) | ||
| ## [0.20.0] - 2022-03-24 | ||
| ### Added | ||
| **Added** | ||
@@ -48,3 +58,3 @@ - Add `encoding` (`Optional[str]`) parameter to `get_key`, `set_key` and `unset_key`. | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -57,3 +67,3 @@ - Use dict to specify the `entry_points` parameter of `setuptools.setup` (#376 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -65,3 +75,3 @@ - In `set_key`, add missing newline character before new entry if necessary. (#361 by | ||
| ### Added | ||
| **Added** | ||
@@ -72,3 +82,3 @@ - Add support for Python 3.10. (#359 by [@theskumar]) | ||
| ### Changed | ||
| **Changed** | ||
@@ -78,3 +88,3 @@ - Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341 | ||
| ### Added | ||
| **Added** | ||
@@ -89,3 +99,3 @@ - The `dotenv_path` argument of `set_key` and `unset_key` now has a type of `Union[str, | ||
| ### Changed | ||
| **Changed** | ||
@@ -103,3 +113,3 @@ - Raise `ValueError` if `quote_mode` isn't one of `always`, `auto` or `never` in | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -110,7 +120,7 @@ - Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]). | ||
| ### Changed | ||
| **Changed** | ||
| - Make `dotenv get <key>` only show the value, not `key=value` (#313 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -121,3 +131,3 @@ - Add `--override`/`--no-override` option to `dotenv run` (#312 by [@zueve] and [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -130,3 +140,3 @@ - The default value of the `encoding` parameter for `load_dotenv` and `dotenv_values` is | ||
| ### Added | ||
| **Added** | ||
@@ -136,3 +146,3 @@ - Add `--export` option to `set` to make it prepend the binding with `export` (#270 by | ||
| ### Changed | ||
| **Changed** | ||
@@ -142,3 +152,3 @@ - Make `set` command create the `.env` file in the current directory if no `.env` file was | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -152,3 +162,3 @@ - Fix potentially empty expanded value for duplicate key (#260 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -158,3 +168,3 @@ - Privilege definition in file over the environment in variable expansion (#256 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -166,3 +176,3 @@ - Improve error message for when file isn't found (#245 by [@snobu]). | ||
| ### Added | ||
| **Added** | ||
@@ -173,3 +183,3 @@ - Add support for a Bash-like default value in variable expansion (#248 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -179,3 +189,3 @@ - Use current working directory to find `.env` when bundled by PyInstaller (#213 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -188,3 +198,3 @@ - Fix escaping of quoted values written by `set_key` (#236 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -194,7 +204,7 @@ - Add `interpolate` argument to `load_dotenv` and `dotenv_values` to disable interpolation | ||
| ### Changed | ||
| **Changed** | ||
| - Use logging instead of warnings (#231 by [@bbc2]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -206,3 +216,3 @@ - Fix installation in non-UTF-8 environments (#225 by [@altendky]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -216,3 +226,3 @@ - Fix handling of malformed lines and lines without a value (#222 by [@bbc2]): | ||
| ### Added | ||
| **Added** | ||
@@ -351,2 +361,3 @@ - Make typing optional (#179 by [@techalchemy]). | ||
| [@cjauvin]: https://github.com/cjauvin | ||
| [@eaf]: https://github.com/eaf | ||
| [@earlbread]: https://github.com/earlbread | ||
@@ -362,5 +373,8 @@ [@eggplants]: https://github.com/@eggplants | ||
| [@jadutter]: https://github.com/jadutter | ||
| [@jctanner]: https://github.com/jctanner | ||
| [@larsks]: https://github.com/@larsks | ||
| [@lsmith77]: https://github.com/lsmith77 | ||
| [@mgorny]: https://github.com/mgorny | ||
| [@naorlivne]: https://github.com/@naorlivne | ||
| [@Nougat-Waffle]: https://github.com/Nougat-Waffle | ||
| [@qnighy]: https://github.com/qnighy | ||
@@ -371,2 +385,3 @@ [@rabinadk1]: https://github.com/@rabinadk1 | ||
| [@techalchemy]: https://github.com/techalchemy | ||
| [@theGOTOguy]: https://github.com/theGOTOguy | ||
| [@theskumar]: https://github.com/theskumar | ||
@@ -380,3 +395,5 @@ [@ulyssessouza]: https://github.com/ulyssessouza | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...HEAD | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v1.0.0...HEAD | ||
| [1.0.0]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v1.0.0 | ||
| [0.21.1]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1 | ||
| [0.21.0]: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0 | ||
@@ -383,0 +400,0 @@ [0.20.0]: https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0 |
+65
-48
@@ -8,37 +8,47 @@ # Changelog | ||
| ## [1.0.0] | ||
| ## [0.21.1] - 2022-09-03 | ||
| **Fixed** | ||
| ### Added | ||
| * Use Python 3.11 non-beta in CI (#438 by @bbc2) | ||
| * Modernize variables code (#434 by @Nougat-Waffle) | ||
| * Modernize main.py and parser.py code (#435 by @Nougat-Waffle) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by @Nougat-Waffle) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by @bbc2) | ||
| * Updated Licence to align with BSD OSI template (#433 by @lsmith77) | ||
| * Drop support for python 3.7, add python 3.12-dev (#449 by [@theskumar]) | ||
| * Handle situations where the cwd does not exist. (#446 by [@jctanner]) | ||
| ## [0.21.1] - 2022-01-21 | ||
| ### Fixed | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by @theGOTOguy) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by @bbc2) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by @eaf) | ||
| **Added** | ||
| * Use Python 3.11 non-beta in CI (#438 by [@bbc2]) | ||
| * Modernize variables code (#434 by [@Nougat-Waffle]) | ||
| * Modernize main.py and parser.py code (#435 by [@Nougat-Waffle]) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by [@Nougat-Waffle]) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by [@bbc2]) | ||
| * Updated License to align with BSD OSI template (#433 by [@lsmith77]) | ||
| **Fixed** | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by [@theGOTOguy]) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by [@bbc2]) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by [@eaf]) | ||
| ## [0.21.0] - 2022-09-03 | ||
| ### Added | ||
| * CLI: add support for invocations via 'python -m'. (#395 by @theskumar) | ||
| * `load_dotenv` function now returns `False`. (#388 by @larsks) | ||
| * CLI: add --format= option to list command. (#407 by @sammck) | ||
| **Added** | ||
| ### Fixed | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by @eggplants) | ||
| * Use `open` instead of `io.open`. (#389 by @rabinadk1) | ||
| * Improve documentation for variables without a value (#390 by @bbc2) | ||
| * Add `parse_it` to Related Projects (#410 by @naorlivne) | ||
| * Update README.md (#415 by @harveer07) | ||
| * Improve documentation with direct use of MkDocs (#398 by @bbc2) | ||
| * CLI: add support for invocations via 'python -m'. (#395 by [@theskumar]) | ||
| * `load_dotenv` function now returns `False`. (#388 by [@larsks]) | ||
| * CLI: add --format= option to list command. (#407 by [@sammck]) | ||
| **Fixed** | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by [@eggplants]) | ||
| * Use `open` instead of `io.open`. (#389 by [@rabinadk1]) | ||
| * Improve documentation for variables without a value (#390 by [@bbc2]) | ||
| * Add `parse_it` to Related Projects (#410 by [@naorlivne]) | ||
| * Update README.md (#415 by [@harveer07]) | ||
| * Improve documentation with direct use of MkDocs (#398 by [@bbc2]) | ||
| ## [0.20.0] - 2022-03-24 | ||
| ### Added | ||
| **Added** | ||
@@ -48,3 +58,3 @@ - Add `encoding` (`Optional[str]`) parameter to `get_key`, `set_key` and `unset_key`. | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -57,3 +67,3 @@ - Use dict to specify the `entry_points` parameter of `setuptools.setup` (#376 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -65,3 +75,3 @@ - In `set_key`, add missing newline character before new entry if necessary. (#361 by | ||
| ### Added | ||
| **Added** | ||
@@ -72,3 +82,3 @@ - Add support for Python 3.10. (#359 by [@theskumar]) | ||
| ### Changed | ||
| **Changed** | ||
@@ -78,3 +88,3 @@ - Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341 | ||
| ### Added | ||
| **Added** | ||
@@ -89,3 +99,3 @@ - The `dotenv_path` argument of `set_key` and `unset_key` now has a type of `Union[str, | ||
| ### Changed | ||
| **Changed** | ||
@@ -103,3 +113,3 @@ - Raise `ValueError` if `quote_mode` isn't one of `always`, `auto` or `never` in | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -110,7 +120,7 @@ - Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]). | ||
| ### Changed | ||
| **Changed** | ||
| - Make `dotenv get <key>` only show the value, not `key=value` (#313 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -121,3 +131,3 @@ - Add `--override`/`--no-override` option to `dotenv run` (#312 by [@zueve] and [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -130,3 +140,3 @@ - The default value of the `encoding` parameter for `load_dotenv` and `dotenv_values` is | ||
| ### Added | ||
| **Added** | ||
@@ -136,3 +146,3 @@ - Add `--export` option to `set` to make it prepend the binding with `export` (#270 by | ||
| ### Changed | ||
| **Changed** | ||
@@ -142,3 +152,3 @@ - Make `set` command create the `.env` file in the current directory if no `.env` file was | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -152,3 +162,3 @@ - Fix potentially empty expanded value for duplicate key (#260 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -158,3 +168,3 @@ - Privilege definition in file over the environment in variable expansion (#256 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -166,3 +176,3 @@ - Improve error message for when file isn't found (#245 by [@snobu]). | ||
| ### Added | ||
| **Added** | ||
@@ -173,3 +183,3 @@ - Add support for a Bash-like default value in variable expansion (#248 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -179,3 +189,3 @@ - Use current working directory to find `.env` when bundled by PyInstaller (#213 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -188,3 +198,3 @@ - Fix escaping of quoted values written by `set_key` (#236 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -194,7 +204,7 @@ - Add `interpolate` argument to `load_dotenv` and `dotenv_values` to disable interpolation | ||
| ### Changed | ||
| **Changed** | ||
| - Use logging instead of warnings (#231 by [@bbc2]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -206,3 +216,3 @@ - Fix installation in non-UTF-8 environments (#225 by [@altendky]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -216,3 +226,3 @@ - Fix handling of malformed lines and lines without a value (#222 by [@bbc2]): | ||
| ### Added | ||
| **Added** | ||
@@ -351,2 +361,3 @@ - Make typing optional (#179 by [@techalchemy]). | ||
| [@cjauvin]: https://github.com/cjauvin | ||
| [@eaf]: https://github.com/eaf | ||
| [@earlbread]: https://github.com/earlbread | ||
@@ -362,5 +373,8 @@ [@eggplants]: https://github.com/@eggplants | ||
| [@jadutter]: https://github.com/jadutter | ||
| [@jctanner]: https://github.com/jctanner | ||
| [@larsks]: https://github.com/@larsks | ||
| [@lsmith77]: https://github.com/lsmith77 | ||
| [@mgorny]: https://github.com/mgorny | ||
| [@naorlivne]: https://github.com/@naorlivne | ||
| [@Nougat-Waffle]: https://github.com/Nougat-Waffle | ||
| [@qnighy]: https://github.com/qnighy | ||
@@ -371,2 +385,3 @@ [@rabinadk1]: https://github.com/@rabinadk1 | ||
| [@techalchemy]: https://github.com/techalchemy | ||
| [@theGOTOguy]: https://github.com/theGOTOguy | ||
| [@theskumar]: https://github.com/theskumar | ||
@@ -380,3 +395,5 @@ [@ulyssessouza]: https://github.com/ulyssessouza | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...HEAD | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v1.0.0...HEAD | ||
| [1.0.0]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v1.0.0 | ||
| [0.21.1]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1 | ||
| [0.21.0]: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0 | ||
@@ -383,0 +400,0 @@ [0.20.0]: https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0 |
+1
-0
@@ -234,2 +234,3 @@ # python-dotenv | ||
| - [parse_it](https://github.com/naorlivne/parse_it) | ||
| - [python-decouple](https://github.com/HBNetwork/python-decouple) | ||
@@ -236,0 +237,0 @@ ## Acknowledgements |
@@ -1,3 +0,2 @@ | ||
| # Reference | ||
| # ::: dotenv | ||
| ::: dotenv |
+10
-8
@@ -6,11 +6,13 @@ Copyright (c) 2014, Saurabh Kumar (python-dotenv), 2013, Ted Tieken (django-dotenv-rw), 2013, Jacob Kaplan-Moss (django-dotenv) | ||
| * Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
| * Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
| * Neither the name of django-dotenv nor the names of its contributors | ||
| may be used to endorse or promote products derived from this software | ||
| without specific prior written permission. | ||
| - Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
| - Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
| - Neither the name of django-dotenv nor the names of its contributors | ||
| may be used to endorse or promote products derived from this software | ||
| without specific prior written permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
@@ -17,0 +19,0 @@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
+6
-0
@@ -8,4 +8,9 @@ site_name: python-dotenv | ||
| primary: green | ||
| features: | ||
| - toc.follow | ||
| - navigation.sections | ||
| markdown_extensions: | ||
| - mdx_truly_sane_lists | ||
| plugins: | ||
@@ -25,1 +30,2 @@ - mkdocstrings: | ||
| - Reference: reference.md | ||
| - License: license.md |
+69
-51
| Metadata-Version: 2.1 | ||
| Name: python-dotenv | ||
| Version: 0.21.1 | ||
| Version: 1.0.0 | ||
| Summary: Read key-value pairs from a .env file and set them as environment variables | ||
@@ -13,3 +13,2 @@ Home-page: https://github.com/theskumar/python-dotenv | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
@@ -19,2 +18,3 @@ Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: Programming Language :: Python :: 3.11 | ||
| Classifier: Programming Language :: Python :: 3.12 | ||
| Classifier: Programming Language :: Python :: Implementation :: PyPy | ||
@@ -28,3 +28,3 @@ Classifier: Intended Audience :: Developers | ||
| Classifier: Environment :: Web Environment | ||
| Requires-Python: >=3.7 | ||
| Requires-Python: >=3.8 | ||
| Description-Content-Type: text/markdown | ||
@@ -267,2 +267,3 @@ Provides-Extra: cli | ||
| - [parse_it](https://github.com/naorlivne/parse_it) | ||
| - [python-decouple](https://github.com/HBNetwork/python-decouple) | ||
@@ -289,37 +290,47 @@ ## Acknowledgements | ||
| ## [1.0.0] | ||
| ## [0.21.1] - 2022-09-03 | ||
| **Fixed** | ||
| ### Added | ||
| * Use Python 3.11 non-beta in CI (#438 by @bbc2) | ||
| * Modernize variables code (#434 by @Nougat-Waffle) | ||
| * Modernize main.py and parser.py code (#435 by @Nougat-Waffle) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by @Nougat-Waffle) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by @bbc2) | ||
| * Updated Licence to align with BSD OSI template (#433 by @lsmith77) | ||
| * Drop support for python 3.7, add python 3.12-dev (#449 by [@theskumar]) | ||
| * Handle situations where the cwd does not exist. (#446 by [@jctanner]) | ||
| ## [0.21.1] - 2022-01-21 | ||
| ### Fixed | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by @theGOTOguy) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by @bbc2) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by @eaf) | ||
| **Added** | ||
| * Use Python 3.11 non-beta in CI (#438 by [@bbc2]) | ||
| * Modernize variables code (#434 by [@Nougat-Waffle]) | ||
| * Modernize main.py and parser.py code (#435 by [@Nougat-Waffle]) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by [@Nougat-Waffle]) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by [@bbc2]) | ||
| * Updated License to align with BSD OSI template (#433 by [@lsmith77]) | ||
| **Fixed** | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by [@theGOTOguy]) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by [@bbc2]) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by [@eaf]) | ||
| ## [0.21.0] - 2022-09-03 | ||
| ### Added | ||
| * CLI: add support for invocations via 'python -m'. (#395 by @theskumar) | ||
| * `load_dotenv` function now returns `False`. (#388 by @larsks) | ||
| * CLI: add --format= option to list command. (#407 by @sammck) | ||
| **Added** | ||
| ### Fixed | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by @eggplants) | ||
| * Use `open` instead of `io.open`. (#389 by @rabinadk1) | ||
| * Improve documentation for variables without a value (#390 by @bbc2) | ||
| * Add `parse_it` to Related Projects (#410 by @naorlivne) | ||
| * Update README.md (#415 by @harveer07) | ||
| * Improve documentation with direct use of MkDocs (#398 by @bbc2) | ||
| * CLI: add support for invocations via 'python -m'. (#395 by [@theskumar]) | ||
| * `load_dotenv` function now returns `False`. (#388 by [@larsks]) | ||
| * CLI: add --format= option to list command. (#407 by [@sammck]) | ||
| **Fixed** | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by [@eggplants]) | ||
| * Use `open` instead of `io.open`. (#389 by [@rabinadk1]) | ||
| * Improve documentation for variables without a value (#390 by [@bbc2]) | ||
| * Add `parse_it` to Related Projects (#410 by [@naorlivne]) | ||
| * Update README.md (#415 by [@harveer07]) | ||
| * Improve documentation with direct use of MkDocs (#398 by [@bbc2]) | ||
| ## [0.20.0] - 2022-03-24 | ||
| ### Added | ||
| **Added** | ||
@@ -329,3 +340,3 @@ - Add `encoding` (`Optional[str]`) parameter to `get_key`, `set_key` and `unset_key`. | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -338,3 +349,3 @@ - Use dict to specify the `entry_points` parameter of `setuptools.setup` (#376 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -346,3 +357,3 @@ - In `set_key`, add missing newline character before new entry if necessary. (#361 by | ||
| ### Added | ||
| **Added** | ||
@@ -353,3 +364,3 @@ - Add support for Python 3.10. (#359 by [@theskumar]) | ||
| ### Changed | ||
| **Changed** | ||
@@ -359,3 +370,3 @@ - Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341 | ||
| ### Added | ||
| **Added** | ||
@@ -370,3 +381,3 @@ - The `dotenv_path` argument of `set_key` and `unset_key` now has a type of `Union[str, | ||
| ### Changed | ||
| **Changed** | ||
@@ -384,3 +395,3 @@ - Raise `ValueError` if `quote_mode` isn't one of `always`, `auto` or `never` in | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -391,7 +402,7 @@ - Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]). | ||
| ### Changed | ||
| **Changed** | ||
| - Make `dotenv get <key>` only show the value, not `key=value` (#313 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -402,3 +413,3 @@ - Add `--override`/`--no-override` option to `dotenv run` (#312 by [@zueve] and [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -411,3 +422,3 @@ - The default value of the `encoding` parameter for `load_dotenv` and `dotenv_values` is | ||
| ### Added | ||
| **Added** | ||
@@ -417,3 +428,3 @@ - Add `--export` option to `set` to make it prepend the binding with `export` (#270 by | ||
| ### Changed | ||
| **Changed** | ||
@@ -423,3 +434,3 @@ - Make `set` command create the `.env` file in the current directory if no `.env` file was | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -433,3 +444,3 @@ - Fix potentially empty expanded value for duplicate key (#260 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -439,3 +450,3 @@ - Privilege definition in file over the environment in variable expansion (#256 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -447,3 +458,3 @@ - Improve error message for when file isn't found (#245 by [@snobu]). | ||
| ### Added | ||
| **Added** | ||
@@ -454,3 +465,3 @@ - Add support for a Bash-like default value in variable expansion (#248 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -460,3 +471,3 @@ - Use current working directory to find `.env` when bundled by PyInstaller (#213 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -469,3 +480,3 @@ - Fix escaping of quoted values written by `set_key` (#236 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -475,7 +486,7 @@ - Add `interpolate` argument to `load_dotenv` and `dotenv_values` to disable interpolation | ||
| ### Changed | ||
| **Changed** | ||
| - Use logging instead of warnings (#231 by [@bbc2]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -487,3 +498,3 @@ - Fix installation in non-UTF-8 environments (#225 by [@altendky]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -497,3 +508,3 @@ - Fix handling of malformed lines and lines without a value (#222 by [@bbc2]): | ||
| ### Added | ||
| **Added** | ||
@@ -632,2 +643,3 @@ - Make typing optional (#179 by [@techalchemy]). | ||
| [@cjauvin]: https://github.com/cjauvin | ||
| [@eaf]: https://github.com/eaf | ||
| [@earlbread]: https://github.com/earlbread | ||
@@ -643,5 +655,8 @@ [@eggplants]: https://github.com/@eggplants | ||
| [@jadutter]: https://github.com/jadutter | ||
| [@jctanner]: https://github.com/jctanner | ||
| [@larsks]: https://github.com/@larsks | ||
| [@lsmith77]: https://github.com/lsmith77 | ||
| [@mgorny]: https://github.com/mgorny | ||
| [@naorlivne]: https://github.com/@naorlivne | ||
| [@Nougat-Waffle]: https://github.com/Nougat-Waffle | ||
| [@qnighy]: https://github.com/qnighy | ||
@@ -652,2 +667,3 @@ [@rabinadk1]: https://github.com/@rabinadk1 | ||
| [@techalchemy]: https://github.com/techalchemy | ||
| [@theGOTOguy]: https://github.com/theGOTOguy | ||
| [@theskumar]: https://github.com/theskumar | ||
@@ -661,3 +677,5 @@ [@ulyssessouza]: https://github.com/ulyssessouza | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...HEAD | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v1.0.0...HEAD | ||
| [1.0.0]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v1.0.0 | ||
| [0.21.1]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1 | ||
| [0.21.0]: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0 | ||
@@ -664,0 +682,0 @@ [0.20.0]: https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0 |
+1
-0
@@ -234,2 +234,3 @@ # python-dotenv | ||
| - [parse_it](https://github.com/naorlivne/parse_it) | ||
| - [python-decouple](https://github.com/HBNetwork/python-decouple) | ||
@@ -236,0 +237,0 @@ ## Acknowledgements |
+1
-1
@@ -8,5 +8,5 @@ black~=22.3.0 | ||
| pytest>=3.9 | ||
| sh>=1.09 | ||
| sh>=2 | ||
| tox | ||
| twine | ||
| wheel |
+1
-1
| [bumpversion] | ||
| current_version = 0.21.1 | ||
| current_version = 1.0.0 | ||
| commit = True | ||
@@ -4,0 +4,0 @@ tag = True |
+2
-2
@@ -34,3 +34,3 @@ from setuptools import setup | ||
| }, | ||
| python_requires=">=3.7", | ||
| python_requires=">=3.8", | ||
| extras_require={ | ||
@@ -49,3 +49,2 @@ 'cli': ['click>=5.0', ], | ||
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3.7', | ||
| 'Programming Language :: Python :: 3.8', | ||
@@ -55,2 +54,3 @@ 'Programming Language :: Python :: 3.9', | ||
| 'Programming Language :: Python :: 3.11', | ||
| 'Programming Language :: Python :: 3.12', | ||
| 'Programming Language :: Python :: Implementation :: PyPy', | ||
@@ -57,0 +57,0 @@ 'Intended Audience :: Developers', |
+15
-1
@@ -20,4 +20,18 @@ import json | ||
| def enumerate_env(): | ||
| """ | ||
| Return a path for the ${pwd}/.env file. | ||
| If pwd does not exist, return None. | ||
| """ | ||
| try: | ||
| cwd = os.getcwd() | ||
| except FileNotFoundError: | ||
| return None | ||
| path = os.path.join(cwd, '.env') | ||
| return path | ||
| @click.group() | ||
| @click.option('-f', '--file', default=os.path.join(os.getcwd(), '.env'), | ||
| @click.option('-f', '--file', default=enumerate_env(), | ||
| type=click.Path(file_okay=True), | ||
@@ -24,0 +38,0 @@ help="Location of the .env file, defaults to .env file in current working directory.") |
@@ -1,1 +0,1 @@ | ||
| __version__ = "0.21.1" | ||
| __version__ = "1.0.0" |
| Metadata-Version: 2.1 | ||
| Name: python-dotenv | ||
| Version: 0.21.1 | ||
| Version: 1.0.0 | ||
| Summary: Read key-value pairs from a .env file and set them as environment variables | ||
@@ -13,3 +13,2 @@ Home-page: https://github.com/theskumar/python-dotenv | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
@@ -19,2 +18,3 @@ Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: Programming Language :: Python :: 3.11 | ||
| Classifier: Programming Language :: Python :: 3.12 | ||
| Classifier: Programming Language :: Python :: Implementation :: PyPy | ||
@@ -28,3 +28,3 @@ Classifier: Intended Audience :: Developers | ||
| Classifier: Environment :: Web Environment | ||
| Requires-Python: >=3.7 | ||
| Requires-Python: >=3.8 | ||
| Description-Content-Type: text/markdown | ||
@@ -267,2 +267,3 @@ Provides-Extra: cli | ||
| - [parse_it](https://github.com/naorlivne/parse_it) | ||
| - [python-decouple](https://github.com/HBNetwork/python-decouple) | ||
@@ -289,37 +290,47 @@ ## Acknowledgements | ||
| ## [1.0.0] | ||
| ## [0.21.1] - 2022-09-03 | ||
| **Fixed** | ||
| ### Added | ||
| * Use Python 3.11 non-beta in CI (#438 by @bbc2) | ||
| * Modernize variables code (#434 by @Nougat-Waffle) | ||
| * Modernize main.py and parser.py code (#435 by @Nougat-Waffle) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by @Nougat-Waffle) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by @bbc2) | ||
| * Updated Licence to align with BSD OSI template (#433 by @lsmith77) | ||
| * Drop support for python 3.7, add python 3.12-dev (#449 by [@theskumar]) | ||
| * Handle situations where the cwd does not exist. (#446 by [@jctanner]) | ||
| ## [0.21.1] - 2022-01-21 | ||
| ### Fixed | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by @theGOTOguy) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by @bbc2) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by @eaf) | ||
| **Added** | ||
| * Use Python 3.11 non-beta in CI (#438 by [@bbc2]) | ||
| * Modernize variables code (#434 by [@Nougat-Waffle]) | ||
| * Modernize main.py and parser.py code (#435 by [@Nougat-Waffle]) | ||
| * Improve conciseness of cli.py and __init__.py (#439 by [@Nougat-Waffle]) | ||
| * Improve error message for `get` and `list` commands when env file can't be opened (#441 by [@bbc2]) | ||
| * Updated License to align with BSD OSI template (#433 by [@lsmith77]) | ||
| **Fixed** | ||
| * Fix Out-of-scope error when "dest" variable is undefined (#413 by [@theGOTOguy]) | ||
| * Fix IPython test warning about deprecated `magic` (#440 by [@bbc2]) | ||
| * Fix type hint for dotenv_path var, add StrPath alias (#432 by [@eaf]) | ||
| ## [0.21.0] - 2022-09-03 | ||
| ### Added | ||
| * CLI: add support for invocations via 'python -m'. (#395 by @theskumar) | ||
| * `load_dotenv` function now returns `False`. (#388 by @larsks) | ||
| * CLI: add --format= option to list command. (#407 by @sammck) | ||
| **Added** | ||
| ### Fixed | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by @eggplants) | ||
| * Use `open` instead of `io.open`. (#389 by @rabinadk1) | ||
| * Improve documentation for variables without a value (#390 by @bbc2) | ||
| * Add `parse_it` to Related Projects (#410 by @naorlivne) | ||
| * Update README.md (#415 by @harveer07) | ||
| * Improve documentation with direct use of MkDocs (#398 by @bbc2) | ||
| * CLI: add support for invocations via 'python -m'. (#395 by [@theskumar]) | ||
| * `load_dotenv` function now returns `False`. (#388 by [@larsks]) | ||
| * CLI: add --format= option to list command. (#407 by [@sammck]) | ||
| **Fixed** | ||
| * Drop Python 3.5 and 3.6 and upgrade GA (#393 by [@eggplants]) | ||
| * Use `open` instead of `io.open`. (#389 by [@rabinadk1]) | ||
| * Improve documentation for variables without a value (#390 by [@bbc2]) | ||
| * Add `parse_it` to Related Projects (#410 by [@naorlivne]) | ||
| * Update README.md (#415 by [@harveer07]) | ||
| * Improve documentation with direct use of MkDocs (#398 by [@bbc2]) | ||
| ## [0.20.0] - 2022-03-24 | ||
| ### Added | ||
| **Added** | ||
@@ -329,3 +340,3 @@ - Add `encoding` (`Optional[str]`) parameter to `get_key`, `set_key` and `unset_key`. | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -338,3 +349,3 @@ - Use dict to specify the `entry_points` parameter of `setuptools.setup` (#376 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -346,3 +357,3 @@ - In `set_key`, add missing newline character before new entry if necessary. (#361 by | ||
| ### Added | ||
| **Added** | ||
@@ -353,3 +364,3 @@ - Add support for Python 3.10. (#359 by [@theskumar]) | ||
| ### Changed | ||
| **Changed** | ||
@@ -359,3 +370,3 @@ - Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341 | ||
| ### Added | ||
| **Added** | ||
@@ -370,3 +381,3 @@ - The `dotenv_path` argument of `set_key` and `unset_key` now has a type of `Union[str, | ||
| ### Changed | ||
| **Changed** | ||
@@ -384,3 +395,3 @@ - Raise `ValueError` if `quote_mode` isn't one of `always`, `auto` or `never` in | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -391,7 +402,7 @@ - Fixed tests for build environments relying on `PYTHONPATH` (#318 by [@befeleme]). | ||
| ### Changed | ||
| **Changed** | ||
| - Make `dotenv get <key>` only show the value, not `key=value` (#313 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -402,3 +413,3 @@ - Add `--override`/`--no-override` option to `dotenv run` (#312 by [@zueve] and [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -411,3 +422,3 @@ - The default value of the `encoding` parameter for `load_dotenv` and `dotenv_values` is | ||
| ### Added | ||
| **Added** | ||
@@ -417,3 +428,3 @@ - Add `--export` option to `set` to make it prepend the binding with `export` (#270 by | ||
| ### Changed | ||
| **Changed** | ||
@@ -423,3 +434,3 @@ - Make `set` command create the `.env` file in the current directory if no `.env` file was | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -433,3 +444,3 @@ - Fix potentially empty expanded value for duplicate key (#260 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -439,3 +450,3 @@ - Privilege definition in file over the environment in variable expansion (#256 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -447,3 +458,3 @@ - Improve error message for when file isn't found (#245 by [@snobu]). | ||
| ### Added | ||
| **Added** | ||
@@ -454,3 +465,3 @@ - Add support for a Bash-like default value in variable expansion (#248 by [@bbc2]). | ||
| ### Changed | ||
| **Changed** | ||
@@ -460,3 +471,3 @@ - Use current working directory to find `.env` when bundled by PyInstaller (#213 by | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -469,3 +480,3 @@ - Fix escaping of quoted values written by `set_key` (#236 by [@bbc2]). | ||
| ### Added | ||
| **Added** | ||
@@ -475,7 +486,7 @@ - Add `interpolate` argument to `load_dotenv` and `dotenv_values` to disable interpolation | ||
| ### Changed | ||
| **Changed** | ||
| - Use logging instead of warnings (#231 by [@bbc2]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -487,3 +498,3 @@ - Fix installation in non-UTF-8 environments (#225 by [@altendky]). | ||
| ### Fixed | ||
| **Fixed** | ||
@@ -497,3 +508,3 @@ - Fix handling of malformed lines and lines without a value (#222 by [@bbc2]): | ||
| ### Added | ||
| **Added** | ||
@@ -632,2 +643,3 @@ - Make typing optional (#179 by [@techalchemy]). | ||
| [@cjauvin]: https://github.com/cjauvin | ||
| [@eaf]: https://github.com/eaf | ||
| [@earlbread]: https://github.com/earlbread | ||
@@ -643,5 +655,8 @@ [@eggplants]: https://github.com/@eggplants | ||
| [@jadutter]: https://github.com/jadutter | ||
| [@jctanner]: https://github.com/jctanner | ||
| [@larsks]: https://github.com/@larsks | ||
| [@lsmith77]: https://github.com/lsmith77 | ||
| [@mgorny]: https://github.com/mgorny | ||
| [@naorlivne]: https://github.com/@naorlivne | ||
| [@Nougat-Waffle]: https://github.com/Nougat-Waffle | ||
| [@qnighy]: https://github.com/qnighy | ||
@@ -652,2 +667,3 @@ [@rabinadk1]: https://github.com/@rabinadk1 | ||
| [@techalchemy]: https://github.com/techalchemy | ||
| [@theGOTOguy]: https://github.com/theGOTOguy | ||
| [@theskumar]: https://github.com/theskumar | ||
@@ -661,3 +677,5 @@ [@ulyssessouza]: https://github.com/ulyssessouza | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...HEAD | ||
| [Unreleased]: https://github.com/theskumar/python-dotenv/compare/v1.0.0...HEAD | ||
| [1.0.0]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v1.0.0 | ||
| [0.21.1]: https://github.com/theskumar/python-dotenv/compare/v0.21.0...v0.21.1 | ||
| [0.21.0]: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0 | ||
@@ -664,0 +682,0 @@ [0.20.0]: https://github.com/theskumar/python-dotenv/compare/v0.19.2...v0.20.0 |
@@ -17,2 +17,3 @@ .editorconfig | ||
| docs/index.md | ||
| docs/license.md | ||
| docs/reference.md | ||
@@ -19,0 +20,0 @@ src/dotenv/__init__.py |
+33
-33
@@ -156,57 +156,57 @@ import os | ||
| def test_get_default_path(tmp_path): | ||
| sh.cd(str(tmp_path)) | ||
| with open(str(tmp_path / ".env"), "w") as f: | ||
| f.write("a=b") | ||
| with sh.pushd(str(tmp_path)): | ||
| with open(str(tmp_path / ".env"), "w") as f: | ||
| f.write("a=b") | ||
| result = sh.dotenv("get", "a") | ||
| result = sh.dotenv("get", "a") | ||
| assert result == "b\n" | ||
| assert result == "b\n" | ||
| def test_run(tmp_path): | ||
| sh.cd(str(tmp_path)) | ||
| dotenv_file = str(tmp_path / ".env") | ||
| with open(dotenv_file, "w") as f: | ||
| f.write("a=b") | ||
| with sh.pushd(str(tmp_path)): | ||
| dotenv_file = str(tmp_path / ".env") | ||
| with open(dotenv_file, "w") as f: | ||
| f.write("a=b") | ||
| result = sh.dotenv("run", "printenv", "a") | ||
| result = sh.dotenv("run", "printenv", "a") | ||
| assert result == "b\n" | ||
| assert result == "b\n" | ||
| def test_run_with_existing_variable(tmp_path): | ||
| sh.cd(str(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"}) | ||
| with sh.pushd(str(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=env) | ||
| result = sh.dotenv("run", "printenv", "a", _env=env) | ||
| assert result == "b\n" | ||
| assert result == "b\n" | ||
| def test_run_with_existing_variable_not_overridden(tmp_path): | ||
| sh.cd(str(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"}) | ||
| with sh.pushd(str(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=env) | ||
| result = sh.dotenv("run", "--no-override", "printenv", "a", _env=env) | ||
| assert result == "c\n" | ||
| assert result == "c\n" | ||
| def test_run_with_none_value(tmp_path): | ||
| sh.cd(str(tmp_path)) | ||
| dotenv_file = str(tmp_path / ".env") | ||
| with open(dotenv_file, "w") as f: | ||
| f.write("a=b\nc") | ||
| with sh.pushd(str(tmp_path)): | ||
| dotenv_file = str(tmp_path / ".env") | ||
| with open(dotenv_file, "w") as f: | ||
| f.write("a=b\nc") | ||
| result = sh.dotenv("run", "printenv", "a") | ||
| result = sh.dotenv("run", "printenv", "a") | ||
| assert result == "b\n" | ||
| assert result == "b\n" | ||
@@ -213,0 +213,0 @@ |
+7
-7
| [tox] | ||
| envlist = lint,py{37,38,39,310,311},pypy3,manifest,coverage-report | ||
| envlist = lint,py{38,39,310,311,312-dev},pypy3,manifest,coverage-report | ||
| [gh-actions] | ||
| python = | ||
| 3.7: py37 | ||
| 3.8: py38 | ||
@@ -11,2 +10,3 @@ 3.9: py39 | ||
| 3.11: py311, lint, manifest | ||
| 3.12-dev: py312-dev | ||
| pypy-3.9: pypy3 | ||
@@ -18,9 +18,9 @@ | ||
| pytest-cov | ||
| sh | ||
| sh >= 2.0.2, <3 | ||
| click | ||
| py{37,38,39,310,311,pypy3}: ipython | ||
| py{38,39,310,311,py312-dev,pypy3}: ipython | ||
| commands = pytest --cov --cov-report=term-missing --cov-config setup.cfg {posargs} | ||
| depends = | ||
| py{37,38,39,310,311},pypy3: coverage-clean | ||
| coverage-report: py{35,36,37,38,39,310,311},pypy3 | ||
| py{38,39,310,311,312-dev},pypy3: coverage-clean | ||
| coverage-report: py{38,39,310,311,312-dev},pypy3 | ||
@@ -34,2 +34,3 @@ [testenv:lint] | ||
| flake8 src tests | ||
| mypy --python-version=3.12 src tests | ||
| mypy --python-version=3.11 src tests | ||
@@ -39,3 +40,2 @@ mypy --python-version=3.10 src tests | ||
| mypy --python-version=3.8 src tests | ||
| mypy --python-version=3.7 src tests | ||
@@ -42,0 +42,0 @@ [testenv:manifest] |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
153608
3.1%42
2.44%1527
0.73%