Posts Tagged: migration
-
FastAPI 0.115 to 0.120: New Lifespan Events Replace on_startup and on_shutdown
FastAPI 0.115-0.120 migration: Replace deprecated @app.on_event('startup'/'shutdown') with lifespan=asynccontextmanager(app). DB pools, ML models, uvicorn reload safe. Code before/after, pytest verify. Targets 'fastapi lifespan migration', 'fastapi startup shutdown deprecated', 'fastapi 0.115 lifespan events'.
-
Flask-SQLAlchemy 3.1: Migrating from db.Model to Declarative Base Syntax
Migrate your Flask-SQLAlchemy models from legacy db.Model to SQLAlchemy 2.0 declarative base syntax using Mapped and mapped_column. Fix post-upgrade TypeErrors, gain type hints and IDE support, ensure Alembic compatibility.
-
Migrate from requirements.txt to pyproject.toml: 5-Step Process for Flask Applications
Step-by-step guide to migrate Flask apps from requirements.txt to pyproject.toml using Poetry for reproducible builds, efficient installs, and modern packaging standards.
-
Migrating Django Tests from unittest to pytest: 7 Patterns for Using Fixtures Instead of setUp
Migrate Django tests from unittest to pytest: Replace setUp with 7 fixture patterns for faster, parallel tests. Django 5.1 + pytest-django 5.0 examples.
-
Pydantic v2 Migration in FastAPI: Fixing model_validator Decorator Breaking Changes
Pydantic v2 @model_validator(mode='before') receives model instances in some cases like field assignment. Fixes for FastAPI migration, including code examples and tests.