When writing bash shellscripts, I always set options "set -ueC" for strict error checking. However, loading pyvenv's activate and deactivate scripts from bash with "-u" option, they are failure because they may refer undefined shell variables.
I hope activate script and deactivate function are enclosed like following block
_OLD_BASH_OPTIONS="$-"
set +u
### script body ##
set -$_OLD_BASH_OPTIONS
unset _OLD_BASH_OPTIONS
Another option, all shell-variables in the script change like
$SPAM -> ${SPAM:-} |