]> arthur.barton.de Git - bup.git/commit
Drop @contextmanager from finalized() and buptest
authorRob Browning <rlb@defaultvalue.org>
Fri, 24 Jun 2022 16:17:48 +0000 (11:17 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 25 Jun 2022 18:26:11 +0000 (13:26 -0500)
commitde7cf6afa1bc8cd97f77614f4d212dd25f6d800f
tree339e044b952ec007198d4340a1eda69b48c356cc
parent571e384c8e0e0e434fc6b8c1db1ede2c419094ab
Drop @contextmanager from finalized() and buptest

Because it involves a generator, @contextmanager creates managers that
are incompatible with ExitStack.pop_all() because they close during
that call -- exactly what pop_all() is intended to avoid.

So begin dropping @contextmanager in preference to explicit context
management classes/methods.

cf. https://github.com/python/cpython/issues/88458

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/helpers.py
test/lib/buptest/__init__.py