From 50ec3ae6caa8dc5ff4c971de78cb2ad84410fd6c Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Sun, 24 Feb 2019 20:46:32 +0100 Subject: [PATCH] forms: replace re._pattern_type with re.Pattern Python 3.7 removed re._pattern_type and replaced it with re.Pattern. --- nyaa/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nyaa/forms.py b/nyaa/forms.py index d9e2620..7d349c1 100644 --- a/nyaa/forms.py +++ b/nyaa/forms.py @@ -78,7 +78,7 @@ def register_email_blacklist_validator(form, field): validation_exception = StopValidation('Blacklisted email provider') for item in email_blacklist: - if isinstance(item, re._pattern_type): + if isinstance(item, re.Pattern): if item.search(email): raise validation_exception elif isinstance(item, str):