jaraco / pip-run

pip-run - dynamic dependency loader for Python
MIT License
135 stars 20 forks source link

Exception handling in DepsReader.read_python is inconsistent #105

Closed jaraco closed 3 months ago

jaraco commented 3 months ago

In reviewing #102, I observed that DepsReader._read may raise some exceptions trapped by DepsReader.read_python:

https://github.com/jaraco/pip-run/blob/48dfc079f75198fb5714ec544efeec5a631dd9b8/pip_run/scripts.py#L147-L171

In one of the calls, a ValueError is suppressed, but in the other, a generic Exception is suppressed. My guess is that the latter is too broad. Let's clean that up and see if maybe there's a better abstraction to use.

/cc @bswck