You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/ansible_mitogen
Alex Willmer 17bee70dc2 mitogen: Fix BlockingIOError & EAGAIN in subprocess stdio
Mitogen was leaving the stdout and stderr of subprocesses in non-blocking
mode. When Python code ran in the remote process created by Mitogen calls such
as `print(long_string)` or `os.stout.write(bigger_than_the_buffer)` sometimes
raised `BlockingIOError`, or similar.

This change
- Removes code in `mitogen.core.Side` that set blocking/non-blocking mode
- Adds blocking/non-blocking control to `os.mitogen.pipe()` and a new
  function `mitogen.core.socketpair()`
- Replaces `mitogen.core.set_block` and `mitogen.core.set_nonblock`
  with `mitogen.core.set_blocking`, mirroring `os.set_blocking`
- Updates call sites as appropriate
- Adds tests for new functions and arguments
- Adds a regression test for subprocess stdio blocking/non-blocking

fixes #712
4 months ago
..
compat Remove vendored mitogen.compat.simplejson 3 years ago
plugins Fix usage of connection_loader__get by wrapping the correct upstream functions. 11 months ago
utils ansible_mitogen: alpha datatag handling & CI for Ansible 12 (ansible-core 2.19) 6 months ago
__init__.py ansible: restructure to avoid intermediate imports 8 years ago
affinity.py ansible_mitogen: Remove Python 2.4 and 2.5 backward compatibility fallbacks 1 year ago
connection.py ansible_mitogen: Fix become_method=doas, add tests 4 months ago
loaders.py Allow running with ansible-core 2.19 6 months ago
logging.py ansible_mitogen: Remove fallback imports for Ansible < 2.10 1 year ago
mixins.py ansible_mitogen: Replace use of `ansible.parsing.utils.jsonify.jsonify()` 6 months ago
module_finder.py mitogen: Support PEP 451 ModuleSpec API, required for Python 3.12 2 years ago
parsing.py ansible_mitogen: Standardise __future__ imports to match Ansible 4 years ago
planner.py ansible_mitogen: alpha datatag handling & CI for Ansible 12 (ansible-core 2.19) 6 months ago
process.py mitogen: Fix BlockingIOError & EAGAIN in subprocess stdio 4 months ago
runner.py ansible_mitogen: alpha datatag handling & CI for Ansible 12 (ansible-core 2.19) 6 months ago
services.py ansible_mitogen: alpha datatag handling & CI for Ansible 12 (ansible-core 2.19) 6 months ago
strategy.py Disallow connection redirection of sub-connections if the top-level connection in the play is not a Mitogen connection. 11 months ago
target.py mitogen: Use pty.STD*_FILENO constants 6 months ago
transport_config.py ansible_mitogen: Support ANSIBLE_SSH_VERBOSITY with Ansible >= 12 5 months ago