]> granicus.if.org Git - python/commit
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)
authorDaniel Abrahamsson <hamsson@gmail.com>
Wed, 11 Sep 2019 14:58:56 +0000 (16:58 +0200)
committerT. Wouters <thomas@python.org>
Wed, 11 Sep 2019 14:58:56 +0000 (07:58 -0700)
commit5209e586b7cac9a43b2c44349a26b1b0af06ead3
treecafe1143250451d37a63d17261fb117308364e50
parent3b58a70d9cf1c0f963adce9b07060116b2775687
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)

Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning:

```
$ python3 -m venv test
$ source test/bin/activate
(test) $ deactivate
-bash: $1: unbound variable
```
Lib/test/test_venv.py
Lib/venv/scripts/common/activate
Misc/NEWS.d/next/Library/2019-08-19-10-31-41.bpo-37885.4Nc9sp.rst [new file with mode: 0644]