From f45c42d34324a79ed776e949103530c1f4e0042e Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Mon, 9 Mar 2026 19:50:36 -0400 Subject: [PATCH] modified: remarkbox/__init__.py modified: requirements.py3.txt --- remarkbox/__init__.py | 10 +++++----- requirements.py3.txt | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/remarkbox/__init__.py b/remarkbox/__init__.py index e1a6701..c97efc5 100644 --- a/remarkbox/__init__.py +++ b/remarkbox/__init__.py @@ -26,7 +26,7 @@ from pyramid.session import SignedCookieSessionFactory import re # needed to load themes. -from pkg_resources import iter_entry_points +from importlib.metadata import entry_points import logging import os @@ -139,10 +139,10 @@ def get_children_settings(settings, parent_key): def load_entry_points(group_name): """Return a dictionary of entry_points related to given group_name""" - entry_points = {} - for entry_point in iter_entry_points(group=group_name, name=None): - entry_points[entry_point.name] = entry_point.load() - return entry_points + result = {} + for ep in entry_points(group=group_name): + result[ep.name] = ep.load() + return result def load_jinja2_themes(config): diff --git a/requirements.py3.txt b/requirements.py3.txt index 35cb65b..e05245f 100644 --- a/requirements.py3.txt +++ b/requirements.py3.txt @@ -2,8 +2,7 @@ six # Python 3.12+ no longer bundles setuptools in venvs. -# Pyramid imports pkg_resources which was removed in setuptools 81+. -setuptools<81 +setuptools # Pyramid. plaster_pastedeploy