Skip to content

Commit

Permalink
Allow subclasses of BaseException
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Nov 11, 2024
1 parent a76adea commit 76d3d70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdks/python/apache_beam/runners/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import collections
import copy
import cython
import logging
import sys
import threading
Expand Down Expand Up @@ -1503,6 +1504,8 @@ def process(self, windowed_value):
self._reraise_augmented(exn, windowed_value)
return []

# Ignore type annotations to allow subclasses of BaseException
@cython.annotation_typing(False)
def _maybe_sample_exception(
self, exn: BaseException,
windowed_value: Optional[WindowedValue]) -> None:
Expand Down

0 comments on commit 76d3d70

Please sign in to comment.