Even though the article sounds like it's written by educated person, it puzzles me that the author:
> Installing packages with APT is not atomic: APTs updates files in-place one by one. Because we start Python processes many times per second, if one started during a deployment, it could import a mix of the old and new code. This regularly lead to puzzling bugs
Don't you stop all your services in preinstall and start them again in postinstall? Or, if you're packaging your python libs in deb pkgs, just stop the services before upgrading the system and start them again once you're done.