]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Mutex on _CONFIGURE_MUTEX in automap.prepare()
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 27 May 2018 17:45:20 +0000 (13:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 28 May 2018 13:28:12 +0000 (09:28 -0400)
commit2ac7cad7179ff594d8bb3df9856c891bf4e51097
tree91b60206e44e64748b971d339fd620a217415f4c
parentc7ae04d1c5c4aa6c6099584ae386d6ab9ef7b290
Mutex on _CONFIGURE_MUTEX in automap.prepare()

Fixed a race condition which could occur if automap
:meth:`.AutomapBase.prepare` were used within a multi-threaded context
against other threads which  may call :func:`.configure_mappers` as a
result of use of other mappers.  The unfinished mapping work of automap
is particularly sensitive to being pulled in by a
:func:`.configure_mappers` step leading to errors.

Change-Id: I6d36df6639bf5cb8f137187dff68f386f5e84f88
Fixes: #4266
doc/build/changelog/unreleased_12/4266.rst [new file with mode: 0644]
lib/sqlalchemy/ext/automap.py
test/ext/test_automap.py