Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-116622: Android logging fixes#122698

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
freakboy3742 merged 8 commits intopython:mainfrommhsmith:android-log-fixes
Aug 6, 2024

Conversation

mhsmith
Copy link
Member

@mhsmithmhsmith commentedAug 5, 2024
edited
Loading

This PR fixes several issues with Android's redirection of stdout and stderr to the Logcat, which was added in#118063:

  • The buffering behavior of TextIOWrapper was changed in#119507, which broke the technique we were previously using to stay within Logcat's line length limit. Since this behavior is not part of TextIOWrapper's public API, it's safer to bypass it completely and do the buffering ourselves.

  • When running in--verbose3 mode, I noticed that failure logs of large test modules liketest_pathlib were truncated because they were being written faster than the test script could consume them. Fixed by adding a rate limit using the token bucket algorithm.

  • The Android stdout and stderr tests themselves failed in--verbose3 mode because stdout and stderr were captured by aStringIO. Fixed by detecting this mode and using some temporary streams with the same properties.

@mhsmithmhsmith marked this pull request as draftAugust 5, 2024 18:39
@mhsmithmhsmith marked this pull request as ready for reviewAugust 5, 2024 22:16
Copy link
Contributor

@freakboy3742freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

These changes all make sense to me; but there's a hypothesis test that is currently failing. I want to understand what's going on there before I formally approve/merge.

Copy link
Contributor

@freakboy3742freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks like the hypothesis failure is due to#122686, so I guess that makes this good to go!

@freakboy3742freakboy3742 merged commitb0c48b8 intopython:mainAug 6, 2024
34 checks passed
@miss-islington-app
Copy link

Thanks@mhsmith for the PR, and@freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestAug 6, 2024
Modifies the handling of stdout/stderr redirection on Android to accomodatethe rate and buffer size limits imposed by Android's logging infrastructure.(cherry picked from commitb0c48b8)Co-authored-by: Malcolm Smith <smith@chaquo.com>
@bedevere-app
Copy link

GH-122719 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelAug 6, 2024
brandtbucher pushed a commit to brandtbucher/cpython that referenced this pull requestAug 7, 2024
Modifies the handling of stdout/stderr redirection on Android to accomodate the rate and buffer size limits imposed by Android's logging infrastructure.
@hugovk
Copy link
Member

Hello! For next time, please could you update your blurb CLI? Thanks!

https://discuss.python.org/t/new-blurb-1-2-please-upgrade/59159

mhsmith reacted with thumbs up emoji

freakboy3742 pushed a commit that referenced this pull requestAug 16, 2024
gh-116622: Android logging fixes (GH-122698)Modifies the handling of stdout/stderr redirection on Android to accomodatethe rate and buffer size limits imposed by Android's logging infrastructure.(cherry picked from commitb0c48b8)Co-authored-by: Malcolm Smith <smith@chaquo.com>
blhsing pushed a commit to blhsing/cpython that referenced this pull requestAug 22, 2024
Modifies the handling of stdout/stderr redirection on Android to accomodate the rate and buffer size limits imposed by Android's logging infrastructure.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@freakboy3742freakboy3742freakboy3742 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mhsmith@hugovk@freakboy3742

[8]ページ先頭

©2009-2025 Movatter.jp