Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-10764

Make is_in_ipython robust

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • Missing
    • runner-py-interactive
    • None

    Description

      `is_in_ipython` determines if current code execution is within an IPython environment by attempting to fetch an IPython kernel through `IPython.get_ipython()`.

      If IPython dependency is not available or a `None` is fetched, the result would be False.

      We've been seeing some users using corrupted IPython dependency in their code base.
      If an IPython dependency is present but throws a non ImportError exception, it will break the Beam usage.
      I assume the similar errors would happen if the user uses an IPython dependency outside the range of versions in setup.py.

      I decide to make the function best effort so that it always returns False when errors occur.

      Attachments

        Issue Links

          Activity

            People

              ningk Ning
              ningk Ning
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h