digitalbazaar / digitalbazaar/pyld

Use `FrozenDocumentLoader` when HTTP loaders are unavailable

Open
#307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
683
Forks
138
Avg merge
2d 14h
Merged PRs (30d)
15

Description

At import time, PyLD currently selects RequestsDocumentLoader when requests is installed, AioHttpDocumentLoader when aiohttp is installed, and otherwise a dummy loader that raises on use.

Consider using FrozenDocumentLoader as the third fallback so bundled contexts remain available when neither HTTP dependency is installed.

This would change the fallback behavior for URLs outside BUNDLED_CONTEXTS, so assess compatibility, error behavior, default-loader documentation, and tests before implementation.

Origin: https://github.com/digitalbazaar/pyld/pull/301#discussion_r3747476238

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at PyLD's import-time default-loader selection and inspect FrozenDocumentLoader, BUNDLED_CONTEXTS, and the existing dummy fallback. Check default-loader documentation and tests for bundled and non-bundled URLs; done means compatibility and error behavior are covered and the fallback is validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.