Skip to content

MAINT: consolidate duplicate image URL download handling - #2687

Open
Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/2417-image-url-download
Open

Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/2417-image-url-download

Conversation

@u7k4rs6

Copy link
Copy Markdown
Contributor

Summary

Consolidates the duplicated async image URL download implementation used by image converters.

Changes

  • Added a private shared _download_image_from_url_async() helper.
  • Retained _read_image_from_url_async() on both converter classes as protected extension points.
  • Preserved dynamic subclass override behavior.
  • Preserved existing aiohttp error handling, exception chaining, cancellation propagation, and raw byte behavior.
  • Added focused tests for download behavior, error handling, cancellation, delegation, and subclass compatibility.

Compatibility

No public API or inheritance changes.

Existing callers and subclasses that override or patch _read_image_from_url_async() continue to use the same protected hook.

Validation

  • 85 focused converter tests passed
  • Ruff check passed
  • Ruff format check passed
  • Ty checks for changed converter/helper files passed
  • git diff --check passed

Fixes #2417

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.

MAINT Consolidate duplicate image URL download handling

1 participant