Skip to content

Commit

Permalink
remove pyyaml2 (netdata#18404)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Aug 24, 2024
1 parent bb29dbf commit 313f18b
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 5,855 deletions.
1 change: 0 additions & 1 deletion .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
exclude_paths:
- src/collectors/python.d.plugin/python_modules/pyyaml2/**
- src/collectors/python.d.plugin/python_modules/pyyaml3/**
- src/collectors/python.d.plugin/python_modules/urllib3/**
- src/collectors/python.d.plugin/python_modules/third_party/**
Expand Down
14 changes: 2 additions & 12 deletions src/collectors/python.d.plugin/python_modules/bases/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,17 @@
# Author: Ilya Mashchenko (ilyam8)
# SPDX-License-Identifier: GPL-3.0-or-later


from sys import version_info

PY_VERSION = version_info[:2]

try:
if PY_VERSION > (3, 1):
from pyyaml3 import SafeLoader as YamlSafeLoader
else:
from pyyaml2 import SafeLoader as YamlSafeLoader
from pyyaml3 import SafeLoader as YamlSafeLoader
except ImportError:
from yaml import SafeLoader as YamlSafeLoader


try:
from collections import OrderedDict
except ImportError:
from third_party.ordereddict import OrderedDict


DEFAULT_MAPPING_TAG = 'tag:yaml.org,2002:map' if PY_VERSION > (3, 1) else u'tag:yaml.org,2002:map'
DEFAULT_MAPPING_TAG = 'tag:yaml.org,2002:map'


def dict_constructor(loader, node):
Expand Down
316 changes: 0 additions & 316 deletions src/collectors/python.d.plugin/python_modules/pyyaml2/__init__.py

This file was deleted.

Loading

0 comments on commit 313f18b

Please sign in to comment.