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

adapt to new import.metadata.entry_points API #53

Merged
merged 1 commit into from
Oct 22, 2022

Conversation

bertsky
Copy link
Contributor

@bertsky bertsky commented Oct 18, 2022

This fixes a regression which prevents running OCR-D Browser on Python < 3.10 and >= 3.8.

The reason is an ill-conceived change in the importlib.metadata API: Starting with importlib_metadata>=5.0 (recently released), you can no longer directly use the old API, which directly accesses the dict from entry_points(). Alas, the new API is not available in native importlib.metadata for Python 3.8 and Python 3.9.

There is a backport shim specifically for that problem, but I really resent that additional complication.

I therefore just switched to importlib_metadata >= 3.6 and the new API throughout.

@bertsky
Copy link
Contributor Author

bertsky commented Oct 18, 2022

@hnesk I have not tested this on Python 3.10 yet. Your CI also does not include a setup for that version, but more importantly, somehow the PR does not even trigger the CI workflow… EDIT it does (was only delayed)

@hnesk hnesk merged commit 0a97c95 into hnesk:master Oct 22, 2022
@hnesk
Copy link
Owner

hnesk commented Oct 22, 2022

What a mess, thanks for fixing @bertsky !

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.

2 participants