Title: [3.11] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503) (GH-126572) by miss-islington · Pull Request #133148 · python/cpython · GitHub
Open Graph Title: [3.11] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503) (GH-126572) by miss-islington · Pull Request #133148 · python/cpython
X Title: [3.11] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503) (GH-126572) by miss-islington · Pull Request #133148 · python/cpython
Description: gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on exit (GH-126503) If read() in the ConnectionHandler thread raises OSError (except ConnectionError), the ConnectionHandler shuts down the entire ThreadedEchoServer, preventing further connections. It also does that for EPROTOTYPE in wrap_conn. As far as I can see, this is done to avoid the server thread getting stuck, forgotten, in its accept loop. However, since 2011 (5b95eb9) the server is used as a context manager, and its __exit__ does stop() and join(). (I'm not sure if we always used with since that commit, but currently we do.) Make sure that the context manager is used, and remove the server.stop() calls from ConnectionHandler. (cherry picked from commit c9cda16) (cherry picked from commit aee80cd) Co-authored-by: Miss Islington (bot) 31488909+miss-islington@users.noreply.github.com Co-authored-by: Petr Viktorin encukou@gmail.com #126500
Open Graph Description: gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on exit (GH-126503) If read() in the ConnectionHandler thread raises OSError (except ConnectionError), t...
X Description: gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on exit (GH-126503) If read() in the ConnectionHandler thread raises OSError (except ConnectionError...
Opengraph URL: https://github.com/python/cpython/pull/133148
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c768d482-ea38-27ac-c0fe-238c396276fb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8E4A:119971:7C7262:A6AB06:6A580C73 |
| html-safe-nonce | 6e83ca4579633467e2ca5c71ce192373fcfd9dacbe922fd18d5847a982bda6ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTRBOjExOTk3MTo3QzcyNjI6QTZBQjA2OjZBNTgwQzczIiwidmlzaXRvcl9pZCI6IjU1MDcyODYwNDI4OTg2Mjc3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0ef6f42b6c146a3bdc480aecdc0af6f0951c3c0f13abaa160e400fb000c3338e |
| hovercard-subject-tag | pull_request:2488653854 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/133148/files |
| twitter:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| og:image:alt | gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on exit (GH-126503) If read() in the ConnectionHandler thread raises OSError (except ConnectionError), t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width