Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove support for python2.7 #62

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a separate file because black doesn't run on Python 2, eveb though it
# supports formatting Python 2 syntax.
flake8==4.0.1
black==22.3.0
isort~=5.10.1
flake8~=7.0.0
black~=24.4.2
isort~=5.13.2
2 changes: 1 addition & 1 deletion sumologic_collectd_metrics/metrics_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def convert_to_metrics(data, data_set, sep, extra_dimensions=None):
metric_dimension = _gen_metric_dimension(data, sep)
meta_tags = _gen_meta_tags(data)

for (value, data_type) in zip(data.values, data_set):
for value, data_type in zip(data.values, data_set):
if math.isnan(value):
continue

Expand Down
2 changes: 1 addition & 1 deletion sumologic_collectd_metrics/metrics_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _build_header(self):
HeaderKeys.x_sumo_host,
HeaderKeys.x_sumo_category,
]
for (config_key, header_key) in zip(sumo_config_keys, sumo_header_keys):
for config_key, header_key in zip(sumo_config_keys, sumo_header_keys):
if config_key in config_keys:
headers[header_key] = self.conf[config_key]

Expand Down
2 changes: 1 addition & 1 deletion test/collectd/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def signalfx_statsd_tags_node():

@staticmethod
def parse_configs(met_config, configs):
for (key, value) in configs.items():
for key, value in configs.items():
node = ConfigNode(getattr(ConfigOptions, key), [value])
config = CollectdConfig([Helper.url_node(), node])
met_config.parse_config(config)
2 changes: 1 addition & 1 deletion test/collectd/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def metrics_str(self, sep="."):
sep.join(v for v in (self.type, self.type_instance) if v)
)

for (ds_name, ds_type) in zip(self.ds_names, self.ds_types):
for ds_name, ds_type in zip(self.ds_names, self.ds_types):
if not self.meta:
metrics.append(
"host=%s plugin=%s plugin_instance=%s type=%s type_instance=%s "
Expand Down
4 changes: 2 additions & 2 deletions test/test_metrics_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_parse_string_config():

Helper.parse_configs(met_config, configs)

for (key, value) in configs.items():
for key, value in configs.items():

assert met_config.conf[getattr(ConfigOptions, key)] == value

Expand All @@ -118,7 +118,7 @@ def test_parse_int_config():

Helper.parse_configs(met_config, configs)

for (key, value) in configs.items():
for key, value in configs.items():

assert met_config.conf[getattr(ConfigOptions, key)] == int(value)

Expand Down
2 changes: 1 addition & 1 deletion test/test_metrics_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_post_normal_addition_dimensions_metadata():
"dimension_tags": ("dim_key1", "dim_val1", "dim_key2", "dim_val2"),
"meta_tags": ("meta_key1", "meta_val1", "meta_key2", "meta_val2"),
}
for (key, value) in configs.items():
for key, value in configs.items():
node = ConfigNode(getattr(ConfigOptions, key), value)
config = CollectdConfig([Helper.url_node(), node])
met_config.parse_config(config)
Expand Down
Loading