In the Gen3 butler, the tracts and patches defined by a SkyMap will be loaded into a database, and that will make it much more important to recognize when the same SkyMap has already been loaded. While SkyMap objects already support equality comparison, it'd be nice if they could also produce a stable hash that can be used to uniquely label them.
Since that basically amounts to being able to hash the SkyMap's configuration, I think it makes the most sense to actually add this hashing support directly to pex_config. Being able to compare hashes to check for config equality seems like it'd be generally useful to.
I'm currently planning to do this with hashlib.sha1, rather than just the hash builtin, because I want something that's guaranteed to be stable between Python versions.
Note that these in-memory hashes will not be equivalent to hashes of the files in which these objects are stored.