I'm the author of an open-source library (N) that provides an enhancement to a popular Python library (P). Recently, P released a new version where they changed some code that affects my library N.
I have a simple fix for N to make it compatible with the new version of P, but I want to know if there's a good way of supporting both versions of P in my library without resorting to an if-else-ing around the different versions. Going forward, I want to support both versions of library P, so just moving to the new one is not an option.