In that case wouldn't it be be better to import the one from the stdlib for any pythonn version >= 3.3 ? I think it is. ANyway rest of the patch looks good. Will test in the afternoon. Thanks!