pgstac icon indicating copy to clipboard operation
pgstac copied to clipboard

item.pop("partition") leads to KeyError after retry

Open Zaczero opened this issue 9 months ago • 0 comments

https://github.com/stac-utils/pgstac/blob/13b7d8d3b4d2897d5450cf92d10910d40b4c4803/src/pypgstac/src/pypgstac/load.py#L329C29-L329C50

This piece of code mutates data in place, and after the first @retry, when https://github.com/stac-utils/pgstac/issues/363 is fixed, this will lead to a KeyError because partition was already popped. I also don't see much reason for mutating this data.

Zaczero avatar Mar 28 '25 15:03 Zaczero