dmeranda / demjson

Python module for JSON data encoding, including jsonlint. See the project Wiki here on Github. Also read the README at the bottom of this page, or the project homepage at
http://deron.meranda.us/python/demjson/
Other
302 stars 76 forks source link

Version on CentOS EPEL is out of date and exits 0 on errors #25

Closed pgporada closed 7 years ago

pgporada commented 7 years ago

I'm not sure if you're the right person to contact about this, but the version of your software in the CentOS 7 EPEL repository is out of date.

python-demjson                                               noarch                                               2.2.2-1.el7                                                 epel                                               148 k

Installing demjson via pip install demjson gives me version 2.2.4

Using the EPEL provided package, jsonlint only exits with a status of 0 even if the json file in question has errors.

[root@default-centos-7 ~]# jsonlint /etc/sensu/uchiwa.json 
/etc/sensu/uchiwa.json:22:12: Error: Values must be separated by a comma
   |  At line 22, column 12, offset 523
   |  Object started at line 18, column 16, offset 414
/etc/sensu/uchiwa.json:27:12: Error: Values must be separated by a comma
   |  At line 27, column 12, offset 680
   |  Object started at line 23, column 26, offset 567
/etc/sensu/uchiwa.json: has errors
[root@default-centos-7 ~]# echo $?
0

Where as, if I install via pip to get demjson 2.2.4, jsonlint works as intended.

[root@default-centos-7 ~]# jsonlint /etc/sensu/uchiwa.json 
/etc/sensu/uchiwa.json:22:12: Error: Values must be separated by a comma
   |  At line 22, column 12, offset 523
   |  Object started at line 18, column 16, offset 414
/etc/sensu/uchiwa.json:27:12: Error: Values must be separated by a comma
   |  At line 27, column 12, offset 680
   |  Object started at line 23, column 26, offset 567
/etc/sensu/uchiwa.json: has errors
[root@default-centos-7 ~]# echo $?
1
pgporada commented 7 years ago

I filed a RedHat ticket. https://bugzilla.redhat.com/show_bug.cgi?id=1417732

dmeranda commented 7 years ago

Thanks. This particular bug was fixed in 2014 as Issue #12

I don't control what distributions include or when they update the packages; some distros will pick up new releases quite rapidly while others seem to never update until nudged. Filing a bug with RedHat was probably the correct thing to do. I should note that Fedora, RedHat's other distro, has been up to date for a long time.