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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:d7ea6440-7330-23f1-bc61-fe44dcaa5a81 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9A96:124678:EEC96C:143F028:6969F35B |
| html-safe-nonce | 67dd98ecd050ba010c00b7c52362c448e5d9a3098619ba10855405a20fc5998c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTk2OjEyNDY3ODpFRUM5NkM6MTQzRjAyODo2OTY5RjM1QiIsInZpc2l0b3JfaWQiOiI2NDM0MzI4MjQ3NzgzNzgxMjExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 119fe02d1cd2be1090e2d92146ca3d4bfc834f17833f4ae6c35f6e846ba4a6c8 |
| hovercard-subject-tag | pull_request:1097173542 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width