#30 Bundled pyparsing SyntaxWarning was making one test sad on 3.8
Closed 3 months ago by churchyard. Opened 3 months ago by churchyard.
rpms/ churchyard/python-pip py38  into  master

@@ -0,0 +1,33 @@ 

+ From fa741190622e2149e1dfd6c9e2565d87fcd484a6 Mon Sep 17 00:00:00 2001

+ From: Paul McGuire <ptmcg@austin.rr.com>

+ Date: Sat, 30 Mar 2019 02:58:29 -0500

+ Subject: [PATCH] Convert docstrings containing regex examples to raw string

+  literals, to avoid Py3.8 SyntaxWarnings (#80)

+ 

+ ---

+  CHANGES      | 3 +++

+  pyparsing.py | 6 +++---

+  2 files changed, 6 insertions(+), 3 deletions(-)

+ 

+ diff --git a/src/pip/_vendor/pyparsing.py b/src/pip/_vendor/pyparsing.py

+ index af88035..f748087 100644

+ --- a/src/pip/_vendor/pyparsing.py

+ +++ b/src/pip/_vendor/pyparsing.py

+ @@ -3081,7 +3081,7 @@ def __str__( self ):

+          return self.strRepr

+  

+      def sub(self, repl):

+ -        """

+ +        r"""

+          Return Regex with an attached parse action to transform the parsed

+          result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_.

+  

+ @@ -3441,7 +3441,7 @@ def parseImpl( self, instring, loc, doActions=True ):

+  

+  

+  class LineStart(_PositionToken):

+ -    """Matches if current position is at the beginning of a line within

+ +    r"""Matches if current position is at the beginning of a line within

+      the parse string

+  

+      Example::

file modified
+5

@@ -104,6 +104,10 @@ 

  # pytest 4 support

  Patch5:         https://github.com/pypa/pip/commit/d4264dc3b2ab292c9843fb1d001c7fc0a5fc67c4.patch

  

+ # bundled pyparsing SyntaxWarning was making one test sad (unexpected stdout)

+ # https://github.com/pyparsing/pyparsing/commit/fa741190 sans CHANGES and version bump

+ Patch6:         pyparsing-fa741190.patch

+ 

  # Downstream only patch

  # Users might have local installations of pip from using

  # `pip install --user --upgrade pip` on older versions.

@@ -276,6 +280,7 @@ 

  %patch3 -p1

  %patch4 -p1

  %patch5 -p1

+ %patch6 -p1

  

  # this goes together with patch4

  rm src/pip/_vendor/certifi/*.pem

No need to merge this before we actually proceed with 3.8. New pip version might mark this redundant.

This is included in pyparsing 2.4.0 and that is included in pip 19.1.

Pull-Request has been closed by churchyard

3 months ago