Package: ripe-atlas-tools
Version: 2.3.0-3
Severity: important
Tags: patch newcomer

Hello !

ripe-atlas fail with any commands due to a change in python yaml loader (patch
inclued).
we can maybe also update the Debian version to the latest ripe-atlas-tools
version (3.1.0), I can take care of it if needed.
let me know.

Thanks in advance !

Sebastien

% ripe-atlas --help
Traceback (most recent call last):
  File "/bin/ripe-atlas", line 8, in <module>
    from ripe.atlas.tools.commands.measure import Factory as BaseFactory
  File "/usr/lib/python3/dist-
packages/ripe/atlas/tools/commands/measure/__init__.py", line 20, in <module>
    from .ping import PingMeasureCommand
  File "/usr/lib/python3/dist-
packages/ripe/atlas/tools/commands/measure/ping.py", line 18, in <module>
    from ...helpers.validators import ArgumentType
  File "/usr/lib/python3/dist-packages/ripe/atlas/tools/helpers/validators.py",
line 25, in <module>
    from ..settings import aliases
  File "/usr/lib/python3/dist-packages/ripe/atlas/tools/settings/__init__.py",
line 287, in <module>
    conf = Configuration().get()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ripe/atlas/tools/settings/__init__.py",
line 34, in get
    custom = yaml.load(y)
             ^^^^^^^^^^^^
TypeError: load() missing 1 required positional argument: 'Loader'


-- System Information:
Debian Release: trixie/sid
  APT prefers oldoldstable
  APT policy: (500, 'oldoldstable'), (500, 'testing'), (90, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.9.10-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ripe-atlas-tools depends on:
ii  python3                      3.12.4-1
ii  python3-dateutil             2.9.0-2
ii  python3-ipy                  1:1.01-2
ii  python3-openssl              24.1.0-1
ii  python3-pkg-resources        70.3.0-2
ii  python3-requests             2.31.0+dfsg-2
ii  python3-ripe-atlas-cousteau  2.0.0-1
ii  python3-ripe-atlas-sagan     1.3.1-1
ii  python3-tzlocal              5.2-1.1
ii  python3-yaml                 6.0.1-2+b1

Versions of packages ripe-atlas-tools recommends:
ii  python3-ujson  5.10.0-1+b1

ripe-atlas-tools suggests no packages.

-- no debconf information

*** /home/sbadia/patch_ripe-atlas.patch
--- __init__.py 2024-08-07 11:53:46.629760865 +0200
+++ __init__.py 2024-08-07 11:57:48.887159939 +0200
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-import collections
+from collections.abc import Mapping
 import copy
 import os
 import re
@@ -31,7 +31,7 @@
         r = copy.deepcopy(self.DEFAULT)
         if os.path.exists(self.USER_RC):
             with open(self.USER_RC) as y:
-                custom = yaml.load(y)
+                custom = yaml.load(y, Loader=yaml.FullLoader)
                 if custom:
                     r = self.deep_update(r, custom)
         return r
@@ -43,7 +43,7 @@
         Stolen from http://stackoverflow.com/questions/3232943/
         """
         for k, v in u.items():
-            if isinstance(v, collections.Mapping):
+            if isinstance(v, Mapping):
                 r = cls.deep_update(d.get(k, {}), v)
                 d[k] = r
             else:

Reply via email to