-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-109845: Make test_ftplib more stable under load #109912
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
Conversation
recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts.
@@ -32,7 +32,7 @@ | |||
DEFAULT_ENCODING = 'utf-8' | |||
# the dummy data returned by server over the data channel when | |||
# RETR, LIST, NLST, MLSD commands are issued | |||
RETR_DATA = 'abcde12345\r\n' * 1000 + 'non-ascii char \xAE\r\n' | |||
RETR_DATA = 'abcde\xB9\xB2\xB3\xA4\xA6\r\n' * 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes the bug easier reproducible.
I confirm that the PR fix the issue. I can easily reproduce the issue with this script in a few seconds: #109845 (comment) With this PR, I can no longer reproduce the issue:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice fix.
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…9912) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts. (cherry picked from commit 2ef2fff) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-109919 is a backport of this pull request to the 3.12 branch. |
…9912) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts. (cherry picked from commit 2ef2fff) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-109920 is a backport of this pull request to the 3.11 branch. |
…GH-109920) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts. (cherry picked from commit 2ef2fff) Co-authored-by: Serhiy Storchaka <[email protected]>
|
|
|
|
Fixed by PR #109928. |
…9912) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts.
…#109919) gh-109845: Make test_ftplib more stable under load (GH-109912) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts. (cherry picked from commit 2ef2fff) Co-authored-by: Serhiy Storchaka <[email protected]>
…9912) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts.
recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts.