Title: Test suite expects _stat extension to be available · Issue #108638 · python/cpython · GitHub
Open Graph Title: Test suite expects _stat extension to be available · Issue #108638 · python/cpython
X Title: Test suite expects _stat extension to be available · Issue #108638 · python/cpython
Description: Bug report Checklist I am confident this is a bug in CPython, not a bug in a third-party project I have searched the CPython issue tracker, and am confident this bug has not been reported before CPython versions tested on: CPython main b...
Open Graph Description: Bug report Checklist I am confident this is a bug in CPython, not a bug in a third-party project I have searched the CPython issue tracker, and am confident this bug has not been reported before CP...
X Description: Bug report Checklist I am confident this is a bug in CPython, not a bug in a third-party project I have searched the CPython issue tracker, and am confident this bug has not been reported before CP...
Opengraph URL: https://github.com/python/cpython/issues/108638
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test suite expects _stat extension to be available","articleBody":"# Bug report\r\n\r\n### Checklist\r\n\r\n- [X] I am confident this is a bug in CPython, not a bug in a third-party project\r\n- [X] I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),\r\nand am confident this bug has not been reported before\r\n\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n### Output from running 'python -VV' on the command line:\r\n\r\n_No response_\r\n\r\n### A clear and concise description of the bug:\r\n\r\nThe ``_stat`` extension is specific to CPython. For example, PyPy has no ``_stat`` module.\r\n\r\nBut the Python test suite expects the ``_stat`` module to be available: test_inspect, test_pydoc, and test_tarfile fail with it's missing.\r\n\r\nDisable compilation of the ``_stat`` extension to reproduce the issue:\r\n\r\n```diff\r\ndiff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in\r\nindex 8ef0f203a8..a1f6b8cc85 100644\r\n--- a/Modules/Setup.bootstrap.in\r\n+++ b/Modules/Setup.bootstrap.in\r\n@@ -29,7 +29,7 @@ _abc _abc.c\r\n _functools _functoolsmodule.c\r\n _locale _localemodule.c\r\n _operator _operator.c\r\n-_stat _stat.c\r\n+#_stat _stat.c\r\n _symtable symtablemodule.c\r\n \r\n # for systems without $HOME env, used by site._getuserbase()\r\n```\r\n\r\nExample:\r\n\r\n```\r\n$ ./python -c 'import _stat'\r\nModuleNotFoundError: No module named '_stat'\r\n```\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-108639\r\n* gh-108689\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-08-29T14:31:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/108638/cpython/issues/108638"}
| 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:447ff5ef-f9f1-17ac-b7bd-58d943c1fd79 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDC8:10F1EB:3C34B:55570:696A0BC6 |
| html-safe-nonce | 95e22b47a26ed288c5fce308e81ab6f83f475d663a38ac155794dedb1253ba74 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREM4OjEwRjFFQjozQzM0Qjo1NTU3MDo2OTZBMEJDNiIsInZpc2l0b3JfaWQiOiI4MDM4MDgyOTA0NTU5NTg2MjQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 985116e038a3ace3a4e25355fcf349bc0e7adad3f8fd6372437ccba570faff53 |
| hovercard-subject-tag | issue:1871810153 |
| 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/108638/issue_layout |
| twitter:image | https://opengraph.githubassets.com/969e93e0cd598d73dc2da5c21d063b540a317214eb9d912910625d877e5982eb/python/cpython/issues/108638 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/969e93e0cd598d73dc2da5c21d063b540a317214eb9d912910625d877e5982eb/python/cpython/issues/108638 |
| og:image:alt | Bug report Checklist I am confident this is a bug in CPython, not a bug in a third-party project I have searched the CPython issue tracker, and am confident this bug has not been reported before CP... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| 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 | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width