Part of lp.bugs.externalbugtracker
There is urllib.urlencode that does a similar job, but you can't specify the safe characters. Roundup likes URLs with @s in them, and they work just fine unquoted.