Posts Tagged: migration
-
Migrate from requirements.txt to pyproject.toml: 5-Step Process for Flask Applications
Step-by-step migration guide for Flask apps from requirements.txt to pyproject.toml using Poetry. Achieve reproducible builds, faster installs, and modern Python packaging standards.
-
Flask-SQLAlchemy 3.1: Migrating from db.Model to Declarative Base Syntax
Flask-SQLAlchemy 3.1 migration db.Model DeclarativeBase Mapped mapped_column SQLAlchemy 2.0 Flask apps. Step-by-step convert legacy models to typed declarative mappings, Alembic compat, performance benefits, fix TypeErrors post-upgrade. Type hints IDE support future-proof.
-
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'.
-
Pydantic v2 Migration in FastAPI: Fixing model_validator Decorator Breaking Changes
Pydantic v2 model_validator breaking changes in FastAPI: @root_validator → @model_validator(mode='before') now receives model instance sometimes (validate_assignment=True). Fix: handle dict vs instance. FastAPI request models safe; CLI/tests fail. Code diffs, tests. Migrate without errors.
-
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.