[cdap-524] modified to be possible to use with both python 2 and 3 versions

Created according to https://issues.cask.co/browse/CDAP-524
Does it make sense to suppress only specific warnings, so that a develop can still get other meaningful warnings