You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2024/12/26 20:55:24 UTC

(beam) branch master updated: [yaml] allow logging bytes in LogForTesting (#33433)

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 74bcba1180f [yaml] allow logging bytes in LogForTesting (#33433)
74bcba1180f is described below

commit 74bcba1180f80b9361b973351dc1a5eed035724e
Author: Jeff Kinard <je...@thekinards.com>
AuthorDate: Thu Dec 26 14:55:17 2024 -0600

    [yaml] allow logging bytes in LogForTesting (#33433)
    
    Signed-off-by: Jeffrey Kinard <je...@thekinards.com>
---
 sdks/python/apache_beam/yaml/yaml_provider.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/yaml/yaml_provider.py b/sdks/python/apache_beam/yaml/yaml_provider.py
index a0763895355..8dfa314aeb6 100755
--- a/sdks/python/apache_beam/yaml/yaml_provider.py
+++ b/sdks/python/apache_beam/yaml/yaml_provider.py
@@ -907,7 +907,7 @@ class YamlProviders:
 
     def to_loggable_json_recursive(o):
       if isinstance(o, (str, bytes)):
-        return o
+        return str(o)
       elif callable(getattr(o, '_asdict', None)):
         return to_loggable_json_recursive(o._asdict())
       elif isinstance(o, Mapping) and callable(getattr(o, 'items', None)):