diff options
author | Christian Heimes <christian@python.org> | 2021-01-12 19:52:24 +0100 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2021-03-04 11:26:20 +0100 |
commit | 2be0182d145d086306435f30ab997711bb5b3fb1 (patch) | |
tree | 5b4bcfa8bf07ebb3d6b198915c873f7bbe02f81b /defusedxml/common.py | |
parent | 06d7ab2c5c19472a8cc7d5184a264873cb8fa972 (diff) | |
download | defusedxml-git-2be0182d145d086306435f30ab997711bb5b3fb1.tar.gz |
Drop Python 2 support
Diffstat (limited to 'defusedxml/common.py')
-rw-r--r-- | defusedxml/common.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/defusedxml/common.py b/defusedxml/common.py index 5ceda1f..d286009 100644 --- a/defusedxml/common.py +++ b/defusedxml/common.py @@ -1,6 +1,6 @@ # defusedxml # -# Copyright (c) 2013 by Christian Heimes <christian@python.org> +# Copyright (c) 2013-2020 by Christian Heimes <christian@python.org> # Licensed to PSF under a Contributor Agreement. # See https://www.python.org/psf/license for licensing details. """Common constants, exceptions and helpe functions @@ -8,7 +8,7 @@ import sys import xml.parsers.expat -PY3 = sys.version_info[0] == 3 +PY3 = True # Fail early when pyexpat is not installed correctly if not hasattr(xml.parsers.expat, "ParserCreate"): @@ -26,7 +26,7 @@ class DTDForbidden(DefusedXmlException): """Document type definition is forbidden""" def __init__(self, name, sysid, pubid): - super(DTDForbidden, self).__init__() + super().__init__() self.name = name self.sysid = sysid self.pubid = pubid @@ -40,7 +40,7 @@ class EntitiesForbidden(DefusedXmlException): """Entity definition is forbidden""" def __init__(self, name, value, base, sysid, pubid, notation_name): - super(EntitiesForbidden, self).__init__() + super().__init__() self.name = name self.value = value self.base = base @@ -57,7 +57,7 @@ class ExternalReferenceForbidden(DefusedXmlException): """Resolving an external reference is forbidden""" def __init__(self, context, base, sysid, pubid): - super(ExternalReferenceForbidden, self).__init__() + super().__init__() self.context = context self.base = base self.sysid = sysid |