Title: `test_pyinit_function_raises_exception` doesn't work without `_testsinglephase` · Issue #156676 · python/cpython · GitHub
Open Graph Title: `test_pyinit_function_raises_exception` doesn't work without `_testsinglephase` · Issue #156676 · python/cpython
X Title: `test_pyinit_function_raises_exception` doesn't work without `_testsinglephase` · Issue #156676 · python/cpython
Description: Bug report Bug description: #Lib/test/test_import/__init__.py, it needs to be decorated with: @unittest.skipIf(_testsinglephase is None, "test requires _testsinglephase module") # and the import needs to be removed #Throws an error : ```...
Open Graph Description: Bug report Bug description: #Lib/test/test_import/__init__.py, it needs to be decorated with: @unittest.skipIf(_testsinglephase is None, "test requires _testsinglephase module") # and the import ne...
X Description: Bug report Bug description: #Lib/test/test_import/__init__.py, it needs to be decorated with: @unittest.skipIf(_testsinglephase is None, "test requires _testsinglephase module") # and the...
Opengraph URL: https://github.com/python/cpython/issues/156676
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`test_pyinit_function_raises_exception` doesn't work without `_testsinglephase`","articleBody":"# Bug report\n\n### Bug description:\n\n```python\n#Lib/test/test_import/__init__.py, it needs to be decorated with: \n\n@unittest.skipIf(_testsinglephase is None, \"test requires _testsinglephase module\")\n# and the import needs to be removed \n\n#Throws an error : \n```Lib/test/test_import/__init__.py lines 2547 to 2551\n@requires_subinterpreters\ndef test_pyinit_function_raises_exception(self):\n # gh-144601: PyInit functions that raised exceptions would cause a\n # crash when imported from a subinterpreter.\n import _testsinglephase```\n```\n\n### CPython versions tested on:\n\n\n3.13\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-156684\n* gh-156686\n* gh-156687\n* gh-156688\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/saioffl","@type":"Person","name":"saioffl"},"datePublished":"2026-08-30T17:20:01Z","url":"https://github.com/python/cpython/issues/156676"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:d4c1455b-7f5b-63ca-8116-861c064cb17b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5D4:9E1B2:2FE354C:3F5D6D2:6B0029B0 |
| html-safe-nonce | aa4192dfdb21df9d36bb2561c2c61d6738ceadde214a4821c4a59d850be74bf2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUQ0OjlFMUIyOjJGRTM1NEM6M0Y1RDZEMjo2QjAwMjlCMCIsInZpc2l0b3JfaWQiOiI2MTE0NzQ3MzUwNTg3MDI1ODQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bff07e8db06eec5acb89178584e163515fb8fc0c118dca60aeeb137b9f3f79aa |
| hovercard-subject-tag | issue:5293382312 |
| 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/156676/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f2e5a926470a0cf2e9be981fe5bf4e764ecab019f113a431a08bd1f5350c1f26/python/cpython/issues/156676 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f2e5a926470a0cf2e9be981fe5bf4e764ecab019f113a431a08bd1f5350c1f26/python/cpython/issues/156676 |
| og:image:alt | Bug report Bug description: #Lib/test/test_import/__init__.py, it needs to be decorated with: @unittest.skipIf(_testsinglephase is None, "test requires _testsinglephase module") # and the import ne... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | saioffl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width