fix: resolved import error of this_thread by changing the import to come from functions instead of util due to docassemble v1.9.2#1009
Merged
BryceStevenWilley merged 2 commits intoSuffolkLITLab:mainfrom Jan 29, 2026
Conversation
… come from `functions` instead of `util` due to docassemble v1.9.2
Member
|
Makes sense, will ask @BryceStevenWilley to also review |
…ssemble.base.functions.this_thread` in order to avoid bugs related to workers and aligning with docassemble v1.9.2 best practices
BryceStevenWilley
approved these changes
Jan 29, 2026
Contributor
BryceStevenWilley
left a comment
There was a problem hiding this comment.
LGTM, tested locally on 1.9.2 and on a 1.9.1 server too.
For what it's worth, it looks like this_thread has been in functions.py for 7 years (jhpyle/docassemble@2d96b2e), so I have no worries about backwards compatibility stuff.
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.
This PR fixes the import of
this_threadto be fromdocassemble.base.functions. Docassemble v1.9.2 changed the handling ofthis_threadand instead of importing it intodocassemble.base.util, now only references it by its full name,docassemble.base.functions.this_thread. This caused AssemblyLine's import ofthis_threadfromdocassemble.base.utilto fail.It might be worth considering a larger change to always directly reference
docassemble.base.functions.this_threadlike docassemble now does. Here is the relevant part of the commit, "changed way that this_thread is accessed to avoid any issues with it being redefined after being imported".Backwards compatibility note:
this_threadhas been defined indocassemble.base.functionsfor at least the past year, according to my quick search.