Use upstream patch without the examples hunk.
This commit is contained in:
parent
7ea8ba4efc
commit
968b16f220
@ -1,7 +1,20 @@
|
||||
diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_patched/pycparser/c_lexer.py
|
||||
--- pycparser-release_v2.14/pycparser/c_lexer.py 2019-06-06 15:51:41.937286040 +0200
|
||||
+++ pycparser-release_v2.14_patched/pycparser/c_lexer.py 2019-06-06 15:53:15.269120067 +0200
|
||||
@@ -52,8 +52,8 @@
|
||||
From 2129f5fb1ec2d06000f10c96510874c5303d9f8c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Sun, 5 Mar 2017 04:52:22 +0200
|
||||
Subject: [PATCH] Python 3.6 invalid escape sequence deprecation fixes (#177)
|
||||
|
||||
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
|
||||
---
|
||||
pycparser/c_lexer.py | 4 ++--
|
||||
tests/test_c_lexer.py | 8 ++++----
|
||||
tests/test_c_parser.py | 2 +-
|
||||
4 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py
|
||||
index 00dcd97..d9941c1 100644
|
||||
--- a/pycparser/c_lexer.py
|
||||
+++ b/pycparser/c_lexer.py
|
||||
@@ -52,8 +52,8 @@ def __init__(self, error_func, on_lbrace_func, on_rbrace_func,
|
||||
# Allow either "# line" or "# <num>" to support GCC's
|
||||
# cpp output
|
||||
#
|
||||
@ -12,24 +25,11 @@ diff -ru pycparser-release_v2.14/pycparser/c_lexer.py pycparser-release_v2.14_pa
|
||||
|
||||
def build(self, **kwargs):
|
||||
""" Builds the lexer from the specification. Must be
|
||||
diff -ru pycparser-release_v2.14/pycparser/c_lexer.py.ply pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply
|
||||
--- pycparser-release_v2.14/pycparser/c_lexer.py.ply 2015-06-10 05:00:55.000000000 +0200
|
||||
+++ pycparser-release_v2.14_patched/pycparser/c_lexer.py.ply 2019-06-06 15:53:44.972385501 +0200
|
||||
@@ -52,8 +52,8 @@
|
||||
# Allow either "# line" or "# <num>" to support GCC's
|
||||
# cpp output
|
||||
#
|
||||
- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)')
|
||||
- self.pragma_pattern = re.compile('[ \t]*pragma\W')
|
||||
+ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)')
|
||||
+ self.pragma_pattern = re.compile(r'[ \t]*pragma\W')
|
||||
|
||||
def build(self, **kwargs):
|
||||
""" Builds the lexer from the specification. Must be
|
||||
diff -ru pycparser-release_v2.14/tests/test_c_lexer.py pycparser-release_v2.14_patched/tests/test_c_lexer.py
|
||||
--- pycparser-release_v2.14/tests/test_c_lexer.py 2015-06-10 05:00:55.000000000 +0200
|
||||
+++ pycparser-release_v2.14_patched/tests/test_c_lexer.py 2019-06-10 14:57:24.981643354 +0200
|
||||
@@ -403,12 +403,12 @@
|
||||
diff --git a/tests/test_c_lexer.py b/tests/test_c_lexer.py
|
||||
index f965b24..11c7b26 100644
|
||||
--- a/tests/test_c_lexer.py
|
||||
+++ b/tests/test_c_lexer.py
|
||||
@@ -430,12 +430,12 @@ def test_char_constants(self):
|
||||
self.assertLexerError("'b\n", ERR_UNMATCHED_QUOTE)
|
||||
|
||||
self.assertLexerError("'jx'", ERR_INVALID_CCONST)
|
||||
@ -46,10 +46,11 @@ diff -ru pycparser-release_v2.14/tests/test_c_lexer.py pycparser-release_v2.14_p
|
||||
|
||||
def test_preprocessor(self):
|
||||
self.assertLexerError('#line "ka"', ERR_FILENAME_BEFORE_LINE)
|
||||
diff -ru pycparser-release_v2.14/tests/test_c_parser.py pycparser-release_v2.14_patched/tests/test_c_parser.py
|
||||
--- pycparser-release_v2.14/tests/test_c_parser.py 2015-06-10 05:00:55.000000000 +0200
|
||||
+++ pycparser-release_v2.14_patched/tests/test_c_parser.py 2019-06-10 14:58:40.725330566 +0200
|
||||
@@ -1637,7 +1637,7 @@
|
||||
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py
|
||||
index 95ae865..0835013 100755
|
||||
--- a/tests/test_c_parser.py
|
||||
+++ b/tests/test_c_parser.py
|
||||
@@ -1718,7 +1718,7 @@ def test_whole_file_with_stdio(self):
|
||||
|
||||
self.assertTrue(isinstance(p.ext[0], Typedef))
|
||||
self.assertEqual(p.ext[0].coord.line, 213)
|
||||
|
@ -15,6 +15,9 @@ URL: http://github.com/eliben/pycparser
|
||||
Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
|
||||
Source1: pycparser-0.91.1-remove-relative-sys-path.py
|
||||
|
||||
# Python no longer accepts certain escape sequences, because they get treated as
|
||||
# unicode escape sequences.
|
||||
# https://github.com/eliben/pycparser/commit/2129f5fb1ec2d06000f10c96510874c5303d9f8c
|
||||
Patch0: pycparser-2.14-rstring_fix.patch
|
||||
|
||||
Patch100: pycparser-2.10-ply.patch
|
||||
|
Loading…
Reference in New Issue
Block a user