Open ghost opened 8 years ago
Suggested change, which appears to work for me, is to use six to check for python version; if 2, import the old error. If 3, define a new exception. Client code is suggested to check for the schemato.schemas.parselypage.HTMLParseError in either case, rather than the html_parser error..but if they do in Py2, it's no big deal. In Py3 they'd never have written dependent code, because it's already broken.
Looks like this was only removed in the 3.5 release when they merged the patch here. You can see other people have worked around this by defining a custom class like in stephenmcd/mezzanine#1414. A PR would be much appreciated.
There's a line attempting to import
HTMLParseError
here which results in schemato being unimportable in Python3:This occurs because while
six.moves
makeshtml_parser
available, the Python3 target no longer supports HTMLParseError.It appears only to be raised from one function; probably a custom exception would suffice.
It's a small change but if you're short on time I'm happy to offer a PR?