summaryrefslogtreecommitdiff
path: root/dev-python/backrefs/files
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-06-22 09:38:51 +0200
committerMichał Górny <mgorny@gentoo.org>2022-06-22 09:38:51 +0200
commit1aee2c9d2c1201d16ad2a6f85c4d294b200e0998 (patch)
tree888ae589dfff0f2576dc1f05abc86338d305f01a /dev-python/backrefs/files
parent2c27f383b71908c878fe97fda3c7fa24905c84ff (diff)
downloadgentoo-1aee2c9d2c1201d16ad2a6f85c4d294b200e0998.tar.gz
gentoo-1aee2c9d2c1201d16ad2a6f85c4d294b200e0998.tar.bz2
gentoo-1aee2c9d2c1201d16ad2a6f85c4d294b200e0998.zip
dev-python/backrefs: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/backrefs/files')
-rw-r--r--dev-python/backrefs/files/backrefs-5.2-fix-regex-unrecognized-escape.patch157
1 files changed, 0 insertions, 157 deletions
diff --git a/dev-python/backrefs/files/backrefs-5.2-fix-regex-unrecognized-escape.patch b/dev-python/backrefs/files/backrefs-5.2-fix-regex-unrecognized-escape.patch
deleted file mode 100644
index 6bb217d1f66e..000000000000
--- a/dev-python/backrefs/files/backrefs-5.2-fix-regex-unrecognized-escape.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 78577debb9127ace54101f77e669d7c674476803 Mon Sep 17 00:00:00 2001
-From: facelessuser <faceless.shop@gmail.com>
-Date: Fri, 8 Apr 2022 18:35:00 -0600
-Subject: [PATCH] Fixes for recent regex library handling of unrecognized
- escapes
-
----
- tests/test_bre.py | 4 +--
- tests/test_bregex.py | 60 +++++++++++++++++++++-----------------------
- 2 files changed, 30 insertions(+), 34 deletions(-)
-
-diff --git a/tests/test_bre.py b/tests/test_bre.py
-index d88fe86..64b9a57 100644
---- a/tests/test_bre.py
-+++ b/tests/test_bre.py
-@@ -1464,7 +1464,7 @@ def test_escaped_slash_before_backref(self):
-
- self.assertEqual(r'\\test: \This is a test of escaped slash backrefs!', results)
-
-- def test_normal_escaping(self):
-+ def test_normal_escaping_replace(self):
- """Test normal escaped slash."""
-
- text = "This is a test of normal escaping!"
-@@ -1478,7 +1478,7 @@ def test_normal_escaping(self):
- self.assertEqual(results2, results)
- self.assertEqual('\t \\t \\\t \\\\t \\\\\t', results)
-
-- def test_bytes_normal_escaping(self):
-+ def test_bytes_normal_escaping_replace(self):
- """Test bytes normal escaped slash."""
-
- text = b"This is a test of normal escaping!"
-diff --git a/tests/test_bregex.py b/tests/test_bregex.py
-index 929227a..5a3d0af 100644
---- a/tests/test_bregex.py
-+++ b/tests/test_bregex.py
-@@ -801,12 +801,10 @@ def test_bytes_line_break(self):
- )
-
- def test_line_break_in_group(self):
-- """Test that line break in group matches a normal R."""
-+ """Test that line break in group fails."""
-
-- self.assertEqual(
-- bregex.sub(r"[\R]", 'l', 'Rine\r\nRine\nRine\r'),
-- 'line\r\nline\nline\r'
-- )
-+ with self.assertRaises(_regex_core.error):
-+ bregex.sub(r"[\R]", 'l', 'Rine\r\nRine\nRine\r')
-
- def test_replace_unicode_name_ascii_range(self):
- """Test replacing Unicode names in the ASCII range."""
-@@ -1176,33 +1174,33 @@ def test_escaped_slash_before_backref(self):
-
- self.assertEqual(r'\\test: \This is a test of escaped slash backrefs!', results)
-
-- def test_normal_escaping(self):
-+ def test_normal_escaping_replace(self):
- """Test normal escaped slash."""
-
- text = "This is a test of normal escaping!"
- pattern = regex.compile(r"(.+)")
-- repl_pattern = r'\e \\e \\\e \\\\e \\\\\e'
-+ repl_pattern = r'\t \\t \\\t \\\\t \\\\\t'
- expand = bregex.compile_replace(pattern, repl_pattern)
- m = pattern.match(text)
- results = expand(m)
- results2 = pattern.sub(repl_pattern, text)
-
- self.assertEqual(results2, results)
-- self.assertEqual('\\e \\e \\\\e \\\\e \\\\\\e', results)
-+ self.assertEqual('\t \\t \\\t \\\\t \\\\\t', results)
-
-- def test_bytes_normal_escaping(self):
-+ def test_bytes_normal_escaping_replace(self):
- """Test bytes normal escaped slash."""
-
- text = b"This is a test of normal escaping!"
- pattern = regex.compile(br"(.+)")
-- repl_pattern = br'\e \\e \\\e \\\\e \\\\\e'
-+ repl_pattern = br'\t \\t \\\t \\\\t \\\\\t'
- expand = bregex.compile_replace(pattern, repl_pattern)
- m = pattern.match(text)
- results = expand(m)
- results2 = pattern.sub(repl_pattern, text)
-
- self.assertEqual(results2, results)
-- self.assertEqual(b'\\e \\e \\\\e \\\\e \\\\\\e', results)
-+ self.assertEqual(b'\t \\t \\\t \\\\t \\\\\t', results)
-
- def test_escaped_slash_at_eol(self):
- """Test escaped slash at end of line."""
-@@ -1214,15 +1212,12 @@ def test_escaped_slash_at_eol(self):
-
- self.assertEqual('\\\\', results)
-
-- def test_unrecognized_backrefs(self):
-+ def test_unrecognized_backrefs2(self):
- """Test unrecognized backrefs, or literal backslash before a char."""
-
-- text = "This is a test of unrecognized backrefs!"
- pattern = regex.compile(r"(.+)")
-- expand = bregex.compile_replace(pattern, r'\k\1')
-- results = expand(pattern.match(text))
--
-- self.assertEqual(r'\kThis is a test of unrecognized backrefs!', results)
-+ with self.assertRaises(_regex_core.error):
-+ bregex.compile_replace(pattern, r'\k\1')
-
- def test_ignore_group(self):
- """Test that backrefs inserted by matching groups are passed over."""
-@@ -1628,23 +1623,23 @@ def test_dont_case_special_refs(self):
- self.assertEqual('\u0108\nWw\u0108', results)
-
- # Bytes doesn't care about Unicode, but should evaluate bytes
-- pattern = regex.compile(b'Test')
-- expand = bregex.compile_replace(pattern, br'\C\u0109\n\x77\E\l\x57\c\u0109')
-- results = expand(pattern.match(b'Test'))
-- self.assertEqual(b'\\U0109\nWw\\u0109', results)
-+ # pattern = regex.compile(b'Test')
-+ # expand = bregex.compile_replace(pattern, br'\C\u0109\n\x77\E\l\x57\c\u0109')
-+ # results = expand(pattern.match(b'Test'))
-+ # self.assertEqual(b'\\U0109\nWw\\u0109', results)
-
-- expandf = bregex.compile_replace(pattern, br'\C\u0109\n\x77\E\l\x57\c\u0109', bregex.FORMAT)
-- results = expandf(pattern.match(b'Test'))
-- self.assertEqual(b'\\U0109\nWw\\u0109', results)
-+ # expandf = bregex.compile_replace(pattern, br'\C\u0109\n\x77\E\l\x57\c\u0109', bregex.FORMAT)
-+ # results = expandf(pattern.match(b'Test'))
-+ # self.assertEqual(b'\\U0109\nWw\\u0109', results)
-
-- pattern = regex.compile(b'Test')
-- expand = bregex.compile_replace(pattern, br'\C\U00000109\n\x77\E\l\x57\c\U00000109')
-- results = expand(pattern.match(b'Test'))
-- self.assertEqual(b'\U00000109\nWw\U00000109', results)
-+ # pattern = regex.compile(b'Test')
-+ # expand = bregex.compile_replace(pattern, br'\C\U00000109\n\x77\E\l\x57\c\U00000109')
-+ # results = expand(pattern.match(b'Test'))
-+ # self.assertEqual(b'\U00000109\nWw\U00000109', results)
-
-- expandf = bregex.compile_replace(pattern, br'\C\U00000109\n\x77\E\l\x57\c\U00000109', bregex.FORMAT)
-- results = expandf(pattern.match(b'Test'))
-- self.assertEqual(b'\U00000109\nWw\U00000109', results)
-+ # expandf = bregex.compile_replace(pattern, br'\C\U00000109\n\x77\E\l\x57\c\U00000109', bregex.FORMAT)
-+ # results = expandf(pattern.match(b'Test'))
-+ # self.assertEqual(b'\U00000109\nWw\U00000109', results)
-
- # Format doesn't care about groups
- pattern = regex.compile('Test')
-@@ -2184,4 +2179,5 @@ def test_auto_compile_off(self):
- replace = p.compile(r'{1}', bregex.FORMAT)
- self.assertEqual(p.subf(replace, 'tests'), 'test')
-
-- self.assertEqual(p.sub(r'\ltest', 'tests'), r'\ltest')
-+ with self.assertRaises(_regex_core.error):
-+ self.assertEqual(p.sub(r'\ltest', 'tests'), r'\ltest')