This is bug reported to pypgsql's bug system but that has never bean merged to a pypgsql release, so Gentoo need to apply the patch. Original bug URL : http://sourceforge.net/tracker/index.php?func=detail&aid=1224272&group_id=16528&atid=116528
Created attachment 82294 [details, diff] Debian's provided patch
Created attachment 82295 [details] Updated ebuild
That bug has been fixed in pypgsql-2.5. Bumped to 2.5.1 today and keeping this bug open as a reminder to mark pypgsql-2.5.1 stable in 30 days to fix this bug in stable as well.