gluetool 3.0__tar.gz → 3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gluetool-3.0 → gluetool-3.2}/PKG-INFO +1 -1
- {gluetool-3.0 → gluetool-3.2}/gluetool/action.py +4 -1
- {gluetool-3.0 → gluetool-3.2}/gluetool/glue.py +5 -4
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_module_discovery.py +7 -4
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_tool.py +4 -4
- gluetool-3.2/gluetool/version.py +7 -0
- {gluetool-3.0 → gluetool-3.2}/pyproject.toml +1 -1
- gluetool-3.0/gluetool/version.py +0 -7
- {gluetool-3.0 → gluetool-3.2}/README.rst +0 -0
- {gluetool-3.0 → gluetool-3.2}/assets/html-log/prism.css +0 -0
- {gluetool-3.0 → gluetool-3.2}/assets/html-log/prism.js +0 -0
- {gluetool-3.0 → gluetool-3.2}/assets/html-log/semantic.min.css +0 -0
- {gluetool-3.0 → gluetool-3.2}/assets/html-log/semantic.min.js +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/__init__.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/color.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/core.moduleinfo +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/help.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/html_log.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/log.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/proxy.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/py.typed +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/__init__.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/option_default.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/shared_defined.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/unknown_option.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/result.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/sentry.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/__init__.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_config_root_a +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_config_root_b +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_not_unicode +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroota/config/data_config_root_a +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configrootb/config/data_config_root_b +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/conftest.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_core.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_error.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_eval_context.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_help.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_json.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_load_yaml.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_log_exception.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_logging.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_new_xml_element.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_normalize_option.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_option.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_parse_config.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_pipeline_step.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_render_template.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_requests.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_result.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_run_command.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_run_modules.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_treat_url.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_utils.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_wait.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/tool.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool/utils.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool_modules/__init__.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool_modules/bash_completion.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool_modules/dep_list.py +0 -0
- {gluetool-3.0 → gluetool-3.2}/gluetool_modules/yaml_pipeline.py +0 -0
|
@@ -58,9 +58,12 @@ from .log import Logging
|
|
|
58
58
|
from .result import Result
|
|
59
59
|
|
|
60
60
|
try:
|
|
61
|
+
if os.getenv('GLUETOOL_TRACING_DISABLE'):
|
|
62
|
+
raise ImportError('Tracing is disabled')
|
|
63
|
+
|
|
61
64
|
import jaeger_client as tracing_client
|
|
62
65
|
|
|
63
|
-
except ImportError:
|
|
66
|
+
except (ImportError, AttributeError):
|
|
64
67
|
tracing_client = None
|
|
65
68
|
|
|
66
69
|
# Type annotations
|
|
@@ -12,6 +12,7 @@ import sys
|
|
|
12
12
|
import configparser
|
|
13
13
|
import io
|
|
14
14
|
|
|
15
|
+
import importlib.metadata
|
|
15
16
|
import importlib.util
|
|
16
17
|
|
|
17
18
|
from functools import partial
|
|
@@ -20,7 +21,6 @@ from six import iterkeys, itervalues, iteritems, ensure_str, text_type
|
|
|
20
21
|
|
|
21
22
|
import jinja2
|
|
22
23
|
import mock
|
|
23
|
-
import pkg_resources
|
|
24
24
|
|
|
25
25
|
from .action import Action
|
|
26
26
|
from .color import Colors, switch as switch_colors
|
|
@@ -2394,13 +2394,14 @@ class Glue(Configurable):
|
|
|
2394
2394
|
|
|
2395
2395
|
self.debug('discovering modules in entry point {}'.format(entry_point))
|
|
2396
2396
|
|
|
2397
|
-
for ep_entry in
|
|
2397
|
+
for ep_entry in importlib.metadata.entry_points(group=entry_point):
|
|
2398
2398
|
klass = ep_entry.load()
|
|
2399
2399
|
|
|
2400
2400
|
assert ep_entry.dist is not None
|
|
2401
|
-
assert ep_entry.dist.location is not None
|
|
2402
2401
|
|
|
2403
|
-
|
|
2402
|
+
location = str(ep_entry.dist.locate_file(''))
|
|
2403
|
+
|
|
2404
|
+
self._register_module(registry, getattr(klass, 'group', ''), klass, location)
|
|
2404
2405
|
|
|
2405
2406
|
def discover_modules(self,
|
|
2406
2407
|
entry_points: Optional[List[str]] = None,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# pylint: disable=blacklisted-name
|
|
2
2
|
|
|
3
|
+
import importlib.metadata
|
|
3
4
|
import logging
|
|
5
|
+
|
|
4
6
|
import pytest
|
|
5
7
|
|
|
6
8
|
import gluetool
|
|
7
|
-
import pkg_resources
|
|
8
9
|
|
|
9
10
|
from mock import MagicMock
|
|
10
11
|
|
|
@@ -74,10 +75,12 @@ def test_register_module_name_conflict(log, glue):
|
|
|
74
75
|
def test_discover_gm_in_entry(log, monkeypatch, glue):
|
|
75
76
|
registry = {}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
mock_dist = MagicMock()
|
|
79
|
+
mock_dist.locate_file.return_value = 'dummy-filepath'
|
|
80
|
+
mock_ep = MagicMock(load=MagicMock(return_value=DummyModule), dist=mock_dist)
|
|
81
|
+
mock_entry_points = MagicMock(return_value=[mock_ep])
|
|
79
82
|
|
|
80
|
-
monkeypatch.setattr(
|
|
83
|
+
monkeypatch.setattr(importlib.metadata, 'entry_points', mock_entry_points)
|
|
81
84
|
|
|
82
85
|
glue._discover_gm_in_entry_point('dummy-entry-point', registry)
|
|
83
86
|
|
|
@@ -7,7 +7,7 @@ import re
|
|
|
7
7
|
import signal
|
|
8
8
|
import subprocess
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import importlib.metadata
|
|
11
11
|
import pytest
|
|
12
12
|
from mock import MagicMock
|
|
13
13
|
|
|
@@ -28,9 +28,9 @@ def test_basic(monkeypatch, tool):
|
|
|
28
28
|
assert tool.gluetool_config_paths == gluetool.tool.DEFAULT_GLUETOOL_CONFIG_PATHS
|
|
29
29
|
|
|
30
30
|
monkeypatch.setattr(
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
MagicMock(return_value=
|
|
31
|
+
importlib.metadata,
|
|
32
|
+
'version',
|
|
33
|
+
MagicMock(return_value='some-version'),
|
|
34
34
|
)
|
|
35
35
|
assert tool._version == 'some-version'
|
|
36
36
|
|
gluetool-3.0/gluetool/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_not_unicode
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|