diff --git a/html5lib/_inputstream.py b/html5lib/_inputstream.py
index 79f2331e..c60d1a47 100644
--- a/html5lib/_inputstream.py
+++ b/html5lib/_inputstream.py
@@ -9,7 +9,7 @@
import webencodings
from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
-from .constants import ReparseException
+from .constants import _ReparseException
from . import _utils
from io import StringIO
@@ -530,7 +530,7 @@ def changeEncoding(self, newEncoding):
self.rawStream.seek(0)
self.charEncoding = (newEncoding, "certain")
self.reset()
- raise ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))
+ raise _ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))
def detectBOM(self):
"""Attempts to detect at BOM at the start of the stream. If
diff --git a/html5lib/constants.py b/html5lib/constants.py
index c0db14f1..1ff80419 100644
--- a/html5lib/constants.py
+++ b/html5lib/constants.py
@@ -2943,5 +2943,5 @@ class DataLossWarning(UserWarning):
pass
-class ReparseException(Exception):
+class _ReparseException(Exception):
pass
diff --git a/html5lib/html5parser.py b/html5lib/html5parser.py
index dd8ba6f7..75765924 100644
--- a/html5lib/html5parser.py
+++ b/html5lib/html5parser.py
@@ -20,7 +20,7 @@
adjustForeignAttributes as adjustForeignAttributesMap,
adjustMathMLAttributes, adjustSVGAttributes,
E,
- ReparseException
+ _ReparseException
)
@@ -83,7 +83,7 @@ def _parse(self, stream, innerHTML=False, container="div", scripting=False, **kw
try:
self.mainLoop()
- except ReparseException:
+ except _ReparseException:
self.reset()
self.mainLoop()