mirror of
https://github.com/pretix/pretix.git
synced 2026-09-13 16:14:40 +00:00
Migrate from pkg_resources to importlib (#3232)
This commit is contained in:
@@ -41,9 +41,9 @@ from urllib.parse import urlparse
|
||||
from json import loads
|
||||
|
||||
import django.conf.locale
|
||||
import importlib_metadata as metadata
|
||||
from django.utils.crypto import get_random_string
|
||||
from kombu import Queue
|
||||
from pkg_resources import iter_entry_points
|
||||
from pycountry import currencies
|
||||
|
||||
from . import __version__
|
||||
@@ -401,11 +401,11 @@ except ImportError:
|
||||
pass
|
||||
|
||||
PLUGINS = []
|
||||
for entry_point in iter_entry_points(group='pretix.plugin', name=None):
|
||||
if entry_point.module_name in PRETIX_PLUGINS_EXCLUDE:
|
||||
for entry_point in metadata.entry_points(group='pretix.plugin'):
|
||||
if entry_point.module in PRETIX_PLUGINS_EXCLUDE:
|
||||
continue
|
||||
PLUGINS.append(entry_point.module_name)
|
||||
INSTALLED_APPS.append(entry_point.module_name)
|
||||
PLUGINS.append(entry_point.module)
|
||||
INSTALLED_APPS.append(entry_point.module)
|
||||
|
||||
HIJACK_PERMISSION_CHECK = "hijack.permissions.superusers_and_staff"
|
||||
HIJACK_INSERT_BEFORE = None
|
||||
|
||||
Reference in New Issue
Block a user