Background
PR 7 of issue #1984 ran the four deprecation slices in warning-only mode:
Each emission still lands on DataArray.attrs; each emission also fires a DeprecationWarning pointing at this issue. The four slices documented removal as "scheduled for a future release."
After the next release ships and the warning-only window closes, the read-side emission of those 13 attrs needs to be removed.
Proposal
Land one PR per slice (mirrors the warning-only structure), each containing:
- Remove the emission in
xrspatial/geotiff/_attrs.py::_populate_attrs_from_geo_info: drop the _emit_deprecated_* call.
- Update the locking tests in
xrspatial/geotiff/tests/test_attrs_contract_passthrough_1984.py: the affected attrs move from "expected to drop" (because of writer gap) to "never emitted" (reader no longer surfaces them at all). Update _ALL_PASSTHROUGH_KEYS and _PASSTHROUGH_CASES accordingly.
- Drop the warning-only tests
test_attrs_pr7_deprecate_*_1984.py once the corresponding reader emission is gone.
- Update the docstring + RST so the deprecated keys move from "Deprecated" to a brief "Removed in vX.Y" historical note.
- Bump
_ATTRS_CONTRACT_VERSION from 1 to 2 in the final slice that lands (whichever is last). Update test_attrs_contract_version_1984.py to pin 2.
- CHANGELOG: one entry per slice noting the removal.
Alternative: one consolidated removal PR. Smaller diff overall, but a single review across four tiers. The split mirrors the deprecation-phase split and lets reviewers focus per axis.
Acceptance criteria
- Reading a TIFF carrying any of the 13 secondary GeoKey / palette attrs returns a
DataArray whose attrs does NOT contain the removed key.
- No
DeprecationWarning for any of the 13 attrs anywhere in the read paths.
attrs['_xrspatial_geotiff_contract'] == 2 on every read.
- The four warning-only test files have been deleted (their behaviour is now "attr is absent" pinned by the passthrough locking test).
docs/source/user_guide/attrs_contract.rst reflects the new state: deprecated tier is empty or removed; an "Historical: removed in vX.Y" footnote lives elsewhere (or in the changelog).
- Downstream
xrspatial.geotiff test suite passes with no warnings for the removed attrs.
Sequencing
This work must wait until the deprecation warning has shipped in at least one tagged release so external callers have had a chance to migrate. Once that release goes out, label this issue as ready and the four slices can land in parallel.
Migration safety
External callers reading those attrs after removal will see KeyError if they access them with attrs[key] instead of attrs.get(key). The deprecation warning text in PR 7 explicitly tells callers to migrate to crs / crs_wkt plus pyproj (or to attrs['colormap'] plus a one-liner for the matplotlib variants), and docs/source/user_guide/attrs_contract.rst carries the recipes. No silent behavioral change should reach an unprepared caller.
Refs #1984.
Background
PR 7 of issue #1984 ran the four deprecation slices in warning-only mode:
vertical_crs,vertical_citation,vertical_units)crs_name,geog_citation,datum_code,angular_units,semi_major_axis,inv_flattening)linear_units,projection_code)colormap_rgba,cmap)Each emission still lands on
DataArray.attrs; each emission also fires aDeprecationWarningpointing at this issue. The four slices documented removal as "scheduled for a future release."After the next release ships and the warning-only window closes, the read-side emission of those 13 attrs needs to be removed.
Proposal
Land one PR per slice (mirrors the warning-only structure), each containing:
xrspatial/geotiff/_attrs.py::_populate_attrs_from_geo_info: drop the_emit_deprecated_*call.xrspatial/geotiff/tests/test_attrs_contract_passthrough_1984.py: the affected attrs move from "expected to drop" (because of writer gap) to "never emitted" (reader no longer surfaces them at all). Update_ALL_PASSTHROUGH_KEYSand_PASSTHROUGH_CASESaccordingly.test_attrs_pr7_deprecate_*_1984.pyonce the corresponding reader emission is gone._ATTRS_CONTRACT_VERSIONfrom1to2in the final slice that lands (whichever is last). Updatetest_attrs_contract_version_1984.pyto pin2.Alternative: one consolidated removal PR. Smaller diff overall, but a single review across four tiers. The split mirrors the deprecation-phase split and lets reviewers focus per axis.
Acceptance criteria
DataArraywhoseattrsdoes NOT contain the removed key.DeprecationWarningfor any of the 13 attrs anywhere in the read paths.attrs['_xrspatial_geotiff_contract'] == 2on every read.docs/source/user_guide/attrs_contract.rstreflects the new state: deprecated tier is empty or removed; an "Historical: removed in vX.Y" footnote lives elsewhere (or in the changelog).xrspatial.geotifftest suite passes with no warnings for the removed attrs.Sequencing
This work must wait until the deprecation warning has shipped in at least one tagged release so external callers have had a chance to migrate. Once that release goes out, label this issue as ready and the four slices can land in parallel.
Migration safety
External callers reading those attrs after removal will see
KeyErrorif they access them withattrs[key]instead ofattrs.get(key). The deprecation warning text in PR 7 explicitly tells callers to migrate tocrs/crs_wktplus pyproj (or toattrs['colormap']plus a one-liner for the matplotlib variants), anddocs/source/user_guide/attrs_contract.rstcarries the recipes. No silent behavioral change should reach an unprepared caller.Refs #1984.