google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
71 stars 21 forks source link

Switch from pkgutil to importlib.resources. #111

Closed reventlov closed 7 months ago

reventlov commented 7 months ago

For loading resources, use importlib.resources.files() instead of pkgutil.get_data(). This works across project boundaries with Bazel 7, as well as through the embossc driver.

Also packaged resource loading into a utility function, so that further changes can be more easily accomodated.