Deprecated the yamlutils module.

The pyyaml is now safe by default:

https://github.com/yaml/pyyaml/pull/74/files
https://access.redhat.com/security/cve/CVE-2017-18342

So the yamlutils is now useless. We can depracated it and then remove it.

Change-Id: Ibaf782786eef20d6895542e6e66ebf5befe434f0
This commit is contained in:
Daniel Bengtsson 2020-02-17 10:40:41 +01:00
parent fb399ee012
commit c0a1af6aee
2 changed files with 6 additions and 0 deletions

View File

@ -16,3 +16,4 @@ PyYAML>=3.12 # MIT
stevedore>=1.20.0 # Apache-2.0
six>=1.10.0 # MIT
PrettyTable<0.8,>=0.7.2 # BSD
debtcollector>=1.2.0 # Apache-2.0

View File

@ -10,8 +10,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from debtcollector import removals
import yaml
removals.removed_module(
'solumclient.common.yamlutils', version='3.0.0', removal_version='4.0.0',
message='The solumclient.common.yamlutils will be removed')
if hasattr(yaml, 'CSafeLoader'):
yaml_loader = yaml.CSafeLoader