python / importlib_resources

Backport of the importlib.resources module
Apache License 2.0
64 stars 44 forks source link

Add functional API #303

Closed encukou closed 7 months ago

encukou commented 7 months ago

This adds functional API, proposed for CPython here: https://github.com/python/cpython/issues/116608

I tested locally using tox, which probably doesn't match the CI checks.

encukou commented 7 months ago

“Collateral” tests fail with:

importlib_resources/functional.py (62.5%): Missing lines 3,5,8,11,16,23,28,35,40,48,63,78
importlib_resources/tests/test_functional.py (98.2%): Missing lines 7,9

These are top-level statements (mostly def), and an alternate import for old Python versions. I'm not familiar with the coverage tooling, and would appreciate a hint on how to fix this. (Or feel free to push a fix directly to the PR.)

jaraco commented 7 months ago

The diffcov tests can be ignored. I've opened #304 to track.