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

Migrate away from deprecated pkg_resources #1533

Merged
merged 1 commit into from
Apr 9, 2023

Conversation

flit
Copy link
Member

@flit flit commented Apr 9, 2023

This patch replaces use of pkg_resources with the replacements, importlib.resources and importlib_metadata. Note that importlib_metadata is used instead of the standard lib importlib.metadata because the selectable .entry_points() API is desired, and that is only available from importlib_metadata version 3.6 included since Python 3.10.

A small unit test for loading builtin SVD data is added.

@flit flit force-pushed the bugfix/deprecated_pkg_resources branch from 3ad5639 to 6da0009 Compare April 9, 2023 19:42
- pkg_resources is deprecated; switch to importlib replacements.
- importlib_metadata is used instead of stdlib importlib.metadata because we want the
selectable entry_points() API that is only available with importlib.metadata
from Python 3.10 or importlib_metadata 3.6+.
- Similarly, importlib_resources is used instal of importlib.resources
to get access to the latest API on all supported Python versions.
- Add a basic unit test to ensure loading of builtin SVD files works.
@flit flit force-pushed the bugfix/deprecated_pkg_resources branch from 6da0009 to 8976b76 Compare April 9, 2023 20:22
@flit flit merged commit df13269 into pyocd:develop Apr 9, 2023
flit pushed a commit that referenced this pull request Aug 5, 2023
Search only for the length of control block ID.

Fixes #1533
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.

1 participant