Commit a13a656 1 parent b1bf88f commit a13a656 Copy full SHA for a13a656
File tree 4 files changed +8
-13
lines changed
4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 32
32
files : ' src/.*\.py$'
33
33
additional_dependencies :
34
34
- types-requests
35
- - types-pkg_resources
36
35
- types-pyyaml
37
36
38
37
- repo : https://github.com/python-poetry/poetry
Original file line number Diff line number Diff line change 11
11
import logging
12
12
import signal
13
13
import sys
14
+ from importlib .metadata import entry_points
14
15
15
- import pkg_resources
16
16
import workflows .recipe .wrapper
17
17
import workflows .services .common_service
18
18
import workflows .transport
@@ -40,9 +40,7 @@ def run():
40
40
zc = zocalo .configuration .from_file ()
41
41
zc .activate ()
42
42
43
- known_wrappers = {
44
- e .name : e .load for e in pkg_resources .iter_entry_points ("zocalo.wrappers" )
45
- }
43
+ known_wrappers = {e .name : e .load for e in entry_points (group = "zocalo.wrappers" )}
46
44
47
45
# Set up parser
48
46
parser = argparse .ArgumentParser (usage = "zocalo.wrap [options]" )
Original file line number Diff line number Diff line change 9
9
import os
10
10
import pathlib
11
11
import typing
12
+ from importlib .metadata import entry_points
12
13
13
14
import marshmallow as mm
14
- import pkg_resources
15
15
import yaml
16
16
17
17
import zocalo .configuration .argparse
@@ -56,7 +56,7 @@ def _check_valid_plugin_name(name: str) -> bool:
56
56
57
57
_configuration_plugins = {
58
58
e .name : e
59
- for e in pkg_resources . iter_entry_points ( "zocalo.configuration.plugins" )
59
+ for e in entry_points ( group = "zocalo.configuration.plugins" )
60
60
if _check_valid_plugin_name (e .name )
61
61
}
62
62
Original file line number Diff line number Diff line change 8
8
import time
9
9
import timeit
10
10
import uuid
11
+ from importlib .metadata import entry_points
11
12
12
- import pkg_resources
13
13
import workflows .recipe
14
14
from workflows .services .common_service import CommonService
15
15
@@ -110,9 +110,7 @@ def initializing(self):
110
110
self .message_filters = {
111
111
** {
112
112
f .name : f .load ()
113
- for f in pkg_resources .iter_entry_points (
114
- "zocalo.services.dispatcher.filters"
115
- )
113
+ for f in entry_points (group = "zocalo.services.dispatcher.filters" )
116
114
},
117
115
"load_custom_recipe" : self .filter_load_custom_recipe ,
118
116
"load_recipes_from_files" : self .filter_load_recipes_from_files ,
@@ -121,8 +119,8 @@ def initializing(self):
121
119
122
120
self .ready_for_processing = {
123
121
f .name : f .load ()
124
- for f in pkg_resources . iter_entry_points (
125
- "zocalo.services.dispatcher.ready_for_processing"
122
+ for f in entry_points (
123
+ group = "zocalo.services.dispatcher.ready_for_processing"
126
124
)
127
125
}
128
126
You can’t perform that action at this time.
0 commit comments