Merge "Remove fallback logic for Python < 3.3"

This commit is contained in:
Zuul 2025-02-11 13:12:27 +00:00 committed by Gerrit Code Review
commit 8a4c380955

View File

@ -12,11 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
try:
from contextlib import ExitStack
except ImportError:
from contextlib2 import ExitStack
import collections
import contextlib
import functools
@ -49,7 +44,7 @@ def _acquire_and_release_futures(fs):
# always acquire the conditions in the same order, no matter what; a way
# to avoid dead-lock).
fs = sorted(fs, key=id)
with ExitStack() as stack:
with contextlib.ExitStack() as stack:
for fut in fs:
stack.enter_context(fut._condition)
yield