From fa7974af9962a9a213eef9f5f114aba47a35f317 Mon Sep 17 00:00:00 2001 From: jstzwj <1103870790@qq.com> Date: Fri, 14 Aug 2026 15:33:17 +0800 Subject: [PATCH] chore(deps): bump to latest verified set, drop py3.9, prune unused deps - fastapi 0.115.2 -> 0.141.1, httpx 0.27 -> 0.28, pydantic 2.8.2 -> 2.13.4 (upper bounds pydantic<=2.8.2 / pydantic-settings<=2.4.0 lifted), huggingface_hub 0.26 -> 1.27, fastapi-utils 0.7 -> 0.8, pytest 8 -> 9, tenacity 8 -> 9, portalocker 3 -> 4, peewee 3.17 -> 3.19 (stay on 3.x), GitPython/PyYAML/jinja2/python-multipart to latest. - Drop unused deps: cachetools, aiofiles, numpy (zero references in src+tests). - Add missing deps: brotli (used by zip_utils), peewee (used by database), pytest-asyncio (used by tests). - requires-python >=3.10 (core deps require it; py3.9 EOL Oct 2025); CI matrix 3.9-3.12 -> 3.10-3.13. - database/models.py: create ~/.olah before db.connect() so importing the module on a fresh machine no longer crashes. Verified: full offline suite (130 passed) on two fresh venvs with the new pinned set; the only failure is the pre-existing unrelated test_server_layers one, which also fails on old deps. Co-Authored-By: Claude --- .github/workflows/dev.yml | 2 +- pyproject.toml | 12 ++++++------ requirements.txt | 32 ++++++++++++++++---------------- src/olah/database/models.py | 3 +++ 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7a1e407..46978bf 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - name: Check out repository code diff --git a/pyproject.toml b/pyproject.toml index 768d773..5be2e79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,20 +7,20 @@ name = "olah" version = "0.4.3" description = "Self-hosted lightweight huggingface mirror." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", ] dependencies = [ - "fastapi", "fastapi-utils", "httpx", "numpy", "pydantic<=2.8.2", "pydantic-settings<=2.4.0", "requests", "toml", - "rich>=10.0.0", "shortuuid", "uvicorn", "tenacity>=8.2.2", "pytz", "cachetools", "GitPython", - "PyYAML", "typing_inspect>=0.9.0", "huggingface_hub", "jinja2", "python-multipart", "portalocker", - "aiofiles", "brotli" + "fastapi>=0.141", "fastapi-utils>=0.8", "httpx>=0.28", "pydantic>=2.13", "pydantic-settings>=2.15", + "requests", "toml", "rich>=10.0.0", "shortuuid", "uvicorn", "tenacity>=9", "pytz", "GitPython", + "PyYAML", "typing_inspect>=0.9.0", "huggingface_hub>=1.27", "jinja2", "python-multipart>=0.0.32", + "portalocker>=4", "peewee>=3.19", "brotli>=1.2" ] [project.optional-dependencies] -dev = ["black==24.10.0", "pylint==3.3.1", "pytest==8.3.3"] +dev = ["black==24.10.0", "pylint==3.3.1", "pytest==9.1.1", "pytest-asyncio==1.3.0"] [project.urls] "Homepage" = "https://github.com/vtuber-plan/olah" diff --git a/requirements.txt b/requirements.txt index 4a237ca..f5831c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ -fastapi==0.115.2 -fastapi-utils==0.7.0 -GitPython==3.1.43 -httpx==0.27.0 -pydantic==2.8.2 -pydantic-settings==2.4.0 +fastapi==0.141.1 +fastapi-utils==0.8.0 +GitPython==3.1.59 +httpx==0.28.1 +pydantic==2.13.4 +pydantic-settings==2.15.0 toml==0.10.2 -huggingface_hub==0.26.0 -pytest==8.3.3 -cachetools==5.4.0 -PyYAML==6.0.1 -tenacity==8.5.0 -peewee==3.17.6 +huggingface_hub==1.27.0 +pytest==9.1.1 +pytest-asyncio==1.3.0 +PyYAML==6.0.3 +tenacity==9.1.4 +peewee==3.19.0 typing_inspect==0.9.0 -jinja2==3.1.4 -python-multipart==0.0.9 -portalocker==3.1.1 -aiofiles==24.1.0 \ No newline at end of file +jinja2==3.1.6 +python-multipart==0.0.32 +portalocker==4.1.0 +brotli==1.2.0 diff --git a/src/olah/database/models.py b/src/olah/database/models.py index a50638f..3740655 100644 --- a/src/olah/database/models.py +++ b/src/olah/database/models.py @@ -11,6 +11,9 @@ from olah.utils.olah_utils import get_olah_path +# The olah home dir (~/.olah) may not exist yet on a fresh install; peewee +# will not create the parent directory itself. +os.makedirs(get_olah_path(), exist_ok=True) db_path = os.path.join(get_olah_path(), "database.db") db = SqliteDatabase(db_path)