Fix re.Pattern type check for Python<3.7
Fix re.Pattern type check for Python<3.7

apdavison/sumatra,apdavison/sumatra,open-research/sumatra,open-research/sumatra,apdavison/sumatra,apdavison/sumatra,open-research/sumatra,apdavison/sumatra,open-research/sumatra,open-research/sumatra