Skip to content

Python 3.9.2: subprocess.py - RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used #2

@amal-khailtash

Description

@amal-khailtash

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions