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.
Files changed (61) hide show
  1. {gluetool-3.0 → gluetool-3.2}/PKG-INFO +1 -1
  2. {gluetool-3.0 → gluetool-3.2}/gluetool/action.py +4 -1
  3. {gluetool-3.0 → gluetool-3.2}/gluetool/glue.py +5 -4
  4. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_module_discovery.py +7 -4
  5. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_tool.py +4 -4
  6. gluetool-3.2/gluetool/version.py +7 -0
  7. {gluetool-3.0 → gluetool-3.2}/pyproject.toml +1 -1
  8. gluetool-3.0/gluetool/version.py +0 -7
  9. {gluetool-3.0 → gluetool-3.2}/README.rst +0 -0
  10. {gluetool-3.0 → gluetool-3.2}/assets/html-log/prism.css +0 -0
  11. {gluetool-3.0 → gluetool-3.2}/assets/html-log/prism.js +0 -0
  12. {gluetool-3.0 → gluetool-3.2}/assets/html-log/semantic.min.css +0 -0
  13. {gluetool-3.0 → gluetool-3.2}/assets/html-log/semantic.min.js +0 -0
  14. {gluetool-3.0 → gluetool-3.2}/gluetool/__init__.py +0 -0
  15. {gluetool-3.0 → gluetool-3.2}/gluetool/color.py +0 -0
  16. {gluetool-3.0 → gluetool-3.2}/gluetool/core.moduleinfo +0 -0
  17. {gluetool-3.0 → gluetool-3.2}/gluetool/help.py +0 -0
  18. {gluetool-3.0 → gluetool-3.2}/gluetool/html_log.py +0 -0
  19. {gluetool-3.0 → gluetool-3.2}/gluetool/log.py +0 -0
  20. {gluetool-3.0 → gluetool-3.2}/gluetool/proxy.py +0 -0
  21. {gluetool-3.0 → gluetool-3.2}/gluetool/py.typed +0 -0
  22. {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/__init__.py +0 -0
  23. {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/option_default.py +0 -0
  24. {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/shared_defined.py +0 -0
  25. {gluetool-3.0 → gluetool-3.2}/gluetool/pylint/unknown_option.py +0 -0
  26. {gluetool-3.0 → gluetool-3.2}/gluetool/result.py +0 -0
  27. {gluetool-3.0 → gluetool-3.2}/gluetool/sentry.py +0 -0
  28. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/__init__.py +0 -0
  29. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_config_root_a +0 -0
  30. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_config_root_b +0 -0
  31. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroot/config/data_not_unicode +0 -0
  32. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configroota/config/data_config_root_a +0 -0
  33. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/assets/parse_config/configrootb/config/data_config_root_b +0 -0
  34. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/conftest.py +0 -0
  35. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_core.py +0 -0
  36. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_error.py +0 -0
  37. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_eval_context.py +0 -0
  38. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_help.py +0 -0
  39. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_json.py +0 -0
  40. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_load_yaml.py +0 -0
  41. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_log_exception.py +0 -0
  42. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_logging.py +0 -0
  43. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_new_xml_element.py +0 -0
  44. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_normalize_option.py +0 -0
  45. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_option.py +0 -0
  46. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_parse_config.py +0 -0
  47. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_pipeline_step.py +0 -0
  48. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_render_template.py +0 -0
  49. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_requests.py +0 -0
  50. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_result.py +0 -0
  51. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_run_command.py +0 -0
  52. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_run_modules.py +0 -0
  53. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_treat_url.py +0 -0
  54. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_utils.py +0 -0
  55. {gluetool-3.0 → gluetool-3.2}/gluetool/tests/test_wait.py +0 -0
  56. {gluetool-3.0 → gluetool-3.2}/gluetool/tool.py +0 -0
  57. {gluetool-3.0 → gluetool-3.2}/gluetool/utils.py +0 -0
  58. {gluetool-3.0 → gluetool-3.2}/gluetool_modules/__init__.py +0 -0
  59. {gluetool-3.0 → gluetool-3.2}/gluetool_modules/bash_completion.py +0 -0
  60. {gluetool-3.0 → gluetool-3.2}/gluetool_modules/dep_list.py +0 -0
  61. {gluetool-3.0 → gluetool-3.2}/gluetool_modules/yaml_pipeline.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gluetool
3
- Version: 3.0
3
+ Version: 3.2
4
4
  Summary: Python framework for constructing command-line pipelines.
5
5
  Home-page: https://gluetool.readthedocs.org/
6
6
  License: BSD
@@ -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 pkg_resources.iter_entry_points(entry_point):
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
- self._register_module(registry, getattr(klass, 'group', ''), klass, ep_entry.dist.location)
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
- mock_ep = MagicMock(load=MagicMock(return_value=DummyModule), dist=MagicMock(location='dummy-filepath'))
78
- mock_iter_entry_points = MagicMock(return_value=[mock_ep])
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(pkg_resources, 'iter_entry_points', mock_iter_entry_points)
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 pkg_resources
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
- pkg_resources,
32
- 'get_distribution',
33
- MagicMock(return_value=MagicMock(version='some-version')),
31
+ importlib.metadata,
32
+ 'version',
33
+ MagicMock(return_value='some-version'),
34
34
  )
35
35
  assert tool._version == 'some-version'
36
36
 
@@ -0,0 +1,7 @@
1
+ from importlib.metadata import version, PackageNotFoundError
2
+
3
+ try:
4
+ __version__ = version('gluetool')
5
+
6
+ except PackageNotFoundError:
7
+ pass
@@ -4,7 +4,7 @@ dynamic = ["version"]
4
4
 
5
5
  [tool.poetry]
6
6
  name = "gluetool"
7
- version = "3.0"
7
+ version = "3.2"
8
8
  description = "Python framework for constructing command-line pipelines."
9
9
  authors = [
10
10
  "Milos Prchlik <mprchlik@redhat.com>",
@@ -1,7 +0,0 @@
1
- from pkg_resources import get_distribution, DistributionNotFound
2
-
3
- try:
4
- __version__ = get_distribution('gluetool').version
5
-
6
- except DistributionNotFound:
7
- pass
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