From 38498ac0f45380ee43e5fd766e4669b8a0ed7a5d Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 10 May 2024 10:10:06 -0400 Subject: [PATCH 1/2] Fix typo in Intrinsic Operations test --- sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py b/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py index 8291ef2df5bb..adffc945baad 100644 --- a/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py +++ b/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py @@ -30,9 +30,7 @@ class IntrinsicOneOpsTest(unittest.TestCase): def test_unary_intrinsic_ops_are_in_the_same_order_as_in_cpython(self): if sys.version_info >= (3, 12): dis_order = dis.__dict__['_intrinsic_1_descs'] - beam_ops = [fn.__name_upper() for fn in intrinsic_one_ops.INT_ONE_OPS] - for fn in intrinsic_one_ops.INT_ONE_OPS: - beam_ops.append(fn.__name__.upper()) + beam_ops = [fn.__name__.upper() for fn in intrinsic_one_ops.INT_ONE_OPS] self.assertListEqual(dis_order, beam_ops) From 8702cef074e1e0276d1028175ed4706d90c1fbfb Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Fri, 10 May 2024 10:11:49 -0400 Subject: [PATCH 2/2] Fix load_fast_and_clear --- sdks/python/apache_beam/typehints/opcodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/typehints/opcodes.py b/sdks/python/apache_beam/typehints/opcodes.py index 11e607543e93..62c7a8fadc35 100644 --- a/sdks/python/apache_beam/typehints/opcodes.py +++ b/sdks/python/apache_beam/typehints/opcodes.py @@ -471,7 +471,7 @@ def load_fast(state, arg): def load_fast_and_clear(state, arg): state.stack.append(state.vars[arg]) - del state.vars[arg] + state.vars[arg] = None def store_fast(state, arg):