Repository: beam
Updated Branches:
  refs/heads/python-sdk cb0634984 -> 2d190a29b


Only the first occurrence of each typehint related warning message.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/ecd6b5e7
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/ecd6b5e7
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/ecd6b5e7

Branch: refs/heads/python-sdk
Commit: ecd6b5e7d2062f2cc1d81f61842a60ffc10862f2
Parents: cb06349
Author: Neda Mirian <[email protected]>
Authored: Mon Jan 9 18:21:43 2017 -0800
Committer: Robert Bradshaw <[email protected]>
Committed: Tue Jan 10 16:54:33 2017 -0800

----------------------------------------------------------------------
 sdks/python/apache_beam/coders/typecoders.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/ecd6b5e7/sdks/python/apache_beam/coders/typecoders.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/coders/typecoders.py 
b/sdks/python/apache_beam/coders/typecoders.py
index c6cdae7..9bbfedf 100644
--- a/sdks/python/apache_beam/coders/typecoders.py
+++ b/sdks/python/apache_beam/coders/typecoders.py
@@ -65,6 +65,7 @@ See apache_beam.typehints.decorators module for more details.
 """
 
 import logging
+import warnings
 
 from apache_beam.coders import coders
 from apache_beam.typehints import typehints
@@ -132,7 +133,7 @@ class CoderRegistry(object):
         # TODO(robertwb): Clean this up when type inference is fully enabled.
         pass
       else:
-        logging.warning('Using fallback coder for typehint: %r.', typehint)
+        warnings.warn('Using fallback coder for typehint: %r.' % typehint)
       coder = self._fallback_coder
     return coder.from_type_hint(typehint, self)
 

Reply via email to