Imported Upstream version 40.4.3 upstream/40.4.3
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:43:56 +0000 (10:43 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 14 Jan 2019 01:43:56 +0000 (10:43 +0900)
CHANGES.rst
pkg_resources/_vendor/pyparsing.py
pkg_resources/_vendor/vendored.txt
setup.cfg
setup.py

index 01a91b5..263a19a 100644 (file)
@@ -1,3 +1,9 @@
+v40.4.3
+-------
+
+* #1480: Bump vendored pyparsing in pkg_resources to 2.2.1.
+
+
 v40.4.2
 -------
 
index e8aefc8..cf75e1e 100644 (file)
@@ -1,6 +1,6 @@
 # module pyparsing.py\r
 #\r
-# Copyright (c) 2003-2016  Paul T. McGuire\r
+# Copyright (c) 2003-2018  Paul T. McGuire\r
 #\r
 # Permission is hereby granted, free of charge, to any person obtaining\r
 # a copy of this software and associated documentation files (the\r
@@ -25,6 +25,7 @@
 __doc__ = \\r
 """\r
 pyparsing module - Classes and methods to define and execute parsing grammars\r
+=============================================================================\r
 \r
 The pyparsing module is an alternative approach to creating and executing simple grammars,\r
 vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you\r
@@ -58,10 +59,23 @@ The pyparsing module handles some of the problems that are typically vexing when
  - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)\r
  - quoted strings\r
  - embedded comments\r
+\r
+\r
+Getting Started -\r
+-----------------\r
+Visit the classes L{ParserElement} and L{ParseResults} to see the base classes that most other pyparsing\r
+classes inherit from. Use the docstrings for examples of how to:\r
+ - construct literal match expressions from L{Literal} and L{CaselessLiteral} classes\r
+ - construct character word-group expressions using the L{Word} class\r
+ - see how to create repetitive expressions using L{ZeroOrMore} and L{OneOrMore} classes\r
+ - use L{'+'<And>}, L{'|'<MatchFirst>}, L{'^'<Or>}, and L{'&'<Each>} operators to combine simple expressions into more complex ones\r
+ - associate names with your parsed results using L{ParserElement.setResultsName}\r
+ - find some helpful expression short-cuts like L{delimitedList} and L{oneOf}\r
+ - find more useful common expressions in the L{pyparsing_common} namespace class\r
 """\r
 \r
-__version__ = "2.2.0"\r
-__versionTime__ = "06 Mar 2017 02:06 UTC"\r
+__version__ = "2.2.1"\r
+__versionTime__ = "18 Sep 2018 00:49 UTC"\r
 __author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"\r
 \r
 import string\r
@@ -83,6 +97,15 @@ except ImportError:
     from threading import RLock\r
 \r
 try:\r
+    # Python 3\r
+    from collections.abc import Iterable\r
+    from collections.abc import MutableMapping\r
+except ImportError:\r
+    # Python 2.7\r
+    from collections import Iterable\r
+    from collections import MutableMapping\r
+\r
+try:\r
     from collections import OrderedDict as _OrderedDict\r
 except ImportError:\r
     try:\r
@@ -940,7 +963,7 @@ class ParseResults(object):
     def __dir__(self):\r
         return (dir(type(self)) + list(self.keys()))\r
 \r
-collections.MutableMapping.register(ParseResults)\r
+MutableMapping.register(ParseResults)\r
 \r
 def col (loc,strg):\r
     """Returns current column within a string, counting newlines as line separators.\r
@@ -1025,11 +1048,11 @@ def _trim_arity(func, maxargs=2):
             # special handling for Python 3.5.0 - extra deep call stack by 1\r
             offset = -3 if system_version == (3,5,0) else -2\r
             frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset]\r
-            return [(frame_summary.filename, frame_summary.lineno)]\r
+            return [frame_summary[:2]]\r
         def extract_tb(tb, limit=0):\r
             frames = traceback.extract_tb(tb, limit=limit)\r
             frame_summary = frames[-1]\r
-            return [(frame_summary.filename, frame_summary.lineno)]\r
+            return [frame_summary[:2]]\r
     else:\r
         extract_stack = traceback.extract_stack\r
         extract_tb = traceback.extract_tb\r
@@ -1374,7 +1397,7 @@ class ParserElement(object):
             else:\r
                 preloc = loc\r
             tokensStart = preloc\r
-            if self.mayIndexError or loc >= len(instring):\r
+            if self.mayIndexError or preloc >= len(instring):\r
                 try:\r
                     loc,tokens = self.parseImpl( instring, preloc, doActions )\r
                 except IndexError:\r
@@ -1408,7 +1431,6 @@ class ParserElement(object):
                                                   self.resultsName,\r
                                                   asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),\r
                                                   modal=self.modalResults )\r
-\r
         if debugging:\r
             #~ print ("Matched",self,"->",retTokens.asList())\r
             if (self.debugActions[1] ):\r
@@ -3242,7 +3264,7 @@ class ParseExpression(ParserElement):
 \r
         if isinstance( exprs, basestring ):\r
             self.exprs = [ ParserElement._literalStringClass( exprs ) ]\r
-        elif isinstance( exprs, collections.Iterable ):\r
+        elif isinstance( exprs, Iterable ):\r
             exprs = list(exprs)\r
             # if sequence of strings provided, wrap with Literal\r
             if all(isinstance(expr, basestring) for expr in exprs):\r
@@ -4393,7 +4415,7 @@ def traceParseAction(f):
 \r
         @traceParseAction\r
         def remove_duplicate_chars(tokens):\r
-            return ''.join(sorted(set(''.join(tokens)))\r
+            return ''.join(sorted(set(''.join(tokens))))\r
 \r
         wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)\r
         print(wds.parseString("slkdjs sld sldd sdlf sdljf"))\r
@@ -4583,7 +4605,7 @@ def oneOf( strs, caseless=False, useRegex=True ):
     symbols = []\r
     if isinstance(strs,basestring):\r
         symbols = strs.split()\r
-    elif isinstance(strs, collections.Iterable):\r
+    elif isinstance(strs, Iterable):\r
         symbols = list(strs)\r
     else:\r
         warnings.warn("Invalid argument to oneOf, expected string or iterable",\r
@@ -4734,7 +4756,7 @@ stringEnd   = StringEnd().setName("stringEnd")
 _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])\r
 _escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))\r
 _escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))\r
-_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)\r
+_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | CharsNotIn(r'\]', exact=1)\r
 _charRange = Group(_singleChar + Suppress("-") + _singleChar)\r
 _reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"\r
 \r
index e3d564f..7f4f408 100644 (file)
@@ -1,4 +1,4 @@
 packaging==16.8
-pyparsing==2.2.0
+pyparsing==2.2.1
 six==1.10.0
 appdirs==1.4.3
index b5659e1..55347d6 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 40.4.2
+current_version = 40.4.3
 commit = True
 tag = True
 
index ad5f528..b37082c 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
 
 setup_params = dict(
     name="setuptools",
-    version="40.4.2",
+    version="40.4.3",
     description=(
         "Easily download, build, install, upgrade, and uninstall "
         "Python packages"