See #42 (comment) by @jab :
By the way, I quickly searched through this repo and I believe you can upgrade to the latest bidict release without breaking any of your call sites. [1]
Besides the performance improvements I mentioned, there have also been several bugfixes since the version you imported from 2015. Details can be found in https://bidict.readthedocs.io/changelog.html.
[1] It looks like .inv is the only bidict API you're using. That API has been stable since the very first commit almost 10 years ago, and won't be going anywhere. That said, if you hit any expected issues, please don't hesitate to let me know, and I'll be happy to try to help.
See #42 (comment) by @jab :