PropertySet.get deprecated in Python

dm-dev
Tags: #<Tag:0x00007ff62f02c560>

(Russell Owen) #1

As of RFC-434 and DM-13222 PropertySet.get and PropertyList.get are deprecated in Python and issue a warning to that effect. Use the new methods getScalar and getArray instead, depend if you want a single value or an array of values for numeric or string data

Also the asArray argument to get is gone. It was not being used (except incorrectly in one case).


(Robert Lupton) #2

The RFC only proposes generating warnings when all usage of get is gone. As this is a method that it used in code such as notebooks I expected that in practice we’d continue to support get; in practice it doesn’t seem to cause problems.

Until we have a better (dict-like?) interface, I don’t think we should be deprecating the relatively user-friendly interface.


(Russell Owen) #3

I just merged DM-14842 which fixes all package I know of to fix the deprecation warnings.