1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: Use yaml.safe_load instead of yaml.load which is deprecated
Modify to use full_load where needed
Author: Nilesh Patra <nilesh@debian.org>, Lance Lin <lq27267@gmail.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022076
Last-Update: 2023-10-27
--- python-pybedtools.orig/pybedtools/contrib/plotting.py
+++ python-pybedtools/pybedtools/contrib/plotting.py
@@ -523,7 +523,7 @@
"""
import yaml
- conf = yaml.load(open(yaml_config))
+ conf = yaml.safe_load(open(yaml_config))
disallowed = ["method", "method_kwargs"]
for dis in disallowed:
--- python-pybedtools.orig/pybedtools/test/test_iter.py
+++ python-pybedtools/pybedtools/test/test_iter.py
@@ -141,9 +141,9 @@
labels = []
for config_fn in yamltestdesc:
if hasattr(yaml, "FullLoader"):
- test_cases = yaml.load(open(config_fn).read(), Loader=yaml.FullLoader)
+ test_cases = yaml.full_load(open(config_fn).read())
else:
- test_cases = yaml.load(open(config_fn).read())
+ test_cases = yaml.safe_load(open(config_fn).read())
for test_case in test_cases:
kw = test_case["kwargs"]
|