FIX Don't destroy attribute proxies if root proxy is leaked and GC'd (#1870)

This commit is contained in:
Hood Chatham 2021-10-07 10:41:24 -07:00 committed by GitHub
parent e37997aca8
commit edc0f87e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,11 @@ substitutions:
`PyProxy` (as introduced by {pr}`1636`) before destroying the root `PyProxy`.
{pr}`1854`
- {{Fix}} Borrowed attribute `PyProxy`s are no longer destroyed when the root
`PyProxy` is garbage collected (because it was leaked). Doing so has no
benefit to nonleaky code and turns some leaky code into broken code (see
{issue}`1855` for an example). {pr}`1870`
### pyodide-build
- {{API}} By default only a minimal set of packages is built. To build all

View File

@ -31,7 +31,6 @@ Module.isPyProxy = isPyProxy;
if (globalThis.FinalizationRegistry) {
Module.finalizationRegistry = new FinalizationRegistry(([ptr, cache]) => {
pyproxy_decref_cache(cache);
try {
Module._Py_DecRef(ptr);
} catch (e) {