On Python 3.9.2, the bufsize=1 on the following line:
101: p = Popen(command, stdout=PIPE, stderr=STDOUT, shell=True, bufsize=1)
causes this warning:
$ jenkenv run Jenkinsfile
.../python/3.9.2/lib/python3.9/subprocess.py:941: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
Removing bufsize=1 fixes this issue.