This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 107edd78fc8 Copy sys.module.items() in case it changes during 
iteration. (#34592)
107edd78fc8 is described below

commit 107edd78fc8a4381ebf2de4ba7751405ee6e6cf6
Author: claudevdm <[email protected]>
AuthorDate: Thu Apr 10 09:27:57 2025 -0400

    Copy sys.module.items() in case it changes during iteration. (#34592)
    
    Co-authored-by: Claude <[email protected]>
---
 sdks/python/apache_beam/internal/cloudpickle_pickler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/internal/cloudpickle_pickler.py 
b/sdks/python/apache_beam/internal/cloudpickle_pickler.py
index 7300b619b09..da069954754 100644
--- a/sdks/python/apache_beam/internal/cloudpickle_pickler.py
+++ b/sdks/python/apache_beam/internal/cloudpickle_pickler.py
@@ -82,7 +82,7 @@ LOCK_TYPE = type(threading.Lock())
 
 
 def _reconstruct_enum_descriptor(full_name):
-  for _, module in sys.modules.items():
+  for _, module in list(sys.modules.items()):
     if not hasattr(module, 'DESCRIPTOR'):
       continue
 

Reply via email to