Skip to content

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
jpagh:main
Jan 29, 2026
Merged

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
BryceStevenWilley merged 2 commits intoSuffolkLITLab:mainfrom
jpagh:main

Conversation

@jpagh
Copy link
Contributor

@jpagh jpagh commented Jan 29, 2026

This PR fixes the import of this_thread to be from docassemble.base.functions. Docassemble v1.9.2 changed the handling of this_thread and instead of importing it into docassemble.base.util, now only references it by its full name, docassemble.base.functions.this_thread. This caused AssemblyLine's import of this_thread from docassemble.base.util to fail.

It might be worth considering a larger change to always directly reference docassemble.base.functions.this_thread like 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_thread has been defined in docassemble.base.functions for at least the past year, according to my quick search.

… come from `functions` instead of `util` due to docassemble v1.9.2
@nonprofittechy
Copy link
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
Copy link
Contributor

@BryceStevenWilley BryceStevenWilley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BryceStevenWilley BryceStevenWilley merged commit 045aaa1 into SuffolkLITLab:main Jan 29, 2026
7 checks passed
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.

3 participants