mitogen icon indicating copy to clipboard operation
mitogen copied to clipboard

RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode

Open lonix1 opened this issue 4 years ago • 2 comments

environment:

Ubuntu 20.04 Python 3.8.2 Ansible 2.9.6 Mitogen 0.2.9 (also tried latest prerelease zip from github)

playbook:

- name: foo
  hosts: localhost
  connection: local
  gather_facts: 'true'

result:

TASK [Gathering Facts] *********************************************************************************************************************************************************************** /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, *args, **kwargs) ok: [localhost]

This warning did not show before I upgraded to Ubuntu 20.04. I assume the change is due to a newer python version?

Frankly it's just a warning so I don't mind it. But I thought the mitogen devs may want to know about it.

lonix1 avatar Jun 04 '20 12:06 lonix1

Thanks for the ticket!

s1113950 avatar Jun 04 '20 18:06 s1113950

This is still an issue in the latest Mitogen release candidate, Ansible 2.10:

- name: File Synchronisation
  ansible.posix.synchronize:
    src: .
    dest: /path/to/dest
TASK [File Synchronisation] *************************************************************************************************
/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, *args, **kwargs)
changed: [SFM-VPS-2]

Edit: I just switched to Mitogen master and it no longer shows. Thanks a lot.

BirkhoffLee avatar Dec 22 '21 10:12 BirkhoffLee