Skip to content

fix: expose ChannelFile encoding - #425

Closed
vaibhavjnf wants to merge 1 commit into
pytest-dev:mainfrom
vaibhavjnf:fix/channel-file-encoding
Closed

fix: expose ChannelFile encoding#425
vaibhavjnf wants to merge 1 commit into
pytest-dev:mainfrom
vaibhavjnf:fix/channel-file-encoding

Conversation

@vaibhavjnf

Copy link
Copy Markdown

Summary

  • expose the UTF-8 encoding on execnet channel file wrappers
  • define the attribute once on the shared ChannelFile base
  • cover both public Channel.makefile() modes with a regression test

This prevents text-stream consumers from raising AttributeError when an
execnet channel file replaces sys.stdout.

Verification

  • real popen gateway reproduction with remote sys.stdout replacement
  • uv run pytest -q testing/test_channel.py
  • 279 passed, 217 skipped

Fixes #161

Implementation and review were assisted by OpenAI Codex. I reproduced the
failure and verified the final behavior and test suite locally.

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

The next major version of execnet will no longer be monkeypatching stdio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'ChannelFileWrite' object has no attribute 'encoding'

2 participants