~nhanb/pytaku

1566196494769ff7854d728e83446cd8a3396b12 — Bùi Thành Nhân 1 year, 16 days ago 680ded1 0.5.1
fucking importlib

Apparently with python3.9 it would vomit out an IsADirectoryError:

    IsADirectoryError: [Errno 21] Is a directory:
    '/home/pytaku/.local/lib/python3.9/site-packages/pytaku/database/migrations'
2 files changed, 3 insertions(+), 2 deletions(-)

M pyproject.toml
M src/pytaku/database/migrator.py
M pyproject.toml => pyproject.toml +1 -1
@@ 1,6 1,6 @@
[tool.poetry]
name = "pytaku"
version = "0.5.0"
version = "0.5.1"
description = "Self-hostable web-based manga reader"
authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
license = "AGPL-3.0-only"

M src/pytaku/database/migrator.py => src/pytaku/database/migrator.py +2 -1
@@ 56,7 56,8 @@ def migrate(overwrite_latest_schema=True):
    if not Path(DBNAME).is_file():
        run_sql("PRAGMA journal_mode = WAL;")

    with resources.path(migrations, "") as migrations_dir:
    with resources.path(migrations, "__init__.py") as migrations_dir:
        migrations_dir = migrations_dir.parent
        pending_migrations = _get_pending_migrations(migrations_dir)
        if not pending_migrations:
            print("Nothing to migrate.")