Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4510

Regression in 0.11: Arrays with default values in python

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 0.11.0
    • None
    • Python - Compiler
    • None

    Description

      We are getting reports from users that our project is broken on thrift 0.11.  Arrays with default values are newly broken in 0.11 because thrift_spec is not defined soon enough.

       

      To reproduce:

       
      brew install thrift
      git clone https://github.com/caffe2/BlueWhale.git
      cd BlueWhale
      thrift --gen py --out . ml/rl/thrift/core.thrift
      cat ml/rl/thrift/core/ttypes.py
       
      Notice that the TrainingParameters._init_ tries to use thrift_spec to handle the default array when thrift_spec doesn't exist yet.  This results in this failure upon import:
       
      AttributeError: 'TrainingParameters' object has no attribute 'thrift_spec'
       
      The same thing works when using 0.10

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              jgmath2000 Jason Gauci
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: