[codex] Support docassemble 1.10 session APIs#1075
Draft
nonprofittechy wants to merge 4 commits into
Draft
Conversation
Member
Author
|
Going to try locally running v1.10 DA and run kiln against both this and the ALToolbox PR as a baseline. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1074.
What changed
docassemble.base.hooks.write_answer_jsonon docassemble 1.10 while retaining a dynamic fallback to the legacyserver.write_answer_jsonhook.docassemble.webapp.db.get_session()for every read query.docassemble.webapp.db.session_scope()for every delete/update query, including the advisory-lock metadata upsert.connect()andbegin()context managers.Root cause
Docassemble 1.10 removed both
docassemble.webapp.db_objectand thedocassemble.base.functions.serverobject. The original issue identified three database call sites, butsessions.pycontained six database context blocks; this updates all of them so no legacy engine access remains on the v1.10 path.Impact
Importing
docassemble.AssemblyLine.sessionsworks with docassemble 1.10 without dropping support for older installations. Read behavior is unchanged, while writes now use an explicit transaction in both compatibility paths.Validation
black --check docassemble/AssemblyLinemypy docassemble/AssemblyLine --config-file pyproject.tomlpython -m compileall -q docassemble/AssemblyLinepython -m builddocassemble.webapp.dbanddocassemble.base.hooksDatabase operations themselves still require validation in a running docassemble app/database context.