Title: bpo-41631: Check that importing _ast returns the right module by encukou · Pull Request #21973 · python/cpython · GitHub
Open Graph Title: bpo-41631: Check that importing _ast returns the right module by encukou · Pull Request #21973 · python/cpython
X Title: bpo-41631: Check that importing _ast returns the right module by encukou · Pull Request #21973 · python/cpython
Description: Hopefully #21961 will be OK, but if not: here is a relatively minimal fix for bpo-41631, which basically makes compiling to/from AST fail gracefully (with a proper exception rather than a NULL without exception) if the _ast module has been tampered with. For example, it looks like Mercurial's lazy-loading scheme replaces _astwith a proxy object; this will make AST unusable. The second commit deals with a hack in pegen's tests – please review the commits separately, and see comments. https://bugs.python.org/issue41631
Open Graph Description: Hopefully #21961 will be OK, but if not: here is a relatively minimal fix for bpo-41631, which basically makes compiling to/from AST fail gracefully (with a proper exception rather than a NULL with...
X Description: Hopefully #21961 will be OK, but if not: here is a relatively minimal fix for bpo-41631, which basically makes compiling to/from AST fail gracefully (with a proper exception rather than a NULL with...
Opengraph URL: https://github.com/python/cpython/pull/21973
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bd7cb358-c652-b4fd-806e-e08353f85c79 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A532:87739:4A3A93:68F49C:696A16ED |
| html-safe-nonce | 04adbce5e511c74a49d1c483df20b63e99b6027aa15a80ebd82eb772cb5a0d3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTMyOjg3NzM5OjRBM0E5Mzo2OEY0OUM6Njk2QTE2RUQiLCJ2aXNpdG9yX2lkIjoiMTgxNzcyMDIwMTEzMDE1MzcwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d69529edc1e977c414a07fdb4348edcd5a95bdcdd35803dcabc69463a79ace04 |
| hovercard-subject-tag | pull_request:474360785 |
| 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/21973/files |
| twitter:image | https://avatars.githubusercontent.com/u/302922?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/302922?s=400&v=4 |
| og:image:alt | Hopefully #21961 will be OK, but if not: here is a relatively minimal fix for bpo-41631, which basically makes compiling to/from AST fail gracefully (with a proper exception rather than a NULL with... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 34a52bd10bd674f68e5c1b6b74413b79bf2ca20c551055ace3f7cdd112803923 |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e8bd37502700f365b18a4d39acf7cb7947e11b1a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width