Feature/windows (#441)
* new: dev: windows only package * chg: dev: catch ModuleNotFoundError on python3.6+ * chg: dev: use general exception
This commit is contained in:
parent
11b869842f
commit
9fce289d6f
12
buku
12
buku
@ -39,15 +39,17 @@ import threading
|
|||||||
import time
|
import time
|
||||||
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
||||||
import webbrowser
|
import webbrowser
|
||||||
try:
|
|
||||||
import readline
|
|
||||||
except ImportError:
|
|
||||||
import pyreadline as readline # type: ignore
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
import certifi
|
import certifi
|
||||||
import urllib3
|
import urllib3
|
||||||
from urllib3.exceptions import LocationParseError
|
from urllib3.exceptions import LocationParseError
|
||||||
from urllib3.util import parse_url, make_headers
|
from urllib3.util import parse_url, make_headers
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
# note catch ModuleNotFoundError instead Exception
|
||||||
|
# when python3.5 not supported
|
||||||
|
try:
|
||||||
|
import readline
|
||||||
|
except Exception:
|
||||||
|
import pyreadline as readline # type: ignore
|
||||||
try:
|
try:
|
||||||
from mypy_extensions import TypedDict
|
from mypy_extensions import TypedDict
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -5,3 +5,4 @@ cryptography>=1.2.3
|
|||||||
html5lib>=1.0.1
|
html5lib>=1.0.1
|
||||||
setuptools
|
setuptools
|
||||||
urllib3>=1.23
|
urllib3>=1.23
|
||||||
|
pyreadline; sys_platform == 'windows'
|
||||||
|
Loading…
Reference in New Issue
Block a user