Python 3.13 deprecates optparse and getopt modules, which we have a few uses of. We should migrate this.