The go-to resource for upgrading Python, Django, Flask, and your dependencies.

All Articles

70 articles on upgrading Python, Django, Flask, and managing dependencies

Debugging PytestCollectionWarning: cannot collect test class in pytest 8.0

PytestCollectionWarning cannot collect test class pytest 8.0 fix: abstract classes, staticmethod parametrize, multiple inheritance, empty Test classes. Migration guide, code examples, pytestmark.skipif(inspect.isabstract). Keywords: 'PytestCollectionWarning pytest 8', 'cannot collect test class pytest', 'pytest 8 collection changes', 'fix pytest abstract test class warning'.

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'.

FastAPI Background Tasks vs Celery: When to Use BackgroundTasks for Async Email Sending

FastAPI BackgroundTasks vs Celery for async email sending: Zero-setup fire-and-forget vs distributed queues. Benchmarks show BackgroundTasks add 1.2ms latency for 200ms emails (non-blocking). Celery excels at retries, scaling to 10k+/min. Code examples, Redis setup, when to choose each. Keywords: 'fastapi background tasks celery', 'fastapi async email celery', 'backgroundtasks vs celery fastapi', 'fastapi email background'.

FastAPI Dependency Injection: When Depends() Causes Circular Import Errors

FastAPI Depends() circular import errors fix: Move to central deps.py, string refs Depends('get_db'), lazy imports in func, app factories. Common router→model→db cycles. Code + pytest verification. Targets 'fastapi circular import depends', 'fastapi dependency injection error', 'ImportError partially initialized module fastapi'.

Sponsored by Durable Programming

Need help maintaining or upgrading your Python application? Durable Programming specializes in keeping Python apps secure, performant, and up-to-date.

Hire Durable Programming