You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/06/01 23:01:57 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #11785: [BEAM-10063] Create a WontImplementError for skipping features.

TheNeuralBit commented on a change in pull request #11785:
URL: https://github.com/apache/beam/pull/11785#discussion_r433527036



##########
File path: sdks/python/apache_beam/dataframe/doctests.py
##########
@@ -242,6 +242,11 @@ def __init__(self, env, use_beam=True, **kwargs):
         **kwargs)
 
   def run(self, test, **kwargs):
+    for example in test.examples:
+      if example.exc_msg is None:
+        # Don't fail doctests that raise this error.
+        example.exc_msg = (
+            'apache_beam.dataframe.frame_base.WontImplementError: ...')

Review comment:
       The doctest docs say that `exc_msg != None` indicates an example is _expected_ to generate an exception matching the description. In practice I guess it really means the example is _allowed_ to throw such an exception?

##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -24,7 +24,8 @@
 
 @frame_base.DeferredFrame._register_for(pd.Series)
 class DeferredSeries(frame_base.DeferredFrame):
-  pass
+  def __array__(self, dtype=None):
+    raise frame_base.WontImplementError('non-deferred')

Review comment:
       Can you make this message more descriptive?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org