Uploaded image for project: ' Swift for TensorFlow'
  1. Swift for TensorFlow
  2. TF-416

[Python] Produce error upon second usage of `PythonLibrary.useVersion`

    XMLWordPrintable

    Details

      Description

      PythonLibrary.useVersion can only be used to select the Python-library-version-to-load before any usages of Python. It does not support dynamically swift Python version - more context in TF-415.

      However, the name useVersion is misleading - people may believe that it can be used to dynamically switch Python version.

      To catch some misuses, a precondition error should be produced when PythonLibrary.useVersion is called for the second time.

      (Note: the ideal precondition error is "PythonLibrary.useVersion" should not be called after any Python library symbols have been loaded.)

        Attachments

          Activity

            People

            Assignee:
            lukereichold Luke Reichold
            Reporter:
            danzheng Dan Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: