-
Notifications
You must be signed in to change notification settings - Fork 51
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
__all__ re-exports don't work for CramMD5ClientAuthenticator #184
Comments
I think I'm having the same issue with https://tristanlatr.github.io/wpscan_out_parse/wpscan_out_parse.parser.html#parse_results_from_file which defined in |
I think there are actually 3 issues here:
I don't know if re-exporting a name in multiple locations is something we should support: it seems confusing to just have the same class documentation at different places in the tree. Maybe one of them could be the official location and the others could link to it? That would be the preferred approach when something is moved and the old location is deprecated but still around for backwards compatibility. |
@tristanlatr |
@mthuurne Thanks |
A long-term improvement discussed in #277 was to drop the reparenting of re-exported names and instead build a separate documentation layer on top of the code model. Doing so would allow one name from the code model to be published in more than one location in the documentation. I'm still not sure whether it's a good idea to have one name published in more than one location though. For example if an exception type is documented in more than one place, it might surprise the user if catching one documented type will also catch a type documented in a different module. But perhaps that decision can be made by the developer on a case by case basis, instead of the tool deciding for them. |
Still true with latest pydoctor (https://pydocbrowser.github.io/twisted/latest/twisted.mail._cred.CramMD5ClientAuthenticator.html). |
This problem is likely due to circular imports. Probably we re hitting the re exporting of the CramMD5ClientAuthenticator class before having processed the class itself. There are several manner to tackle this problem. The more obvious thing to do would be to do all the reparenting in post processing. This would ensure that all objects are processed before moving them around. Unfortunately, for this to work the way it does now, we need to upgrade our understanding of recursive imports aliases, so all names can be resolved at the end. We could also try to reach a model representation that does not need reparenting at all. That’s much harder right now, but it would be the right thing to do. |
Turns out there is a condition preventing a name to be re-exported when it's listed in the
|
I'm working on a fix |
CramMD5ClientAuthenticator
is documented here:https://twistedmatrix.com/documents/19.10.0/api/twisted.mail._cred.CramMD5ClientAuthenticator.html
except that should be a private API.
It's re-exported in the
__all__
oftwisted.mail.imap4
andtwisted.mail.smtp
, but doesn't show up in either of those places.I'm not sure what the actual issue is here (it might be that this is kind of a nonsense thing to do?) but we should probably do something more coherent, or at least report an error.
The text was updated successfully, but these errors were encountered: