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 flask_cors import CORS
from datetime import datetime, date from datetime import datetime, date
from flask.json import JSONEncoder, jsonify from flask.json import JSONEncoder, jsonify
from importlib_metadata import entry_points from importlib.metadata import entry_points
from sqlalchemy.exc import OperationalError from sqlalchemy.exc import OperationalError
from werkzeug.exceptions import HTTPException from werkzeug.exceptions import HTTPException

View File

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

View File

@ -2,7 +2,7 @@ import click
from click.decorators import pass_context from click.decorators import pass_context
from flask import current_app from flask import current_app
from flask.cli import with_appcontext 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.database import db
from flaschengeist.config import config from flaschengeist.config import config

View File

@ -1,7 +1,7 @@
import os import os
from flask_migrate import Migrate, Config from flask_migrate import Migrate, Config
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
from importlib_metadata import EntryPoint from importlib.metadata import EntryPoint, entry_points, distribution
from sqlalchemy import MetaData from sqlalchemy import MetaData
from flaschengeist import logger from flaschengeist import logger
@ -30,8 +30,6 @@ def configure_alembic(config: Config):
This includes even disabled plugins, as simply disabling a plugin without This includes even disabled plugins, as simply disabling a plugin without
uninstall can break the alembic version management. uninstall can break the alembic version management.
""" """
from importlib_metadata import entry_points, distribution
# Set main script location # Set main script location
config.set_main_option( config.set_main_option(
"script_location", str(distribution("flaschengeist").locate_file("") / "flaschengeist" / "alembic") "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 sqlalchemy import event
from pathlib import Path 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 datetime import datetime
from typing import Any 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 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 secrets import compare_digest
from flaschengeist import logger 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 typing import Optional
from datetime import date, datetime from datetime import date, datetime
from sqlalchemy.orm.collections import attribute_mapped_collection from sqlalchemy.orm.collections import attribute_mapped_collection

View File

@ -5,7 +5,7 @@
""" """
from typing import Optional from typing import Optional
from importlib_metadata import Distribution, EntryPoint from importlib.metadata import Distribution, EntryPoint
from werkzeug.exceptions import MethodNotAllowed, NotFound from werkzeug.exceptions import MethodNotAllowed, NotFound
from werkzeug.datastructures import FileStorage 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 datetime import datetime
from typing import Optional from typing import Optional
from sqlalchemy.ext.hybrid import hybrid_property 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.database import db
from flaschengeist.models import ModelSerializeMixin, Serial from flaschengeist.models import ModelSerializeMixin, Serial
from flaschengeist.models.image import Image from flaschengeist.models.image import Image

View File

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