digitalbazaar / digitalbazaar/pyld
Use `FrozenDocumentLoader` when HTTP loaders are unavailable
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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