Skip to content

Remove OGC retry and deprecate OGC interruptions - #391

Open
thodson-usgs wants to merge 3 commits into
DOI-USGS:mainfrom
thodson-usgs:chore/retire-ogc-retry-shim
Open

Remove OGC retry and deprecate OGC interruptions#391
thodson-usgs wants to merge 3 commits into
DOI-USGS:mainfrom
thodson-usgs:chore/retire-ogc-retry-shim

Conversation

@thodson-usgs

@thodson-usgs thodson-usgs commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to review feedback on #387. This removes the obsolete dataretrieval.ogc.retry module and deprecates the public dataretrieval.ogc.interruptions import path after fan-out execution moved to the shared transport layer.

  • ogc.retry is removed because its remaining exports were private classifiers. Retry policy lives in dataretrieval.transport.retry.
  • ogc.interruptions remains as an identity-preserving compatibility shim because v1.2.0 exposed public exception classes from that path. Direct imports warn and name dataretrieval.interruptions or the top-level exceptions as replacements.
  • The deprecated path will be removed in a future major release, no earlier than 2027-08-25.
  • Ordinary import dataretrieval and import dataretrieval.ogc remain silent.
  • OGC docstrings now reference the current interruption module, and NEWS contains a concise migration note.

Validation

  • 38 focused contract and architecture tests passed.
  • 189 broader affected tests passed.
  • Fresh-process import and warning smoke tests passed.
  • Ruff lint/format and strict mypy passed.
  • Import-linter, Xenon, and complexipy passed.
  • All commit hooks passed.

Both modules became pure pass-throughs in d7b98eb, when fan-out execution
moved to the shared transport layer. Nothing in the package imports either
one: transport.fanout takes the classifiers from dataretrieval.interruptions
directly, and ogc/__init__ exposes neither module.

Remove ogc/retry.py. Its remaining surface was the two private classifiers
_classify_chunk_error and _classify_transient; the public RetryPolicy and
the _RETRY_* tunables that v1.2.0 published there were already dropped, so
the shim protected no import a caller is entitled to make. The
single-home guard moves to the classification leaf and now also asserts the
module stays gone.

Deprecate ogc/interruptions.py rather than deleting it. v1.2.0 defined
ChunkInterrupted, QuotaExhausted and ServiceInterrupted in that module, so
a pinned caller may still import from the path. It now warns on import,
follows the wateruse alias convention, and publishes a horizon in the
shared REMOVALS table. Only the path is deprecated -- ChunkInterrupted
remains a permanent alias of FanOutInterrupted, and the re-export forwards
rather than copies, so identity and except clauses are unaffected.

ogc/__init__ imports neither module, so import dataretrieval and import
dataretrieval.ogc stay silent.

Docstring cross-references in ogc/chunking.py and ogc/errors.py move to the
leaf so they do not dangle. ADR 0009's mention of ogc.retry is left alone
as a historical record.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread dataretrieval/ogc/interruptions.py
@thodson-usgs thodson-usgs changed the title Retire the OGC retry re-export, deprecate ogc.interruptions Remove obsolete OGC transport compatibility modules Aug 25, 2026
@thodson-usgs thodson-usgs changed the title Remove obsolete OGC transport compatibility modules Remove OGC retry and deprecate OGC interruptions Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants