-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: catch recursion in Alias.resolved #115
Conversation
Not agaaaaaaaaaaaaaaaaaaain 😂 For now I'll continue to apply bandages on this poor project 😢 Thanks for the report and PR! Catching recursion errors is like the absolute last resort haha. I read SWIG wrapper + type stubs, I understand compiled module? griffe/src/griffe/agents/inspector.py Lines 126 to 127 in 25060f6
Maybe a similar situation here. |
yep. I changed this PR to an attribute check, and that also fixes
yep, compiled module.
yeah I think so ( |
Closing in favor of 9a2a711 🙂 |
wow 😮 ... special casing it huh? don't think it's gonna happen again? |
It will probably happen again, but I want to improve the alias resolution mechanism, and maybe provide a way for registering cycles in this new "cyclic relationships" map, so that project suffering from it can fix it themselves. |
hey @pawamoy
I'm sure this is probably your least favorite bug at this point 😂 ... but I ran into an Alias resolution recursion error, similar to #83
Full traceback:
In this case, it does appear to be a legitimate Cyclic Alias... that is
self._target._target is self
.For what it's worth, the class I was trying to document with mkdocstrings is from pymmcore (
pip install pymmcore
)... and that class is a SWIG wrapper with a
.pyi
type stub providing the signatures and docstring. And the cyclic aliases look like:I opened this as a PR rather than an issue, since this does fix the docs building (the page looks exactly how I'd expect it to)... but I'm not sure what the actual best fix is. Feel free to close or suggest a better approach here for me to implement