-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strip __signature__ from server and client side metadata (#50)
Strip __signature__ from server and client side For now, pybind11 is our primary binding vehicle, and it doesn't populate signatures in a way that we can export cleanly. They are just the first line of the DocString, and that's it. Maybe Nanobind does (or will do) a better job of metadata transport. On the client side, parsing these signatures back into signature objects is hard to do without creating vulnerabilities. I think we would need to teach the server to export a JSONSchema-like thing rather than expecting the client side to parse a signature string. Inspect does not currently work with annotations in __signature__ or __text_signature__. In both cases, we don't really _need_ signatures for anything and are relying on a big-ball-of-text __doc__ to transport DocStrings anyhow. May as well tuck signatures back into the top of this. I would love to revisit this when the binding side (pybind11/nanobind) and the client side (inspect) firm up a little.
- Loading branch information
Showing
5 changed files
with
41 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters