fix: bind allowlisted extensions to discovered sources - #362
codeforester wants to merge 1 commit into
Conversation
| entry_point = self._entry_point_cache.get(descriptor) | ||
| if entry_point is None: | ||
| raise ImportError("approved entry point disappeared before it could be loaded") | ||
| try: |
There was a problem hiding this comment.
Robustness (minor): _load_descriptor() only catches (AttributeError, TypeError, ValueError) around _descriptor_from_entry_point, but re-reading a real Distribution's metadata can raise other exceptions (e.g. FileNotFoundError, zipfile.BadZipFile) if the package's dist-info changes between discovery and load. Still fails closed via the broader except Exception in load(), but loses the specific 'identity changed' diagnostic this PR was written to provide.
|
Additional finding (concern spans code not fully covered by this diff's hunks, so not postable as an inline comment):
|
Summary
Closes #340
Validation
uv run --extra dev --extra typer --extra quality python -m pytest tests/test_extensions.py -qgit diff --check