PDAL / python

PDAL's Python Support
Other
117 stars 35 forks source link

pdal.Pipeline no longer has json kwarg #119

Closed j9ac9k closed 2 years ago

j9ac9k commented 2 years ago

Filing at @hobu 's request

In the python PDAL bindings, it appears the current version (3.1.2) does not know about the json keyword argument

>>> import pdal
>>> pdal.__version__
'3.1.2'
>>> dummy = [{"a", "b"}]
>>> pdal.Pipeline(json=dummy)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'json'
>>>
hobu commented 2 years ago

I think this might have been dropped as part of the 3.0 refactor. We should put it back and silently forward things so as not to break existing code.

gsakkis commented 2 years ago

The functionality is still there, it's just renamed to spec since the first parameter accepts more than json strings now.

hobu commented 2 years ago

I wonder if we should put back the json alias. Maybe it doesn't matter that much. I'll let this ticket stew for a bit.

j9ac9k commented 2 years ago

FWIW I'm definitely team json alias here, that's public API and if it is desired to be removed, it should have a deprecation warning emitted with the suggested alternative usage and ideally a future version or date where the keyword argument will actually be removed.

Then again, nobody opened an issue beforehand so maybe not as big of a deal.