Skip to content

[codex] Support docassemble 1.10 webapp APIs#259

Draft
nonprofittechy wants to merge 3 commits into
mainfrom
v110-migrate-import-locations
Draft

[codex] Support docassemble 1.10 webapp APIs#259
nonprofittechy wants to merge 3 commits into
mainfrom
v110-migrate-import-locations

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

Closes #258.

What changed

  • Prefer the docassemble 1.10 locations for Flask/CSRF objects, API helpers, Redis, Celery context, cron, cloud, saved-file, filename, translation, playground, and interview helpers.
  • Retain narrowly scoped fallbacks to the legacy locations used by docassemble 1.9.
  • Move aldashboard.py from removed db_object and Model.query APIs to get_session(), session_scope(), and SQLAlchemy 2 select() statements.
  • Add focused tests that verify the 1.10 import contract, force the 1.9 API fallback, and prevent legacy database access from returning.
  • Keep the migration in three logical commits: webapp imports, database/session APIs, and compatibility tests.

Root cause

Docassemble 1.10 split the legacy docassemble.webapp.server, backend, and files modules into smaller packages, removed db_object, and changed its ORM models so they no longer expose Flask-SQLAlchemy's Model.query property. Updating import paths alone therefore fixed import-time errors but left dashboard user/session operations broken at runtime.

Impact

ALDashboard imports and registers its routes on docassemble 1.10 while retaining compatibility with pre-1.10 installations. Database reads now use explicit sessions and writes use transactional session scopes in both compatibility branches.

Validation

  • python -m pytest -q — 363 passed
  • python -m mypy docassemble/ALDashboard --config-file pyproject.toml
  • python -m compileall -q docassemble/ALDashboard
  • node --check docassemble/ALDashboard/data/static/pdf_labeler.js
  • Focused export, attachment mapping, and static labeler extraction tests — 72 passed
  • Source-overlay import smoke test against the local docassemble 1.10.1 checkout, including API, worker, dashboard, labeler, and translation modules
  • Forced legacy-layout subprocess import test for the docassemble 1.9 fallback

Database queries were not executed against a live docassemble database; the session and query paths are covered structurally and by the full unit suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update private docassemble imports for docassemble 1.10.0

1 participant