Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Android get_terminal_size monkey patch #2336

Merged
merged 1 commit into from Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/2336.misc.rst
@@ -0,0 +1 @@
Remove Android get_terminal_size monkey patch
10 changes: 0 additions & 10 deletions testbed/tests/testbed.py
@@ -1,4 +1,3 @@
import errno
import os
import sys
import tempfile
Expand Down Expand Up @@ -108,15 +107,6 @@ def run_tests(app, cov, args, report_coverage, run_slow):
"win32": "toga_winforms",
}.get(sys.platform)

if toga_backend == "toga_android":
# Prevent the log being cluttered with "avc: denied" messages
# (https://github.com/beeware/toga/issues/1962).
def get_terminal_size(*args, **kwargs):
error = errno.ENOTTY
raise OSError(error, os.strerror(error))

os.get_terminal_size = get_terminal_size

# Start coverage tracking.
# This needs to happen in the main thread, before the app has been created
cov = coverage.Coverage(
Expand Down