From 50f5264fe15d09903b6458113cb8ba6e89592d85 Mon Sep 17 00:00:00 2001 From: lbruton Date: Wed, 25 Nov 2026 11:03:07 -0600 Subject: [PATCH] chore(WOF-52): bump the remaining pip pins and fix two deprecation warnings Dependabot #117 left pydantic, coverage, faker, ipython and mkdocs-material one release behind. declarative_base moves to sqlalchemy.orm, its home since SQLAlchemy 2.0. pytest.ini sets asyncio_default_fixture_loop_scope to the pytest-asyncio default, which silences its deprecation warning. Tested on CPython 3.12.13 with a fresh venv: pip check clean, 758 passed, 83% coverage. --- pytest.ini | 3 +++ requirements-dev.txt | 8 ++++---- requirements.txt | 2 +- src/models/database.py | 3 +-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pytest.ini b/pytest.ini index e6754b7..b6948e2 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,6 +9,9 @@ python_functions = test_* # Minimum Python version minversion = 7.0 +# One event loop per test function, the pytest-asyncio default. +asyncio_default_fixture_loop_scope = function + # Test paths testpaths = tests diff --git a/requirements-dev.txt b/requirements-dev.txt index ca38aff..75151ff 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,7 +9,7 @@ pytest==9.2.0 pytest-asyncio==1.5.0 # Updated for Python 3.12 event loop compatibility pytest-cov==7.1.0 pytest-mock==3.17.0 -coverage==7.17.3 +coverage==7.17.5 # Code Quality black==26.10.1 # Code formatting - Updated for Python 3.12 @@ -19,18 +19,18 @@ mypy==2.4.1 # Type checking - Updated for Python 3.12 pylint==4.1.4 # Advanced linting # Development Tools -ipython==9.18.1 # Enhanced Python shell +ipython==9.19.1 # Enhanced Python shell ipdb==0.13.13 # Debugger pre-commit==4.7.0 # Git hooks for code quality # Documentation mkdocs==1.6.1 -mkdocs-material==9.8.1 +mkdocs-material==9.8.2 # Database Tools sqlalchemy-utils==0.43.0 # Testing Utilities -faker==40.54.0 # Generate test data +faker==40.63.0 # Generate test data freezegun==1.5.5 # Mock datetime (1.5+ required for Python 3.13) responses==0.26.3 # Mock HTTP requests diff --git a/requirements.txt b/requirements.txt index 386619e..a60ea0a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ pytz==2026.6 twilio==9.13.0 # Data Validation -pydantic==2.14.3 +pydantic==2.14.4 pydantic-settings==2.16.3 # Utilities diff --git a/src/models/database.py b/src/models/database.py index 71173d2..faef8ef 100644 --- a/src/models/database.py +++ b/src/models/database.py @@ -6,8 +6,7 @@ """ from sqlalchemy import create_engine -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import sessionmaker +from sqlalchemy.orm import declarative_base, sessionmaker from sqlalchemy.pool import NullPool import os from dotenv import load_dotenv