Title: test_ssl: `non_linux_skip_if_other_okay_error` assumes err.reason is a string · Issue #126499 · python/cpython · GitHub
Open Graph Title: test_ssl: `non_linux_skip_if_other_okay_error` assumes err.reason is a string · Issue #126499 · python/cpython
X Title: test_ssl: `non_linux_skip_if_other_okay_error` assumes err.reason is a string · Issue #126499 · python/cpython
Description: Recently, test_ssl has been failing intermittently but frequently on macOS buildbots, see for example here. Since #108315, there's some code to skip tests, which does getattr(err, "reason", "") on an arbitrary exception and expects that ...
Open Graph Description: Recently, test_ssl has been failing intermittently but frequently on macOS buildbots, see for example here. Since #108315, there's some code to skip tests, which does getattr(err, "reason", "") on ...
X Description: Recently, test_ssl has been failing intermittently but frequently on macOS buildbots, see for example here. Since #108315, there's some code to skip tests, which does getattr(err, "reason&...
Opengraph URL: https://github.com/python/cpython/issues/126499
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_ssl: `non_linux_skip_if_other_okay_error` assumes err.reason is a string","articleBody":"Recently, `test_ssl` has been failing intermittently but frequently on macOS buildbots, see for example [here](https://buildbot.python.org/#/builders/725/builds/8906).\r\n\r\nSince #108315, there's some code to *skip* tests, which does `getattr(err, \"reason\", \"\")` on an *arbitrary* exception and expects that to be a string. If `reason` is set to None, a regex search on it fails. This prevents the calling test from checking that the error is correct.\r\n\r\n```py\r\nTraceback (most recent call last):\r\n File \"/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ssl.py\", line 5085, in test_preauth_data_to_tls_server\r\n self.non_linux_skip_if_other_okay_error(wrap_error)\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^\r\n File \"/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ssl.py\", line 5032, in non_linux_skip_if_other_okay_error\r\n re.search('wrong.version.number', getattr(err, \"reason\", \"\"), re.I)):\r\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/re/__init__.py\", line 177, in search\r\n return _compile(pattern, flags).search(string)\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\r\nTypeError: expected string or bytes-like object, got 'NoneType'\r\n```\r\n\r\nI'll send a PR soon.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-126501\n* gh-126573\n* gh-126574\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/encukou","@type":"Person","name":"encukou"},"datePublished":"2024-11-06T14:11:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/126499/cpython/issues/126499"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:75e68085-86f5-2790-ef84-ba41af6a939d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B460:3BAB6B:77C1E8:9CF95F:696B1529 |
| html-safe-nonce | bf178d06adaa5907ad1aca15eed70d906e107189eff6cd10d3f93330917e20d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDYwOjNCQUI2Qjo3N0MxRTg6OUNGOTVGOjY5NkIxNTI5IiwidmlzaXRvcl9pZCI6Ijc4MjgzMDA4NDQ4MDM3NTczNTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 03aec13c9f3770c056d851b1a7879703715632fefbd8a052cf38011fc6c3f419 |
| hovercard-subject-tag | issue:2638206992 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/126499/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6588922229507024381d0b2cec12fd19f0b059c8157865a06e8d8c3684ec70a1/python/cpython/issues/126499 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6588922229507024381d0b2cec12fd19f0b059c8157865a06e8d8c3684ec70a1/python/cpython/issues/126499 |
| og:image:alt | Recently, test_ssl has been failing intermittently but frequently on macOS buildbots, see for example here. Since #108315, there's some code to skip tests, which does getattr(err, "reason", "") on ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | encukou |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width