The threadinglocal module is accessible via the formencode.util module.
See the source for more information.