The rio_cogeo.cogeo.info function used to return a dictionary but as of 2.2.0 returns a pydantic model. This causes a breaking change because before 2.2.0 the caller would access the output of info using dictionary indexing (info["GEO"]["CRS"]) but pydantic requires dot notation (info.GEO.CRS).
The
rio_cogeo.cogeo.info
function used to return a dictionary but as of 2.2.0 returns a pydantic model. This causes a breaking change because before 2.2.0 the caller would access the output ofinfo
using dictionary indexing (info["GEO"]["CRS"]
) but pydantic requires dot notation (info.GEO.CRS
).This was the solution in
rio-tiler
when it was migrated to pydantic models: https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/models.py#L37-L39