You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your change request related to a problem? Please describe.
Extensions parse docstrings and modify the cached parsed attribute to append/remove sections. But now parsers fetch annotations from inherited members. And both inherited members and resolved bases are cached... they will be cached too early. Even if we stop caching them, parsers won't be able to fetch inherited members if they run before the whole package is loaded.
Describe the solution you'd like
First, and most urgent: stop caching resolved bases and inherited members.
Then, either:
modify hooks so that "instance" hooks always run once the whole package is loaded (still requires that other necessary packages are pre-loaded before that)
go back to "uncache parsed docstrings", and force extensions to modify the value attribute (with parsing/splitting + re-dumping/insertion/deletion). Docstring styles must anyway be set correctly before attempting any splitting/parsing, caching or not doesn't change that fact.
Running "instance" hooks later would be a breaking change as we wouldn't be able to pass AST nodes. Uncaching parsed would be a breaking change too, but at least we can have a deprecation period and it might affect less extensions.
Is your change request related to a problem? Please describe.
Extensions parse docstrings and modify the cached
parsed
attribute to append/remove sections. But now parsers fetch annotations from inherited members. And both inherited members and resolved bases are cached... they will be cached too early. Even if we stop caching them, parsers won't be able to fetch inherited members if they run before the whole package is loaded.Describe the solution you'd like
First, and most urgent: stop caching resolved bases and inherited members.
Then, either:
value
attribute (with parsing/splitting + re-dumping/insertion/deletion). Docstring styles must anyway be set correctly before attempting any splitting/parsing, caching or not doesn't change that fact.Describe alternatives you've considered
/
Additional context
#340
The text was updated successfully, but these errors were encountered: