Title: heapq doctests fail with global lazy imports · Issue #161555 · python/cpython · GitHub
Open Graph Title: heapq doctests fail with global lazy imports · Issue #161555 · python/cpython
X Title: heapq doctests fail with global lazy imports · Issue #161555 · python/cpython
Description: the heapq test loads a fresh pure python module for its doctests. doctest infers globals from the restored module entry instead of the fresh module. with global lazy imports, merge is missing from the doctest namespace and both examples ...
Open Graph Description: the heapq test loads a fresh pure python module for its doctests. doctest infers globals from the restored module entry instead of the fresh module. with global lazy imports, merge is missing from ...
X Description: the heapq test loads a fresh pure python module for its doctests. doctest infers globals from the restored module entry instead of the fresh module. with global lazy imports, merge is missing from ...
Opengraph URL: https://github.com/python/cpython/issues/161555
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"heapq doctests fail with global lazy imports","articleBody":"the heapq test loads a fresh pure python module for its doctests. doctest infers globals from the restored module entry instead of the fresh module. with global lazy imports, merge is missing from the doctest namespace and both examples fail with nameerror.\n\npassing the fresh module globals to doctest fixes the namespace. the test can then run in global lazy imports ci.\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-161556\n* gh-161598\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/tonghuaroot","@type":"Person","name":"tonghuaroot"},"datePublished":"2026-11-07T13:56:05Z","url":"https://github.com/python/cpython/issues/161555"}
| 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:aa4143d4-63a5-5ac7-b124-8894be21064e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7FC:1F5C:54C9C4:713456:6B02036E |
| html-safe-nonce | 6687c37b7641184775f8a96c58d68d4c34098e5cd0a0f658c784b73bf9c675e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0ZDOjFGNUM6NTRDOUM0OjcxMzQ1Njo2QjAyMDM2RSIsInZpc2l0b3JfaWQiOiI3NDYwNDc2MjE2MzUzNjIwODQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 14f802dc5e73e660f0a1011c7d2c4a70d9209e00636ce9066aaf8acd9e95be7c |
| hovercard-subject-tag | issue:6259843991 |
| 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/161555/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c040243dd2cd68ca2ffbb09e5d95d1a1a05bb294f8c810b8046a7637a72ca9e3/python/cpython/issues/161555 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c040243dd2cd68ca2ffbb09e5d95d1a1a05bb294f8c810b8046a7637a72ca9e3/python/cpython/issues/161555 |
| og:image:alt | the heapq test loads a fresh pure python module for its doctests. doctest infers globals from the restored module entry instead of the fresh module. with global lazy imports, merge is missing from ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tonghuaroot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width