Post #2563359
2024-08-27 16:39 UTC
@nobody@mastodon.acm.org @stargirl@hachyderm.io Sure. Those hints would be populated from a mapping either maintained via Cheeseshop or via local choices. Either way, there's politics going on; each individual mapping is a policy choice. In terms of Zooko's triangle, this would be the "centralized" option, which means that the import keyword would now functionally depend on whatever build/runtime configuration you've imagined.
Not that this is a bad thing! Check out PEP 302 for the hooks you'd need to prototype an actual implementation of your idea. Allen Short explained how to use PEP 302 here https://web.archive.org/web/20180411011138/http://washort.twistedmatrix.com/2011/01/introducing-exocet.html and I used it to add hot-reload plugin functionality to a Python Minecraft server.
Replies (1)
-
@nobody@mastodon.acm.org 2024-08-27 16:41
@corbin@defcon.social @stargirl@hachyderm.io Thanks I'll read that. I've no idea what Cheeshop is though, but if we had this multi-tenancy support I'd just go and implement a setup hook for Nixpkgs to generate these hints. I wouldn't really care for much beyond that