Your message dated Sun, 26 Feb 2017 21:04:30 +0000
with message-id <e1ci5za-0002pu...@fasolo.debian.org>
and subject line Bug#855233: fixed in diffoscope 78
has caused the Debian Bug report #855233,
regarding diffoscope: Crashes when comparing bad JSON on Python pre-3.5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
855233: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855233
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: diffoscope
Severity: normal
Tags: upstream patch

Dear Maintainer,

Commit 50be22f checks for JSON decoding errors by catching
json.JSONDecodeError.  This class was introduced in Python 3.5.  Earlier
version of the json module simply raised ValueError in the same situation.

When running tests on earlier versions of Python, test_json.test_invalid
crashes when it fails to find json.JSONDecodeError.

ValueError is the base class of json.JSONDecodeError, so catching that works
as expected on Python 3.5 and older versions.  The attached patch makes that
change and sees the test pass on older versions of Python.

Thanks,

-- System Information:
Debian Release: 8.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From ee5c21ac6930de0cfdae2a71a4799524d8c33db0 Mon Sep 17 00:00:00 2001
From: Brett Smith <brettcsm...@brettcsmith.org>
Date: Wed, 15 Feb 2017 14:39:41 -0500
Subject: [PATCH] comparators.json: Catch bad JSON errors on Python pre-3.5.

json.JSONDecodeError was introduced in Python 3.5.  Earlier versions raised
ValueError, which is the base class of JSONDecodeError.  Catch that instead.
---
 diffoscope/comparators/json.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/diffoscope/comparators/json.py b/diffoscope/comparators/json.py
index d46c830..96e8002 100644
--- a/diffoscope/comparators/json.py
+++ b/diffoscope/comparators/json.py
@@ -25,7 +25,6 @@ from diffoscope.difference import Difference
 
 from .utils.file import File
 
-
 class JSONFile(File):
     RE_FILE_EXTENSION = re.compile(r'\.json$')
 
@@ -37,7 +36,7 @@ class JSONFile(File):
         with open(file.path) as f:
             try:
                 file.parsed = json.load(f, object_pairs_hook=collections.OrderedDict)
-            except json.JSONDecodeError:
+            except ValueError:
                 return False
 
         return True
-- 
2.1.4


--- End Message ---
--- Begin Message ---
Source: diffoscope
Source-Version: 78

We believe that the bug you reported is fixed in the latest version of
diffoscope, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 855...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattia Rizzolo <mat...@debian.org> (supplier of updated diffoscope package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 26 Feb 2017 17:26:48 +0100
Source: diffoscope
Binary: diffoscope
Architecture: source
Version: 78
Distribution: unstable
Urgency: medium
Maintainer: Reproducible builds folks 
<reproducible-builds@lists.alioth.debian.org>
Changed-By: Mattia Rizzolo <mat...@debian.org>
Description:
 diffoscope - in-depth comparison of files, archives, and directories
Closes: 855169 855233 855239
Changes:
 diffoscope (78) unstable; urgency=medium
 .
   [ Brett Smith ]
   * comparators.json:
     + Catch bad JSON errors on Python pre-3.5.  Closes: #855233
 .
   [ Chris Lamb ]
   * tests:
     + Move normalize_zeros to more generic `utils.data` module.
     + Fix tests that call xxd fail on jessie due to output change.
       Closes: #855239
 .
   [ Ed Maste ]
   * comparators.directory:
     + Assume BSD-style stat(1) on FreeBSD.  Closes: #855169
Checksums-Sha1:
 dbca0cf40169c42e079c2c1c1e4199d15b423b5e 2972 diffoscope_78.dsc
 6502474142f19b2394d70b8d8937152f897d85bb 349612 diffoscope_78.tar.xz
 3da2126418e31dae8bd7a7e46ed78f5879ee8cc7 16205 diffoscope_78_amd64.buildinfo
Checksums-Sha256:
 b45d7e2c6fccf9ccd52dc3c5cb7cef263b3eba378d790e9357b41ac0407b7d3f 2972 
diffoscope_78.dsc
 6ae6a46123d5ce97062a24e94cd3e9aab15d8297019fa5a0830c46934ab54d52 349612 
diffoscope_78.tar.xz
 4f8756aababb01106afaa322516769f33d791f6e9821e62eb479440e0adc9b7c 16205 
diffoscope_78_amd64.buildinfo
Files:
 ab383677f26b502dd0483c282aa31f9d 2972 devel optional diffoscope_78.dsc
 222ea64cc6c31a32372fce5eef028128 349612 devel optional diffoscope_78.tar.xz
 9639240d6f28ed0772efc8baf04b9748 16205 devel optional 
diffoscope_78_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEi3hoeGwz5cZMTQpICBa54Yx2K60FAlizODUACgkQCBa54Yx2
K63CYg//UJjqls2B6UsRJ4VkYvNkzMtptLfJdxNICpe6sjJZvxXA7I1ZbivVCnTi
ziTxG/KQYmLPyzzP17/TX8pYRHpOp0kXeZBQSZwOHAoWZk06rht8J0jJI6f6rWC8
brtLJTRoELCU1KtL/FuWhFpypXnQCnoyhuRtXWxPJbhwVwIP6LAB729Wlj76vlRq
yOcydhT19jf+0dNHHX5I3w5HgCAzW6CnJ10TI1fgDHOi41q97ev+XhJiqvlQ8QlA
e+SY4MXF12gSPHgybNGO86w92i+b7P9W0Blqq3wuuOgUPDJNSs0+5Q90ptcPOQDV
MiJBV8CiusPmtyuXZPHd6YpVTIz68t+3oOjk8/7idO1fVsSfX++sMOm2y/tCbssL
QvIvLG6WluqFXRgqpf75Z7rDUKHl1p6J/084K7hH78Sx5QtaZB1hPKE79V9SufST
onHloqVxxp78/3ZPzXB7Ze93oCklANf4CDnSn3H+fg6mLwFXNZEMT927TgxwFrdG
82XVcVx6+Ft3byYPee1GxhkTHVkTJU88UtkSxaedpaLNKlCAtibXwoJHpmeM6pPF
kRUiZ2dlYJRZhYn4PCk1bJfoEuTB3rvmYckxqrebZllWTwDuvDfXXZnUVytj+Aj+
1YMysy6XTLWVkBO5c03yKrrhDtcWkmEe/3sF3Mdp/tCNHvUeXao=
=kWZp
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to