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

typehints.TypeVariable issues with __hash__

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sdk-py-core
    • Labels:
      None

      Description

      This class currently does not define a _hash_ function. This defies the assumption made by sets and dicts which contain TypeConstraint objects.

      In Python 3, classes which define __eq__ also need to explicitly define __hash__ to be hashable. However, this causes combiners_test.CombineTest.test_to_list_and_to_dict to throw an error in slow_stream.py (adding NoneType and long).

      There are multiple TypeVariable instances with name 'K' or 'V' throughout the codebase. The equality of these instances may possibly cause issues.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                luke-zhu Luke Zhu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: