[Python-modules-commits] [python-demjson] 02/08: Imported Upstream version 2.2.3

Takaki Taniguchi takaki at moszumanska.debian.org
Wed Nov 25 12:30:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

takaki pushed a commit to branch master
in repository python-demjson.

commit e4e2b519f58a2d4043dd6d5d51117def059d0fc3
Author: TANIGUCHI Takaki <takaki at asis.media-as.org>
Date:   Wed Nov 25 20:15:28 2015 +0900

    Imported Upstream version 2.2.3
---
 PKG-INFO             |  4 ++--
 README.md            |  4 ++++
 demjson.py           | 26 +++++++++++++++-----------
 docs/CHANGES.txt     | 14 +++++++++++++-
 docs/NEWS.txt        |  1 +
 docs/demjson.txt     | 14 +++++++-------
 jsonlint             |  4 ++--
 setup.py             |  2 +-
 test/test_demjson.py |  2 +-
 9 files changed, 46 insertions(+), 25 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 870e0df..29e93c2 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: demjson
-Version: 2.2.2
+Version: 2.2.3
 Summary: encoder, decoder, and lint/validator for JSON (JavaScript Object Notation) compliant with RFC 7159
 Home-page: http://deron.meranda.us/python/demjson/
 Author: Deron Meranda
 Author-email: deron.meranda at gmail.com
 License: GNU LGPL 3.0
-Download-URL: http://deron.meranda.us/python/demjson/dist/demjson-2.2.2.tar.gz
+Download-URL: http://deron.meranda.us/python/demjson/dist/demjson-2.2.3.tar.gz
 Description: The "demjson" module, and the included "jsonlint" script, provide methods
         for encoding and decoding JSON formatted data, as well as checking JSON
         data for errors and/or portability issues.  The jsonlint command/script
diff --git a/README.md b/README.md
index 147f2e5..74c5ec4 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,10 @@ unnecessary whitespace.
 
 What's new
 ==========
+<b>Version 2.2.3</b> fixes incorrect return values from the "jsonlint"
+command.  Also fixes a minor problem with the included unit tests in
+certain Python versions.
+
 <b>Version 2.2.2</b> fixes installation problems with certain Python 3
 versions prior to Python 3.4.  No other changes.
 
diff --git a/demjson.py b/demjson.py
index dcf01b6..3046f9d 100644
--- a/demjson.py
+++ b/demjson.py
@@ -120,9 +120,9 @@ r""" A JSON data encoder and decoder.
 __author__ = "Deron Meranda <http://deron.meranda.us/>"
 __homepage__ = "http://deron.meranda.us/python/demjson/"
 
-__date__ = "2014-06-25"
-__version__ = "2.2.2"
-__version_info__ = ( 2, 2, 2 )    # Will be converted into a namedtuple below
+__date__ = "2014-11-12"
+__version__ = "2.2.3"
+__version_info__ = ( 2, 2, 3 )    # Will be converted into a namedtuple below
 
 __credits__ = """Copyright (c) 2006-2014 Deron E. Meranda <http://deron.meranda.us/>
 
@@ -6000,7 +6000,7 @@ MORE INFORMATION:
                 fp.close()
             except IOError, err:
                 self.stderr.write('%s: %s\n' % (pfx, str(err)) )
-                return False
+                return self.SUCCESS_FAIL
             if verbose:
                 verbose_fp = self.stdout
     
@@ -6255,13 +6255,17 @@ the options --allow, --warn, or --forbid ; for example:
 
         for fn in args:
             try:
-                if not self._lintcheck( fn, output_filename=output_filename,
-                                        verbose=verbose,
-                                        reformat=reformat,
-                                        show_stats=show_stats,
-                                        input_encoding=input_encoding,
-                                        output_encoding=output_encoding,
-                                        jsonopts=jsonopts ):
+                rc = self._lintcheck( fn, output_filename=output_filename,
+                                      verbose=verbose,
+                                      reformat=reformat,
+                                      show_stats=show_stats,
+                                      input_encoding=input_encoding,
+                                      output_encoding=output_encoding,
+                                      jsonopts=jsonopts )
+                if rc != self.SUCCESS_OK:
+                    # Warnings or errors should result in failure.  If
+                    # checking multiple files, do not change a
+                    # previous error back to ok.
                     success = False
             except KeyboardInterrupt, err:
                 sys.stderr.write("\njsonlint interrupted!\n")
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index 9b6a3ef..c9dda5f 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -1,5 +1,17 @@
 Change history for demjson python module.
 
+Version 2.2.3 released 2014-11-12
+=================================
+
+* Fix return value of "jsonlint" command.  It should return a
+  non-zero value when an error is reported.
+  GitHub Issue 12: https://github.com/dmeranda/demjson/issues/12
+
+* Fix unit test failure in 32-bit Python 2.x environment.  This bug
+  only affected the unit tests, and was not a problem in the code
+  demjson module.
+  GitHub Issue 13: https://github.com/dmeranda/demjson/issues/13
+
 
 Version 2.2.2 released 2014-06-25
 =================================
@@ -100,7 +112,7 @@ values.
   which wraps the 'decode()' function and which reads the JSON
   document from a file.  It will correctly open the file in binary
   mode and insure the file is closed.  All other options supported
-  by deocde() can be passed.
+  by decode() can be passed.
 
       data = decode_file( "sample.json", allow_comments=True )
 
diff --git a/docs/NEWS.txt b/docs/NEWS.txt
index 4c5b671..c195607 100644
--- a/docs/NEWS.txt
+++ b/docs/NEWS.txt
@@ -1,6 +1,7 @@
 News announcements regarding the demjson python module.
 See the file CHANGES.txt for more details.
 
+2014-11-12  Release 2.2.3, jsonlint return value bugfix, unit test fixes.
 2014-06-25  Release 2.2.2, Python 3 installation fixes.
 2014-06-24  Release 2.2.1, Minor bugfix and html-safe option.
 2014-06-20  Release 2.2, Python 2.6, narrow-Unicode support, number enhancements.
diff --git a/docs/demjson.txt b/docs/demjson.txt
index e57e3d8..07caba5 100644
--- a/docs/demjson.txt
+++ b/docs/demjson.txt
@@ -3134,10 +3134,10 @@ DATA
     WARN = 'warn'
     __author__ = 'Deron Meranda <http://deron.meranda.us/>'
     __credits__ = 'Copyright (c) 2006-2014 Deron E. Meranda <http:/.../lic...
-    __date__ = '2014-06-25'
+    __date__ = '2014-11-12'
     __homepage__ = 'http://deron.meranda.us/python/demjson/'
-    __version__ = '2.2.2'
-    __version_info__ = version_info(major=2, minor=2, micro=2)
+    __version__ = '2.2.3'
+    __version_info__ = version_info(major=2, minor=2, micro=3)
     content_type = 'application/json'
     file_ext = 'json'
     float_maxexp = 308
@@ -3150,14 +3150,14 @@ DATA
     sorting_methods = {'alpha': 'Sort strictly alphabetically', 'alpha_ci'...
     syntax_error = demjson.undefined
     undefined = demjson.undefined
-    version = '2.2.2'
-    version_info = version_info(major=2, minor=2, micro=2)
+    version = '2.2.3'
+    version_info = version_info(major=2, minor=2, micro=3)
 
 VERSION
-    2.2.2
+    2.2.3
 
 DATE
-    2014-06-25
+    2014-11-12
 
 AUTHOR
     Deron Meranda <http://deron.meranda.us/>
diff --git a/jsonlint b/jsonlint
index fcfe0db..99c22e1 100755
--- a/jsonlint
+++ b/jsonlint
@@ -7,8 +7,8 @@ Requires demjson module.
 """
 __author__ = "Deron Meranda <http://deron.meranda.us/>"
 __homepage__ = "http://deron.meranda.us/python/demjson/"
-__date__ = "2014-06-25"
-__version__ = "2.2.2"
+__date__ = "2014-11-12"
+__version__ = "2.2.3"
 __credits__ = """Copyright (c) 2006-2014 Deron E. Meranda <http://deron.meranda.us/>
 
 Licensed under GNU LGPL (GNU Lesser General Public License) version 3.0
diff --git a/setup.py b/setup.py
index 31bd732..bf10389 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 # Python package setup script        -*- coding: utf-8 -*-
 
 name = 'demjson'
-version = '2.2.2'
+version = '2.2.3'
 
 import sys
 try:
diff --git a/test/test_demjson.py b/test/test_demjson.py
index 9b11871..a52e667 100644
--- a/test/test_demjson.py
+++ b/test/test_demjson.py
@@ -1385,7 +1385,7 @@ class DemjsonTest(unittest.TestCase):
         self.assertEqual( self.decode_stats( alljson ).num_ints_long, len(nxls) )
 
         n53s = [-9007199254740992,-9007199254740991, 9007199254740991,9007199254740992]# -9007199254740991..9007199254740991
-        self.assertEqual( self.decode_stats( repr(n53s) ).num_ints_53bit, 2 )
+        self.assertEqual( self.decode_stats( repr(n53s).replace('L','') ).num_ints_53bit, 2 )
 
     def testStatsFloats(self):
         self.assertEqual( self.decode_stats( 'true' ).num_floats, 0 )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-demjson.git



More information about the Python-modules-commits mailing list