The codebase currently use the lru_cache decorator in the NodeVisitor and ABIRegistry classes over methods. The flake8-bugbear linter reported a B019 warning, indicating potential memory leaks in class methods. The lru_cache decorator retain instance references, impeding garbage collection and potentially leading to memory-related issues.
Related to Issue #218
Closes #218
How was it fixed?
We don't have to replace lru_cache with something else for solve linter warning. This problem can be solved in the following way: we stopped using decorators directly over methods. Instead we apply the decorator function when initializing a class instance.
Todo:
[x] Clean up commit history
[ ] Add or update documentation related to these changes
What was wrong?
The codebase currently use the
lru_cache
decorator in theNodeVisitor
andABIRegistry
classes over methods. Theflake8-bugbear
linter reported aB019
warning, indicating potential memory leaks in class methods. Thelru_cache
decorator retain instance references, impeding garbage collection and potentially leading to memory-related issues.Related to Issue #218 Closes #218
How was it fixed?
We don't have to replace
lru_cache
with something else for solve linter warning. This problem can be solved in the following way: we stopped using decorators directly over methods. Instead we apply the decorator function when initializing a class instance.Todo:
[x] Clean up commit history
[ ] Add or update documentation related to these changes
[x] Add entry to the release notes
Cute Animal Picture