From 2ce3c1dacf3daa81cdf197f7f10bb913b9ecfb48 Mon Sep 17 00:00:00 2001 From: "Hiroshi.tao" Date: Sat, 8 Feb 2025 21:09:55 +0800 Subject: [PATCH] update 1.16.3 --- .dockerignore | 3 ++- .github/workflows/ci.yml | 4 ++-- Dockerfile | 2 +- requirements/base.txt | 14 +++++++------- src/libs/hook.py | 2 +- src/utils/_compat.py | 2 +- src/utils/web.py | 2 +- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0997a45..5bfa063 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,4 +7,5 @@ __pycache__/ **/*.qiniu_pythonsdk_hostscache.json Snapshot/ .git/ -static/upload/ \ No newline at end of file +static/upload/ +.venv \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 261e837..ddd0454 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - flask-version: ["2.1.0", "2.2.0"] - python-version: ["3.8", "3.9", "3.10"] + flask-version: ["3.1.0"] + python-version: ["3.8", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 1dcdc3b..ceef311 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # -- build and run with debian(multiarch) -- -FROM python:3.9-slim +FROM python:3.10-slim LABEL maintainer=me@tcw.im ARG PIPMIRROR=https://pypi.org/simple ENV sapic_isrun=true diff --git a/requirements/base.txt b/requirements/base.txt index 37e2bc9..7b613e5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,8 +1,8 @@ -Flask>=2.1.0,<3.0.0 -redis>=4.4.0 -requests>=2.28.0 -user_agents>=2.2.0 -bleach>=5.0.0 +Flask==3.1.0 +redis==5.2.1 +requests==2.32.3 +user_agents==2.2.0 +bleach==6.2.0 bleach[css] -semver>=2.13.0 -PyJWT>=2.4.0 \ No newline at end of file +semver==3.0.4 +PyJWT==2.10.1 \ No newline at end of file diff --git a/src/libs/hook.py b/src/libs/hook.py index c0c1cc8..9d68dbf 100644 --- a/src/libs/hook.py +++ b/src/libs/hook.py @@ -27,11 +27,11 @@ from flask import ( render_template, render_template_string, - Markup, abort, send_from_directory, url_for, ) +from markupsafe import Markup from utils.tool import ( Attribution, is_valid_verion, diff --git a/src/utils/_compat.py b/src/utils/_compat.py index ca6bf9e..c799d72 100644 --- a/src/utils/_compat.py +++ b/src/utils/_compat.py @@ -57,7 +57,7 @@ def __getDict(self, str_name, dict_name, value): def _getProperties(self): try: - pro_file = open(self.filename, "Ur") + pro_file = open(self.filename, "r") for line in pro_file.readlines(): line = line.strip().replace("\n", "") if line.find("#") != -1: diff --git a/src/utils/web.py b/src/utils/web.py index 19ccc6d..0202757 100644 --- a/src/utils/web.py +++ b/src/utils/web.py @@ -31,8 +31,8 @@ jsonify, current_app, make_response, - Markup, ) +from markupsafe import Markup from jinja2 import Environment, FileSystemLoader from sys import executable from functools import partial