Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functional API #303

Merged
merged 6 commits into from
Mar 21, 2024
Merged

Add functional API #303

merged 6 commits into from
Mar 21, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Mar 21, 2024

This adds functional API, proposed for CPython here: python/cpython#116608

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

@encukou
Copy link
Member Author

encukou commented Mar 21, 2024

“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
Copy link
Member

jaraco commented Mar 21, 2024

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

@jaraco jaraco merged commit c593cd9 into python:main Mar 21, 2024
13 of 14 checks passed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this module be private or should importing from importlib_resources.functional be allowed?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I don't recall if it was public before.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Private is probably better.

@encukou encukou deleted the functional branch March 22, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants