raise an error if not on python 3.6

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-02-28 07:53:18 -05:00
parent 2b22c2f55d
commit ede6f9e1d3
+8
View File
@@ -1,3 +1,4 @@
import sys
import asyncio
from urllib.parse import urlparse, urlunparse
from concurrent.futures._base import TimeoutError
@@ -37,6 +38,13 @@ _Search = Result
_Links = Set[str]
_Attrs = MutableMapping
# Sanity checking.
try:
assert sys.version_info.major == 3
assert sys.version_info.minor > 5
except AssertionError:
raise RuntimeError('Requests-HTML requires Python 3.6+!')
class BaseParser:
"""A basic HTML/Element Parser, for Humans.