Title: Refleak when some "internal modules" are imported multiple times. · Issue #107789 · python/cpython · GitHub
Open Graph Title: Refleak when some "internal modules" are imported multiple times. · Issue #107789 · python/cpython
X Title: Refleak when some "internal modules" are imported multiple times. · Issue #107789 · python/cpython
Description: Originally taken from #107577. import sys import importlib def foo(): name = "_socket" importlib.import_module(name) sys.modules.pop(name) for _ in range(4): foo() ./python.exe -X showrefcount example.py [1025 refs, 653 blocks] Same with...
Open Graph Description: Originally taken from #107577. import sys import importlib def foo(): name = "_socket" importlib.import_module(name) sys.modules.pop(name) for _ in range(4): foo() ./python.exe -X showrefcount exam...
X Description: Originally taken from #107577. import sys import importlib def foo(): name = "_socket" importlib.import_module(name) sys.modules.pop(name) for _ in range(4): foo() ./python.exe -X showref...
Opengraph URL: https://github.com/python/cpython/issues/107789
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Refleak when some \"internal modules\" are imported multiple times.","articleBody":"Originally taken from #107577.\n```python\nimport sys\nimport importlib\n\ndef foo():\n name = \"_socket\"\n importlib.import_module(name)\n sys.modules.pop(name)\n\n\nfor _ in range(4):\n foo()\n\n./python.exe -X showrefcount example.py\n[1025 refs, 653 blocks]\n```\nSame with `_decimal`.\n```[tasklist]\n### Tasks\n- [ ] https://github.com/python/cpython/pull/108241\n```\n","author":{"url":"https://github.com/Eclips4","@type":"Person","name":"Eclips4"},"datePublished":"2023-08-08T20:16:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/107789/cpython/issues/107789"}
| 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:c566dccb-2a68-2a35-2fda-66a633dc24aa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEBE:9124A:132D614:18ED151:696B1531 |
| html-safe-nonce | dc54ee6e4d12aa781022d77df19f67af640532d1f10ebf4e606df8a544ce6fb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUJFOjkxMjRBOjEzMkQ2MTQ6MThFRDE1MTo2OTZCMTUzMSIsInZpc2l0b3JfaWQiOiIzMTM1MzkxNTk2MDM1MTE4Mzg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 850d7fc21842bbed8a8f435d6f65b00b7911495d6698e9612b28b14bb6047479 |
| hovercard-subject-tag | issue:1842027823 |
| 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/107789/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76760039025e81f91975ee7e5c6c367308b01a376619ecef7bf85cf50d40fbdb/python/cpython/issues/107789 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76760039025e81f91975ee7e5c6c367308b01a376619ecef7bf85cf50d40fbdb/python/cpython/issues/107789 |
| og:image:alt | Originally taken from #107577. import sys import importlib def foo(): name = "_socket" importlib.import_module(name) sys.modules.pop(name) for _ in range(4): foo() ./python.exe -X showrefcount exam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Eclips4 |
| 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