mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 23:00:20 +00:00
raise an error if not on python 3.6
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user