Skip to content

bpo-44359: Fix test_ftplib unhandled thread exceptions - #31069

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_ftplib_handle_error
Feb 2, 2022
Merged

bpo-44359: Fix test_ftplib unhandled thread exceptions#31069
vstinner merged 1 commit into
python:mainfrom
vstinner:test_ftplib_handle_error

Conversation

@vstinner

@vstinner vstinner commented Feb 2, 2022

Copy link
Copy Markdown
Member

test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.

https://bugs.python.org/issue44359

test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
@vstinner

vstinner commented Feb 2, 2022

Copy link
Copy Markdown
Member Author

Without this PR, ./python -m test -u all --fail-env-changed test_ftplib -v -m test_makeport always fails on the Fedora Rawhide x64-64 buildbot worker.

With this PR, this command pass and ./python -m test -u all --fail-env-changed test_ftplib -W -j10 -F also runs successfully test_ftplib 30 times (I stopped the command manually).

@vstinner
vstinner merged commit 0611eaf into python:main Feb 2, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@vstinner
vstinner deleted the test_ftplib_handle_error branch February 2, 2022 01:47
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 2, 2022
test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eaf)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Feb 2, 2022
@bedevere-bot

Copy link
Copy Markdown

GH-31070 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 2, 2022
test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eaf)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-bot

Copy link
Copy Markdown

GH-31071 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request Feb 2, 2022
test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eaf)

Co-authored-by: Victor Stinner <[email protected]>
miss-islington added a commit that referenced this pull request Feb 2, 2022
test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eaf)

Co-authored-by: Victor Stinner <[email protected]>

@orsenthil orsenthil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:-) LGTM.

@vstinner

vstinner commented Feb 2, 2022

Copy link
Copy Markdown
Member Author

:-) LGTM.

Thanks for the post merge reviw, I appreciate it, it makes me more confident :-) I wrote a long rationale in the bpo.

hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
test_ftplib now silently ignores socket errors to prevent logging
unhandled threading exceptions.
(cherry picked from commit 0611eaf)

Co-authored-by: Victor Stinner <[email protected]>
vxgmichel added a commit to xcp-ng-rpms/python3 that referenced this pull request Aug 27, 2026
The update to openssl 3.5 caused some of the tests in
test_ssl.py to fail. This patch provides minimal changes
to make the tests pass. Note that similar changes can be
found in the later versions of python (3.7 and later).

See the related fixes in the CPython repository:
* bpo-31346 (python/cpython#3058)
* bpo-33618 (python/cpython#7079)
* bpo-44359 (python/cpython#31069)

Signed-off-by: Vincent Michel <[email protected]>
vxgmichel added a commit to xcp-ng-rpms/python3 that referenced this pull request Aug 27, 2026
The update to openssl 3.5 caused some of the tests in
test_ssl.py to fail. This patch provides minimal changes
to make the tests pass. Note that similar changes can be
found in the later versions of python (3.7 and later).

See the related fixes in the CPython repository:
* bpo-31346 (python/cpython#3058)
* bpo-33618 (python/cpython#7079)
* bpo-44359 (python/cpython#31069)

Signed-off-by: Vincent Michel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants