I submitted a PR to fix the above issues:
https://github.com/p2pool/p2pool/pull/313/filesThe fix is working for me and my node is no longer experiencing connecting issues with peers.
This happens every time we hardfork. Perhaps we should implement a better method to do the upgrade?