Closed podgorniy94 closed 4 months ago
I don't think all of our currently supported platforms have importlib.metadata
, so this will likely fail CI, but we'll see...
@akx you are right, it should try pkg_resources
first and if it is not there, then try importlib.metadata
and if it is not there, then do the fallback to predefined list
Another fallback was needed, this time for importlib.metadata
, specifically for entry_points()
.
Error message:
AttributeError: 'str' object has no attribute 'group'
According to the documentation:
Compatibility The "selectable" entry points were introduced in importlib_metadata 3.6 and Python 3.10. Prior to those changes, entry_points accepted no parameters and always returned a dictionary of entry points, keyed by group. With importlib_metadata 5.0 and Python 3.12, entry_points always returns an EntryPoints object. See backports.entry_points_selectable for compatibility options.
Attention: Patch coverage is 69.69697%
with 10 lines
in your changes missing coverage. Please review.
Project coverage is 90.87%. Comparing base (
e0d1018
) to head (8f9e1de
). Report is 17 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
babel/messages/checkers.py | 64.70% | 6 Missing :warning: |
babel/messages/extract.py | 75.00% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@akx I'm preparing fixes, as I see you are planning to finish the update. I needed to let you know that I'm working on it and plan to finish it
@podgorniy94 I wasn't sure you were doing that, so please just see #1102 instead – the commit has you as a co-author :)
PyBabel currently fails to work with Python 3.12 when using third-party extractors. Specifically, the extraction method for Jinja2 templates throws a ValueError:
This issue does not occur with Python 3.11, where the same setup functions correctly.
Issue: https://github.com/python-babel/babel/issues/861