From d54c3fbc4ed7d8ecd2842c84ad6b7c44d63fa670 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 8 Nov 2023 20:07:38 +0100 Subject: [PATCH] Use entry_points directly instead of as dict This is necessary to silence a python 3.12 deprecation warning. --- pygal/__init__.py | 2 +- pygal/test/test_maps.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pygal/__init__.py b/pygal/__init__.py index 5bef45de..8cf6b7b1 100644 --- a/pygal/__init__.py +++ b/pygal/__init__.py @@ -61,7 +61,7 @@ from pygal.graph.map import BaseMap -for entry in entry_points().get('pygal.maps', ()): +for entry in entry_points(group="pygal.maps"): try: module = entry.load() except Exception: diff --git a/pygal/test/test_maps.py b/pygal/test/test_maps.py index fa0f7f46..2ad54027 100644 --- a/pygal/test/test_maps.py +++ b/pygal/test/test_maps.py @@ -21,7 +21,7 @@ from importlib.metadata import entry_points # Load plugins tests -for entry in entry_points().get('pygal.test.test_maps', ()): +for entry in entry_points(group="pygal.test.test_maps"): module = entry.load() for k, v in module.__dict__.items(): if k.startswith('test_'):