File: pyyaml6.patch

package info (click to toggle)
python-canmatrix 0.9.5~github-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,916 kB
  • sloc: xml: 30,201; python: 13,206; makefile: 18; sh: 8
file content (25 lines) | stat: -rw-r--r-- 825 bytes parent folder | download
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
From: =?utf-8?q?=22IOhannes_m_zm=C3=B6lnig_=28Debian/GNU=29=22?=
 <umlaeute@debian.org>
Date: Wed, 19 Oct 2022 15:31:08 +0200
Subject: Explicitly specify yaml.FullLoader for loading yaml data

Bug: https://github.com/ebroecker/canmatrix/issues/663

Closes: #1022036
---
 src/canmatrix/formats/yaml.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/canmatrix/formats/yaml.py b/src/canmatrix/formats/yaml.py
index c62b005..2b5ec2b 100644
--- a/src/canmatrix/formats/yaml.py
+++ b/src/canmatrix/formats/yaml.py
@@ -74,7 +74,7 @@ def dump(db, f, **options):  # type: (canmatrix.CanMatrix, typing.IO, **typing.A
 
 def load(f, **options):  # type: (typing.IO, **typing.Any) -> canmatrix.CanMatrix
     __init_yaml()
-    db = yaml.load(f)
+    db = yaml.load(f, Loader=yaml.FullLoader)
     return db