Commit a9e2a3a0 authored by Nicolas Gelot's avatar Nicolas Gelot

Cleanup and update dependencies

parent 1478a0e8
......@@ -4,9 +4,7 @@ RUN apk add \
git \
build-base \
libxml2-dev \
libxslt-dev \
libffi-dev \
openssl-dev
libxslt-dev
# Only to use the docker cache and optimize the build time
WORKDIR /src
......@@ -24,7 +22,6 @@ LABEL description="A privacy-respecting, hackable metasearch engine."
RUN apk add \
ca-certificates \
libxslt \
openssl \
&& pip install coverage
COPY --from=builder /install/ /usr/local/
......
redis==3.2.1
certifi==2017.11.5
flask==1.0.2
flask-babel==0.11.2
lxml==4.2.3
idna==2.7
pygments==2.1.3
pyopenssl==18.0.0
python-dateutil==2.7.3
pyyaml==3.13
requests[socks]==2.19.1
lxml==4.3.3
pygments==2.3.1
python-dateutil==2.8.0
pyyaml==5.1
requests[socks]==2.21.0
redis==3.2.1
......@@ -15,18 +15,11 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
'''
import certifi
import logging
from os import environ
from os.path import realpath, dirname, join, abspath, isfile
from io import open
from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
try:
from yaml import load
except ImportError:
from sys import exit, stderr
stderr.write('[E] install pyyaml\n')
exit(2)
from yaml import load
searx_dir = abspath(dirname(__file__))
engine_dir = dirname(realpath(__file__))
......@@ -73,12 +66,6 @@ logging.basicConfig(level=getattr(logging, searx_loglevel))
logger = logging.getLogger('searx')
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')
......
......@@ -37,16 +37,11 @@ from searx import logger
logger = logger.getChild('webapp')
try:
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.util import ClassNotFound
from pygments.formatters import HtmlFormatter
except ImportError:
logger.critical("cannot import dependency: pygments")
from sys import exit
exit(1)
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.util import ClassNotFound
from pygments.formatters import HtmlFormatter
from html import escape
from datetime import datetime, timedelta
from werkzeug.contrib.fixers import ProxyFix
......@@ -80,14 +75,6 @@ from searx.url_utils import urlencode, urlparse, urljoin
from searx.utils import new_hmac
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
# 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