Skip to content

Commit 7d6b598

Browse files
committed
dump version 1.16.5
1 parent cc9addc commit 7d6b598

File tree

7 files changed

+24
-16
lines changed

7 files changed

+24
-16
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Pull Request
5050

5151
- 如果可能,编写测试用例,建议的吆。
5252

53-
- 如果可能,使用py3.8+运行测试(位于src): ``make test``
53+
- 如果可能,使用py3.9+运行测试(位于src): ``make test``
5454

5555
- 如果可能,请编写或更新对应文档,位于docs下,构建文档命令(py3):
5656

docs/changelog.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
更新日志
55
=========
66

7+
v1.16.5
8+
--------
9+
10+
Released in 2025-2-11
11+
12+
- 修复 is_match_appversion 函数
13+
714
v1.16.4
815
--------
916

10-
Released in 2025-2-8
17+
Released in 2025-2-9
1118

1219
- 修复 dockerfile gunicorn
1320

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Gitee: `staugur/picbed <https://gitee.com/staugur/picbed>`_
8787

8888
5. 管理员控制台可配置全局参数定制站点信息以及用户个性自定义覆盖全局参数
8989

90-
6. 支持Py3.8+、PyPy3,支持Docker(AMD/ARM)且实时构建最新镜像传到官方仓库
90+
6. 支持Py3.9+,支持Docker(X86/ARM)且实时构建最新镜像传到官方仓库
9191

9292
7. 支持油猴脚本(用户脚本) ,使用它,几乎可以采集全网图片!
9393

@@ -107,7 +107,7 @@ Gitee: `staugur/picbed <https://gitee.com/staugur/picbed>`_
107107
一句话部署:
108108
------------
109109

110-
1. 要求: Python3.8+ 和 Redis
110+
1. 要求: Python3.9+ 和 Redis
111111
2. 下载: ``git clone https://github.com/sapicd/sapic && cd sapic``
112112
3. 依赖: ``pip install -r requirements/all.txt``
113113
4. 配置: ``config.py`` 即配置文件,可从 `.cfg` 文件或环境变量读取配置信息。

docs/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ NO.1 启动Redis
7777
NO.2 部署程序
7878
---------------------
7979

80-
这是一个基于Python Flask框架写的web应用,依赖redis(建议4.0+),部署要求python3.8+
80+
这是一个基于Python Flask框架写的web应用,依赖redis(建议4.0+),部署要求python3.9+
8181

8282
2.1. 下载源码
8383
^^^^^^^^^^^^^^^
@@ -238,12 +238,12 @@ ProxyFix sapic_proxyfix 无 信任代理标
238238

239239
.. code-block:: bash
240240
241-
$ cd picbed/src
241+
$ cd sapic/src
242242
$ make dev
243243
244244
正式环境::
245245

246-
$ cd picbed/src
246+
$ cd sapic/src
247247
$ sh online_gunicorn.sh start #可以用run参数前台启动,status查看状态,stop停止,restart重启,reload重载
248248

249249
或者使用make start等同于上述命令,其他诸如: make stop, make restart, makre load, make status
@@ -254,7 +254,7 @@ ProxyFix sapic_proxyfix 无 信任代理标
254254
使用构建好的 `sapic @ docker hub <https://hub.docker.com/r/staugur/sapic>`_ ,
255255
详情请看 :ref:`picbed-docker-deploy`
256256

257-
- 刚启动的picbed是没有默认管理员用户的,需要使用命令行手动创建,
257+
- 刚启动的 sapic 是没有默认管理员用户的,需要使用命令行手动创建,
258258
参考 :ref:`picbed-usgae`
259259

260260
- 查看我录制的手动部署的gif图: `picbed-install.gif <https://static.saintic.com/picbed/staugur/2020/07/24/picbed-install.gif>`_

src/tests/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_semver(self):
4545
self.assertFalse(is_valid_verion("v2.19.10"))
4646
self.assertTrue(is_match_appversion())
4747
self.assertTrue(is_match_appversion(VER))
48+
self.assertTrue(is_match_appversion("0.0.1"))
4849
self.assertFalse(is_match_appversion("<{}".format(VER)))
4950
self.assertFalse(is_match_appversion(">{}".format(VER)))
5051
self.assertTrue(is_match_appversion(">={}".format(VER)))

src/utils/tool.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from bleach.sanitizer import ALLOWED_TAGS, ALLOWED_ATTRIBUTES
3232
from bleach.css_sanitizer import CSSSanitizer
3333
from typing import Optional, Dict, List
34-
from version import __version__ as PICBED_VERSION
34+
from version import __version__ as SAPIC_VERSION
3535
from .log import Logger
3636
from ._compat import string_types, text_type, urlparse, is_true
3737

@@ -494,7 +494,7 @@ def try_request(
494494
"""
495495
headers = headers or {}
496496
if "User-Agent" not in headers:
497-
headers["User-Agent"] = "sapic/v%s" % PICBED_VERSION
497+
headers["User-Agent"] = "sapic/v%s" % SAPIC_VERSION
498498
method = method.lower()
499499
if method == "get":
500500
method_func = requests.get
@@ -693,13 +693,13 @@ def is_match_appversion(appversion=None):
693693
if not isinstance(appversion, string_types):
694694
appversion = appversion.decode("utf-8")
695695

696-
sysver = semver.VersionInfo.parse(PICBED_VERSION)
697-
698696
def vermatch(check_ver):
697+
if is_valid_verion(check_ver):
698+
check_ver = ">={}".format(check_ver)
699699
try:
700-
return sysver.match(check_ver)
700+
return semver.match(SAPIC_VERSION, check_ver)
701701
except ValueError:
702-
return sysver.match(">={}".format(check_ver))
702+
return False
703703

704704
avs = comma_pat.split(appversion)
705705
for v in avs:
@@ -712,7 +712,7 @@ def vermatch(check_ver):
712712
def less_latest_tag(latest_tag):
713713
"""当前应用是否小于GitHub最新版本比较"""
714714
if latest_tag and is_valid_verion(latest_tag):
715-
return semver.compare(latest_tag, PICBED_VERSION) == 1
715+
return semver.compare(latest_tag, SAPIC_VERSION) == 1
716716

717717

718718
def parse_author_mail(author):

src/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.16.4"
1+
__version__ = "1.16.5"

0 commit comments

Comments
 (0)