Imported Upstream version 2.4.4 upstream/2.4.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 05:42:33 +0000 (14:42 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 05:42:33 +0000 (14:42 +0900)
CHANGES
PKG-INFO
pyparsing.egg-info/PKG-INFO
pyparsing.py
setup.cfg
unitTests.py

diff --git a/CHANGES b/CHANGES
index fc9ff71c067e55fd71cd6b25e0d8e362ea600cb4..563799c348f215cab782595821deaa4cd60abea8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,13 @@
 Change Log
 ==========
 
+Version 2.4.4 - November, 2019
+--------------------------------
+- Unresolved symbol reference in 2.4.3 release was masked by stdout
+  buffering in unit tests, thanks for the prompt heads-up, Ned 
+  Batchelder!
+
+
 Version 2.4.3 - November, 2019
 ------------------------------
 - Fixed a bug in ParserElement.__eq__ that would for some parsers
index 4816c5e7588bb6c2fa343754df2fb526ef7a06bc..5b525350b76088871a8d40a206b1181802e09b22 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pyparsing
-Version: 2.4.3
+Version: 2.4.4
 Summary: Python parsing module
 Home-page: https://github.com/pyparsing/pyparsing/
 Author: Paul McGuire
index 4816c5e7588bb6c2fa343754df2fb526ef7a06bc..5b525350b76088871a8d40a206b1181802e09b22 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pyparsing
-Version: 2.4.3
+Version: 2.4.4
 Summary: Python parsing module
 Home-page: https://github.com/pyparsing/pyparsing/
 Author: Paul McGuire
index 7e35ed2f9b9f169c9ce7317ea162a790d8e1776f..a0a114727abe465f44fd256a01234510e8448428 100644 (file)
@@ -95,8 +95,8 @@ classes inherit from. Use the docstrings for examples of how to:
    namespace class
 """
 
-__version__ = "2.4.3"
-__versionTime__ = "21 Oct 2019 23:43 UTC"
+__version__ = "2.4.4"
+__versionTime__ = "05 Nov 2019 14:15 UTC"
 __author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
 
 import string
@@ -5517,7 +5517,7 @@ def oneOf(strs, caseless=False, useRegex=True, asKeyword=False):
         # ~ print (strs, "->", "|".join([_escapeRegexChars(sym) for sym in symbols]))
         try:
             if len(symbols) == len("".join(symbols)):
-                return Regex("[%s]" % "".join(_collapseAndEscapeRegexRangeChars(sym) for sym in symbols)).setName(' | '.join(symbols))
+                return Regex("[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols)).setName(' | '.join(symbols))
             else:
                 return Regex("|".join(re.escape(sym) for sym in symbols)).setName(' | '.join(symbols))
         except Exception:
index 163eba3165f1afa5161e7c1c1d77d4ad1c23763b..51b5f83b3da1c73c4f95d2f3324918ad9de75958 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,5 +7,4 @@ license_file = LICENSE
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
index cfc4e90610a8c349a8b4307a1100f08f43a63630..906fcf0af63b29bf7508b21c42e3bc6b6949ff9a 100644 (file)
@@ -85,6 +85,8 @@ BUFFER_OUTPUT = True
 class ParseTestCase(TestCase):
     def __init__(self):
         super(ParseTestCase, self).__init__(methodName='_runTest')
+        self.expect_traceback = False
+        self.expect_warning = False
 
     def _runTest(self):
 
@@ -103,6 +105,12 @@ class ParseTestCase(TestCase):
                     print_("<<<< End of test",str(self))
                     print_()
 
+            output = buffered_stdout.getvalue()
+            if "Traceback" in output and not self.expect_traceback:
+                raise Exception("traceback in stdout")
+            if "Warning" in output and not self.expect_warning:
+                raise Exception("warning in stdout")
+
         except Exception as exc:
             if BUFFER_OUTPUT:
                 print_()
@@ -1247,6 +1255,8 @@ class EllipsisRepetionTest(ParseTestCase):
 
 class CustomQuotesTest(ParseTestCase):
     def runTest(self):
+        self.expect_warning = True
+
         from pyparsing import QuotedString
 
         testString = r"""
@@ -1861,6 +1871,7 @@ class UpcaseDowncaseUnicode(ParseTestCase):
 
 class ParseUsingRegex(ParseTestCase):
     def runTest(self):
+        self.expect_warning = True
 
         import re
 
@@ -1963,6 +1974,7 @@ class RegexAsTypeTest(ParseTestCase):
 
 class RegexSubTest(ParseTestCase):
     def runTest(self):
+        self.expect_warning = True
         import pyparsing as pp
 
         print_("test sub with string")
@@ -3883,8 +3895,8 @@ class CloseMatchTest(ParseTestCase):
 
         for r, exp in zip(results, expected):
             if exp is not None:
-                self.assertEquals(r[1].mismatches, exp,
-                                  "fail CloseMatch between %r and %r" % (searchseq.match_string, r[0]))
+                self.assertEqual(r[1].mismatches, exp,
+                                 "fail CloseMatch between %r and %r" % (searchseq.match_string, r[0]))
             print_(r[0], 'exc: %s' % r[1] if exp is None and isinstance(r[1], Exception)
                                           else ("no match", "match")[r[1].mismatches == exp])
 
@@ -3963,6 +3975,8 @@ class LiteralExceptionTest(ParseTestCase):
 
 class ParseActionExceptionTest(ParseTestCase):
     def runTest(self):
+        self.expect_traceback = True
+
         import pyparsing as pp
         import traceback
 
@@ -4420,6 +4434,7 @@ class ParseResultsWithNameMatchFirst(ParseTestCase):
                 with self.assertWarns(UserWarning, msg="failed to warn of And within alternation"):
                     expr = (expr_a | expr_b)('rexp')
             else:
+                self.expect_warning = True
                 expr = (expr_a | expr_b)('rexp')
             expr.runTests("""
                 not the bird
@@ -4460,6 +4475,7 @@ class ParseResultsWithNameOr(ParseTestCase):
                 with self.assertWarns(UserWarning, msg="failed to warn of And within alternation"):
                     expr = (expr_a ^ expr_b)('rexp')
             else:
+                self.expect_warning = True
                 expr = (expr_a ^ expr_b)('rexp')
             expr.runTests("""\
                 not the bird
@@ -4614,6 +4630,8 @@ class WarnUngroupedNamedTokensTest(ParseTestCase):
                                                    " ungrouped named expressions"):
                 path = coord[...].setResultsName('path')
 
+        pp.__diag__.warn_ungrouped_named_tokens_in_collection = False
+
 
 class WarnNameSetOnEmptyForwardTest(ParseTestCase):
     """
@@ -4679,10 +4697,10 @@ class EnableDebugOnNamedExpressionsTest(ParseTestCase):
             """)
         output = test_stdout.getvalue()
         print_(output)
-        self.assertEquals(output,
-                          expected_debug_output,
-                          "failed to auto-enable debug on named expressions "
-                          "using enable_debug_on_named_expressions")
+        self.assertEqual(output,
+                         expected_debug_output,
+                         "failed to auto-enable debug on named expressions "
+                         "using enable_debug_on_named_expressions")
 
 
 class UndesirableButCommonPracticesTest(ParseTestCase):
@@ -4715,6 +4733,7 @@ class UndesirableButCommonPracticesTest(ParseTestCase):
 
 class MiscellaneousParserTests(ParseTestCase):
     def runTest(self):
+        self.expect_warning = True
 
         runtests = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
         if IRON_PYTHON_ENV: