Skip to content

Commit

Permalink
Use importlib_metadata instead of importlib.metadata
Browse files Browse the repository at this point in the history
Make it backward compatible with every supported Python version.
Could be a fix to #545.
  • Loading branch information
gentooboontoo committed Nov 19, 2023
1 parent f5e257d commit d1d02c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pygal/__init__.py
Expand Up @@ -28,7 +28,8 @@
import sys
import traceback
import warnings
from importlib.metadata import entry_points

from importlib_metadata import entry_points

from pygal import maps
from pygal.config import Config
Expand Down
2 changes: 1 addition & 1 deletion pygal/test/test_maps.py
Expand Up @@ -18,7 +18,7 @@
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""Map plugins tests are imported here"""

from importlib.metadata import entry_points
from importlib_metadata import entry_points

# Load plugins tests
for entry in entry_points(group="pygal.test.test_maps"):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -9,6 +9,7 @@ deps =
lxml
pyquery
cairosvg
importlib_metadata

setenv =
COVERAGE_FILE=.cov-{envname}
Expand Down

0 comments on commit d1d02c6

Please sign in to comment.