importlib helpers don't provide importlib.thing, but importlib_thing

Fix everywhere.
This commit is contained in:
James R. Barlow
2021-09-14 00:15:07 -07:00
parent 3534742ef9
commit 4d67812d51
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from importlib.metadata import version as _package_version
from importlib_metadata import version as _package_version
PROGRAM_NAME = 'ocrmypdf'
+2 -2
View File
@@ -10,10 +10,10 @@ Utilities for PDF/A production and confirmation with Ghostspcript.
"""
import base64
import importlib.resources
from pathlib import Path
from typing import Dict, Iterator, Union
import importlib_resources
import pikepdf
import pkg_resources # deprecated
@@ -104,7 +104,7 @@ def generate_pdfa_ps(target_filename: Path, icc: str = 'sRGB'):
if icc != 'sRGB':
raise NotImplementedError("Only supporting sRGB")
bytes_icc_profile = importlib.resources.read_binary(
bytes_icc_profile = importlib_resources.read_binary(
'ocrmypdf.data', SRGB_ICC_PROFILE_NAME
)
ps = '\n'.join(_make_postscript(icc, bytes_icc_profile, 3))