claudevdm commented on code in PR #35904:
URL: https://github.com/apache/beam/pull/35904#discussion_r2430008904


##########
sdks/python/apache_beam/internal/pickler_test.py:
##########
@@ -302,6 +318,18 @@ def test_disable_best_effort_determinism(self):
         dumps(set1, enable_best_effort_determinism=False),
         dumps(set2, enable_best_effort_determinism=False))
 
+  def test_enable_stable_code_identifier_pickling(self):
+    pickler.set_library('cloudpickle')
+    pickled = pickle_depickle(lambda x: x, True)
+    pickled_type = type(pickled)
+    self.assertIsInstance(pickled, pickled_type)

Review Comment:
   The test is still failing. 
   
   ```
   # Get original dynamic function
   >     func_v1 = module_test.mutable_test_function()
   E     AttributeError: module 'apache_beam.internal.module_test' has no 
attribute 'mutable_test_function'
   ```
   
   Need to define mutable_test_function in 
https://github.com/apache/beam/blob/385271bea452dc3394dae3121035007167c6fb58/sdks/python/apache_beam/internal/module_test.py#L4
   
   ```
   def mutable_test_function():
       def dynamic_function():
           return "version1"
       return dynamic_function
   ```
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to