From 891fa590096ef1d1d9dbef013ebc9b9b34986aee Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 21 May 2020 20:52:48 +0200 Subject: [PATCH] Use backwards-compatible super() --- spacy/errors.py | 2 +- spacy/lang/pl/lemmatizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/errors.py b/spacy/errors.py index 0750ab616..aca94d64e 100644 --- a/spacy/errors.py +++ b/spacy/errors.py @@ -7,7 +7,7 @@ def add_codes(err_cls): class ErrorsWithCodes(err_cls): def __getattribute__(self, code): - msg = super().__getattribute__(code) + msg = super(ErrorsWithCodes, self).__getattribute__(code) if code.startswith("__"): # python system attributes like __class__ return msg else: diff --git a/spacy/lang/pl/lemmatizer.py b/spacy/lang/pl/lemmatizer.py index cd555b9c2..d0d843b2a 100644 --- a/spacy/lang/pl/lemmatizer.py +++ b/spacy/lang/pl/lemmatizer.py @@ -13,7 +13,7 @@ class PolishLemmatizer(Lemmatizer): # lemmatization for nouns def __init__(self, lookups, *args, **kwargs): # this lemmatizer is lookup based, so it does not require an index, exceptionlist, or rules - super().__init__(lookups) + super(PolishLemmatizer, self).__init__(lookups) self.lemma_lookups = {} for tag in [ "ADJ",