Compare commits

...

No commits in common. "c8-stream-3.8" and "stream-python38-3.8-rhel-8.10.0" have entirely different histories.

7 changed files with 64 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/release_v2.19.tar.gz
/release_v2.19.tar.gz

View File

@ -1 +1 @@
141582eb2a5ad9fee9bb7646cecb024f0406be8a SOURCES/release_v2.19.tar.gz
141582eb2a5ad9fee9bb7646cecb024f0406be8a release_v2.19.tar.gz

View File

@ -0,0 +1,61 @@
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
#
- 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 --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)
- self.assertLexerError("'\*'", ERR_INVALID_CCONST)
+ self.assertLexerError(r"'\*'", ERR_INVALID_CCONST)
def test_string_literals(self):
- self.assertLexerError('"jx\9"', ERR_STRING_ESCAPE)
- self.assertLexerError('"hekllo\* on ix"', ERR_STRING_ESCAPE)
- self.assertLexerError('L"hekllo\* on ix"', ERR_STRING_ESCAPE)
+ self.assertLexerError(r'"jx\9"', ERR_STRING_ESCAPE)
+ self.assertLexerError(r'"hekllo\* on ix"', ERR_STRING_ESCAPE)
+ self.assertLexerError(r'L"hekllo\* on ix"', ERR_STRING_ESCAPE)
def test_preprocessor(self):
self.assertLexerError('#line "ka"', ERR_FILENAME_BEFORE_LINE)
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)
- self.assertEqual(p.ext[0].coord.file, "D:\eli\cpp_stuff\libc_include/stddef.h")
+ self.assertEqual(p.ext[0].coord.file, r"D:\eli\cpp_stuff\libc_include/stddef.h")
self.assertTrue(isinstance(p.ext[-1], FuncDef))
self.assertEqual(p.ext[-1].coord.line, 15)

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (release_v2.19.tar.gz) = 88fe63c1a7a344c564dfd3b4f99735a4159c8a3f5738bab839943ea7fcbf1f5340f67326550b7e66508ea5862897e5bcdf363c2a8d47eccb50890573a2640a98