feature/migrations, closes #19 #20

Merged
crimsen merged 28 commits from feature/migrations into develop 2023-03-02 05:37:11 +00:00
12 changed files with 11 additions and 31 deletions
Showing only changes of commit 7f8aa80b0e - Show all commits

View File

@ -4,7 +4,7 @@ from flask import Flask
from flask_cors import CORS
from datetime import datetime, date
from flask.json import JSONEncoder, jsonify
from importlib_metadata import entry_points
from importlib.metadata import entry_points
from sqlalchemy.exc import OperationalError
from werkzeug.exceptions import HTTPException

View File

@ -1,5 +1,5 @@
import click
from importlib_metadata import entry_points
from importlib.metadata import entry_points
@click.command()

View File

@ -2,7 +2,7 @@ import click
from click.decorators import pass_context
from flask import current_app
from flask.cli import with_appcontext
from importlib_metadata import EntryPoint, entry_points
from importlib.metadata import EntryPoint, entry_points
from flaschengeist.database import db
from flaschengeist.config import config

View File

@ -1,7 +1,7 @@
import os
from flask_migrate import Migrate, Config
from flask_sqlalchemy import SQLAlchemy
from importlib_metadata import EntryPoint
from importlib.metadata import EntryPoint, entry_points, distribution
from sqlalchemy import MetaData
from flaschengeist import logger
@ -30,8 +30,6 @@ def configure_alembic(config: Config):
This includes even disabled plugins, as simply disabling a plugin without
uninstall can break the alembic version management.
"""
from importlib_metadata import entry_points, distribution
# Set main script location
config.set_main_option(
"script_location", str(distribution("flaschengeist").locate_file("") / "flaschengeist" / "alembic")

View File

@ -1,5 +1,3 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from sqlalchemy import event
from pathlib import Path

View File

@ -1,4 +1,3 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from datetime import datetime
from typing import Any

View File

@ -1,10 +1,4 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from datetime import datetime, timedelta, timezone
from . import ModelSerializeMixin, UtcDateTime, Serial
from .user import User
from flaschengeist.database import db
from secrets import compare_digest
from flaschengeist import logger

View File

@ -1,6 +1,3 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from flask import url_for
from typing import Optional
from datetime import date, datetime
from sqlalchemy.orm.collections import attribute_mapped_collection

View File

@ -5,7 +5,7 @@
"""
from typing import Optional
from importlib_metadata import Distribution, EntryPoint
from importlib.metadata import Distribution, EntryPoint
from werkzeug.exceptions import MethodNotAllowed, NotFound
from werkzeug.datastructures import FileStorage

View File

@ -1,5 +1,3 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from datetime import datetime
from typing import Optional
from sqlalchemy.ext.hybrid import hybrid_property

View File

@ -1,5 +1,3 @@
from __future__ import annotations # TODO: Remove if python requirement is >= 3.10
from flaschengeist.database import db
from flaschengeist.models import ModelSerializeMixin, Serial
from flaschengeist.models.image import Image

View File

@ -19,19 +19,17 @@ classifiers =
[options]
include_package_data = True
python_requires = >=3.9
python_requires = >=3.10
packages = find:
install_requires =
Flask>=2.0
Pillow>=8.4.0
Flask==2.0.3
Pillow>=9.0
flask_cors
flask_migrate>=3.1.0
flask_sqlalchemy>=2.5
# Importlib requirement can be dropped when python requirement is >= 3.10
importlib_metadata>=4.3
sqlalchemy>=1.4.26
flask_sqlalchemy>=2.5.1
sqlalchemy>=1.4.39
toml
werkzeug >= 2.0
werkzeug==2.0.3
[options.extras_require]
argon = argon2-cffi