Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
FWIW, I'm am considering removing this functionality in Py3.3 after the language moratorium ends. The swap-bodies technique had been included in the original sets.py and the technique is similar to the one list.sort() uses to protect against mutation during sorting. However, the technique is open to exploits like the one in this bug report. I've retitled this report because the set code itself does not have a race condition. The race is in the provided exploit code which falsely assumes that the set-in-set operation is either atomic or non-mutating, so it doesn't put locks around it as you would with pure python code like that in sets.py. ---------- priority: normal -> low title: Race condition when checking for set in set -> Automatic set-to-frozenset conversions not thread-safe _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com