reorder import, upgrade to python 3.9

This commit is contained in:
BennyThink
2021-04-15 20:15:59 +08:00
parent e141d26447
commit d041f03b29
4 changed files with 17 additions and 18 deletions

View File

@@ -1,13 +1,15 @@
FROM python:3.8-alpine as builder
FROM python:3.9-alpine as builder
RUN apk update && apk add --no-cache tzdata ca-certificates alpine-sdk libressl-dev libffi-dev cargo
# build cryptography separately because it's very slow
RUN pip3 install --user cryptography==3.4.7
COPY requirements.txt /requirements.txt
RUN pip3 install --user -r /requirements.txt && rm /requirements.txt
FROM python:3.8-alpine
FROM python:3.9-alpine
COPY --from=builder /root/.local /usr/local
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

View File

@@ -1,11 +1,12 @@
requests==2.24.0
pytelegrambotapi==3.7.6
pytelegrambotapi==3.7.7
beautifulsoup4==4.9.1
tgbot-ping
redis==3.5.3
apscheduler==3.6.3
pymongo==3.11.2
tornado==6.0.4
cryptography==3.4.1
redis==3.5.3
passlib==1.7.4
passlib==1.7.4
cryptography==3.4.7

View File

@@ -13,20 +13,18 @@ import logging
import json
import time
from urllib import request
from datetime import date, timedelta
from passlib.hash import pbkdf2_sha256
from http import HTTPStatus
from concurrent.futures import ThreadPoolExecutor
import redis
import pymongo
from http import HTTPStatus
from concurrent.futures import ThreadPoolExecutor
from tornado import web, ioloop, httpserver, gen, options
from tornado.log import enable_pretty_logging
from tornado import escape
from tornado.concurrent import run_on_executor
from apscheduler.schedulers.background import BackgroundScheduler
from tornado import web, ioloop, httpserver, gen, options, escape
from tornado.log import enable_pretty_logging
from tornado.concurrent import run_on_executor
from passlib.hash import pbkdf2_sha256
from crypto import decrypt

View File

@@ -10,16 +10,14 @@ import re
import logging
import json
import tempfile
from urllib.parse import quote_plus
import telebot
from apscheduler.schedulers.background import BackgroundScheduler
from telebot import types, apihelper
from tgbot_ping import get_runtime
from apscheduler.schedulers.background import BackgroundScheduler
import fansub
from utils import (save_error_dump, get_error_dump, reset_request,
today_request, show_usage, redis_announcement
)
@@ -181,7 +179,7 @@ def send_my_response(message):
def send_search(message):
# normal ordered search
if message.text in ("Voice Chat started", "Voice Chat ended"):
logging.warning("This is really funny %s",message.text)
logging.warning("This is really funny %s", message.text)
return
base_send_search(message)