Title: gh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache by wjakob · Pull Request #98591 · python/cpython · GitHub
Open Graph Title: gh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache by wjakob · Pull Request #98591 · python/cpython
X Title: gh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache by wjakob · Pull Request #98591 · python/cpython
Description: The typing module internally uses LRU caches to memoize the result of type-related computations. These LRU caches have the potential to introduce difficult-to-find reference leaks spanning multiple extension modules. Suppose that a binary extension module a leaks a reference to a type a.A with typed function signatures. The leaked type a.A will induce a secondary refleak of the typing LRU caches, which will at this point cause tertiary leaks in entirely unrelated extension modules. In this way, a benign refleak in any extension can cause difficult-to-debug leaks everywhere else. This commit fixes this by removing the direct reference from a.A to typing implementation details. Issue: gh-98253
Open Graph Description: The typing module internally uses LRU caches to memoize the result of type-related computations. These LRU caches have the potential to introduce difficult-to-find reference leaks spanning multiple...
X Description: The typing module internally uses LRU caches to memoize the result of type-related computations. These LRU caches have the potential to introduce difficult-to-find reference leaks spanning multiple...
Opengraph URL: https://github.com/python/cpython/pull/98591
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f5884c24-65b6-b8f2-25e0-705e8ec98d7d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B086:39C817:788B7A:A82827:696A299C |
| html-safe-nonce | fae17b1fed591feee12c78ddb9255c03dce4ef53aff9955747c905849b82523f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDg2OjM5QzgxNzo3ODhCN0E6QTgyODI3OjY5NkEyOTlDIiwidmlzaXRvcl9pZCI6IjIyODU5NjEwNDA0MzMzOTIwMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 59aff936582cd720bbb18319c7de663e164c8060cb70b153e83999c8b7d68444 |
| hovercard-subject-tag | pull_request:1097173542 |
| 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/98591/files |
| twitter:image | https://avatars.githubusercontent.com/u/1203629?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1203629?s=400&v=4 |
| og:image:alt | The typing module internally uses LRU caches to memoize the result of type-related computations. These LRU caches have the potential to introduce difficult-to-find reference leaks spanning multiple... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569 |
| 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 | f472b8e6c7b3fdd5d0354972a3f4c516289bf0be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width