Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-1251 Python 3 Support
  3. BEAM-5878

Support DoFns with Keyword-only arguments in Python 3.

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.18.0
    • Component/s: sdk-py-core
    • Labels:
      None

      Description

      Python 3.0 adds a possibility to define functions with keyword-only arguments.

      Currently Beam does not handle them correctly. Ruoyu Liu pointed out one place in our codebase that we should fix: in Python in 3.0 inspect.getargspec() will fail on functions with keyword-only arguments, but a new method inspect.getfullargspec() supports them.

      There may be implications for our (best-effort) type-hints machinery.

      We should also add a Py3-only unit tests that covers DoFn's with keyword-only arguments once Beam Python 3 tests are in a good shape.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yoshiki.obata yoshiki obata
                Reporter:
                tvalentyn Valentyn Tymofieiev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 16.5h
                  16.5h