Commit a9e2a3a0 authored by Nicolas Gelot's avatar Nicolas Gelot

Cleanup and update dependencies

parent 1478a0e8
...@@ -4,9 +4,7 @@ RUN apk add \ ...@@ -4,9 +4,7 @@ RUN apk add \
git \ git \
build-base \ build-base \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev
libffi-dev \
openssl-dev
# Only to use the docker cache and optimize the build time # Only to use the docker cache and optimize the build time
WORKDIR /src WORKDIR /src
...@@ -24,7 +22,6 @@ LABEL description="A privacy-respecting, hackable metasearch engine." ...@@ -24,7 +22,6 @@ LABEL description="A privacy-respecting, hackable metasearch engine."
RUN apk add \ RUN apk add \
ca-certificates \ ca-certificates \
libxslt \ libxslt \
openssl \
&& pip install coverage && pip install coverage
COPY --from=builder /install/ /usr/local/ COPY --from=builder /install/ /usr/local/
......
redis==3.2.1
certifi==2017.11.5
flask==1.0.2 flask==1.0.2
flask-babel==0.11.2 flask-babel==0.11.2
lxml==4.2.3 lxml==4.3.3
idna==2.7 pygments==2.3.1
pygments==2.1.3 python-dateutil==2.8.0
pyopenssl==18.0.0 pyyaml==5.1
python-dateutil==2.7.3 requests[socks]==2.21.0
pyyaml==3.13 redis==3.2.1
requests[socks]==2.19.1
...@@ -15,18 +15,11 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. ...@@ -15,18 +15,11 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
(C) 2013- by Adam Tauber, <asciimoo@gmail.com> (C) 2013- by Adam Tauber, <asciimoo@gmail.com>
''' '''
import certifi
import logging import logging
from os import environ from os import environ
from os.path import realpath, dirname, join, abspath, isfile from os.path import realpath, dirname, join, abspath, isfile
from io import open from io import open
from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION from yaml import load
try:
from yaml import load
except ImportError:
from sys import exit, stderr
stderr.write('[E] install pyyaml\n')
exit(2)
searx_dir = abspath(dirname(__file__)) searx_dir = abspath(dirname(__file__))
engine_dir = dirname(realpath(__file__)) engine_dir = dirname(realpath(__file__))
...@@ -73,12 +66,6 @@ logging.basicConfig(level=getattr(logging, searx_loglevel)) ...@@ -73,12 +66,6 @@ logging.basicConfig(level=getattr(logging, searx_loglevel))
logger = logging.getLogger('searx') logger = logging.getLogger('searx')
logger.debug('read configuration from %s', settings_path) logger.debug('read configuration from %s', settings_path)
# Workaround for openssl versions <1.0.2
# https://github.com/certifi/python-certifi/issues/26
if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
if hasattr(certifi, 'old_where'):
environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
logger.info('Initialisation done') logger.info('Initialisation done')
......
...@@ -37,16 +37,11 @@ from searx import logger ...@@ -37,16 +37,11 @@ from searx import logger
logger = logger.getChild('webapp') logger = logger.getChild('webapp')
try: from pygments import highlight
from pygments import highlight from pygments.lexers import get_lexer_by_name
from pygments.lexers import get_lexer_by_name from pygments.util import ClassNotFound
from pygments.util import ClassNotFound from pygments.formatters import HtmlFormatter
from pygments.formatters import HtmlFormatter
except ImportError:
logger.critical("cannot import dependency: pygments")
from sys import exit
exit(1)
from html import escape from html import escape
from datetime import datetime, timedelta from datetime import datetime, timedelta
from werkzeug.contrib.fixers import ProxyFix from werkzeug.contrib.fixers import ProxyFix
...@@ -80,14 +75,6 @@ from searx.url_utils import urlencode, urlparse, urljoin ...@@ -80,14 +75,6 @@ from searx.url_utils import urlencode, urlparse, urljoin
from searx.utils import new_hmac from searx.utils import new_hmac
import threading import threading
# check if the pyopenssl package is installed.
# It is needed for SSL connection without trouble, see #298
try:
import OpenSSL.SSL # NOQA
except ImportError:
logger.critical("The pyopenssl package has to be installed.\n"
"Some HTTPS connections will fail")
from io import StringIO from io import StringIO
# serve pages with HTTP/1.1 # serve pages with HTTP/1.1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment