backrefs 6.1__tar.gz → 7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {backrefs-6.1 → backrefs-7.0}/LICENSE.md +1 -1
- {backrefs-6.1 → backrefs-7.0}/PKG-INFO +2 -3
- {backrefs-6.1 → backrefs-7.0}/backrefs/__meta__.py +1 -1
- {backrefs-6.1 → backrefs-7.0}/backrefs/_bre_parse.py +0 -9
- {backrefs-6.1 → backrefs-7.0}/backrefs/_bregex_parse.py +0 -4
- {backrefs-6.1 → backrefs-7.0}/backrefs/bre.py +4 -1
- {backrefs-6.1 → backrefs-7.0}/backrefs/bregex.py +4 -1
- {backrefs-6.1 → backrefs-7.0}/backrefs/uniprops/__init__.py +163 -90
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/about/changelog.md +13 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/refs.md +49 -73
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/usage.md +27 -14
- backrefs-7.0/docs/theme/assets/pymdownx-extras/extra-95634471d6.css +2 -0
- {backrefs-6.1 → backrefs-7.0}/hatch_build.py +0 -1
- {backrefs-6.1 → backrefs-7.0}/pyproject.toml +2 -2
- {backrefs-6.1 → backrefs-7.0}/tests/test_age.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_bidiclass.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_bidipairedbrackettype.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_binary.py +22 -20
- {backrefs-6.1 → backrefs-7.0}/tests/test_block.py +38 -34
- {backrefs-6.1 → backrefs-7.0}/tests/test_bre.py +16 -35
- {backrefs-6.1 → backrefs-7.0}/tests/test_bregex.py +0 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_canonicalcombiningclass.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_decompositiontype.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_eastasianwidth.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_generalcategory.py +20 -18
- {backrefs-6.1 → backrefs-7.0}/tests/test_graphemeclusterbreak.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_hangulsyllabletype.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_indicpositionalcategory.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_indicsylabiccategory.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_joininggroup.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_joiningtype.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_linebreak.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_numerictype.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_numericvalue.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_quickcheck.py +59 -57
- {backrefs-6.1 → backrefs-7.0}/tests/test_script.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_scriptextensions.py +21 -19
- {backrefs-6.1 → backrefs-7.0}/tests/test_sentencebreak.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_verticalorientation.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tests/test_wordbreak.py +17 -15
- {backrefs-6.1 → backrefs-7.0}/tools/unipropgen.py +6 -4
- backrefs-6.1/docs/theme/assets/pymdownx-extras/extra-835c322b67.css +0 -2
- {backrefs-6.1 → backrefs-7.0}/.coveragerc +0 -0
- {backrefs-6.1 → backrefs-7.0}/.gitignore +0 -0
- {backrefs-6.1 → backrefs-7.0}/.pyspelling.yml +0 -0
- {backrefs-6.1 → backrefs-7.0}/README.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/backrefs/__init__.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/backrefs/_bregex_typing.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/backrefs/py.typed +0 -0
- {backrefs-6.1 → backrefs-7.0}/backrefs/util.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/.snippets/links.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/about/contributing.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/about/license.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/about/security.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/src/markdown/index.md +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/theme/announce.html +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/theme/assets/pymdownx-extras/extra-loader-Ccztcqfq.js +0 -0
- {backrefs-6.1 → backrefs-7.0}/docs/theme/main.html +0 -0
- {backrefs-6.1 → backrefs-7.0}/requirements/docs.txt +0 -0
- {backrefs-6.1 → backrefs-7.0}/requirements/lint.txt +0 -0
- {backrefs-6.1 → backrefs-7.0}/requirements/test.txt +0 -0
- {backrefs-6.1 → backrefs-7.0}/tests/__init__.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/tests/test_uniprops.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/tests/test_versions.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/__init__.py +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/13.0.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/14.0.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/15.0.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/15.1.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/16.0.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/17.0.0.zip +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unicodedata/LICENSE +0 -0
- {backrefs-6.1 → backrefs-7.0}/tools/unidatadownload.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: backrefs
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0
|
|
4
4
|
Summary: A wrapper around re and regex that adds additional back references.
|
|
5
5
|
Project-URL: Homepage, https://github.com/facelessuser/backrefs
|
|
6
6
|
Author-email: Isaac Muse <Isaac.Muse@gmail.com>
|
|
@@ -13,7 +13,6 @@ Classifier: Intended Audience :: Developers
|
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -21,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
22
|
Classifier: Typing :: Typed
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
25
24
|
Provides-Extra: extras
|
|
26
25
|
Requires-Dist: regex; extra == 'extras'
|
|
27
26
|
Description-Content-Type: text/markdown
|
|
@@ -193,5 +193,5 @@ def parse_version(ver: str) -> Version:
|
|
|
193
193
|
return Version(major, minor, micro, release, pre, post, dev)
|
|
194
194
|
|
|
195
195
|
|
|
196
|
-
__version_info__ = Version(
|
|
196
|
+
__version_info__ = Version(7, 0, 0, "final")
|
|
197
197
|
__version__ = __version_info__._get_canonical()
|
|
@@ -81,7 +81,6 @@ class _SearchParser(Generic[AnyStr]):
|
|
|
81
81
|
"""Search Template."""
|
|
82
82
|
|
|
83
83
|
_new_refs = ("c", "C", "e", "E", "h", "l", "L", "m", "M", "N", "p", "P", "Q", "R", "X")
|
|
84
|
-
_re_escape = r"\x1b"
|
|
85
84
|
_re_start_wb = r"\b(?=\w)"
|
|
86
85
|
_re_end_wb = r"\b(?<=\w)"
|
|
87
86
|
_line_break = r'(?:\r\n|(?!\r\n)[\n\v\f\r\x85\u2028\u2029])'
|
|
@@ -307,14 +306,6 @@ class _SearchParser(Generic[AnyStr]):
|
|
|
307
306
|
no_mark = self.unicode_props("^m", None, in_group=False)[0]
|
|
308
307
|
mark = self.unicode_props("m", None, in_group=False)[0]
|
|
309
308
|
current.extend(self._grapheme_cluster.format(no_mark, mark, mark))
|
|
310
|
-
elif t == "e":
|
|
311
|
-
_util.warn_deprecated(R"The \e reference has been deprecated, please use \x1b instead")
|
|
312
|
-
current.append(self._re_escape)
|
|
313
|
-
elif t == "h":
|
|
314
|
-
_util.warn_deprecated(R"The \h reference has been deprecated, please use \p{Horiz_Space} instead")
|
|
315
|
-
current.extend(self.unicode_props('blank', None, in_group=in_group))
|
|
316
|
-
if in_group:
|
|
317
|
-
self.found_property = True
|
|
318
309
|
elif t == 'p':
|
|
319
310
|
prop = self.get_unicode_property(i)
|
|
320
311
|
current.extend(self.unicode_props(prop[0], prop[1], in_group=in_group))
|
|
@@ -71,7 +71,6 @@ class _SearchParser(Generic[AnyStr]):
|
|
|
71
71
|
"""Search Template."""
|
|
72
72
|
|
|
73
73
|
_new_refs = ("e", "R", "Q", "E")
|
|
74
|
-
_re_escape = r"\x1b"
|
|
75
74
|
_line_break = r'(?>\r\n|[\n\v\f\r\x85\u2028\u2029])'
|
|
76
75
|
_bytes_line_break = r'(?>\r\n|[\n\v\f\r\x85])'
|
|
77
76
|
|
|
@@ -199,9 +198,6 @@ class _SearchParser(Generic[AnyStr]):
|
|
|
199
198
|
|
|
200
199
|
if not in_group and t == "R":
|
|
201
200
|
current.append(self._re_line_break)
|
|
202
|
-
elif t == 'e':
|
|
203
|
-
_util.warn_deprecated(R"The \e reference has been deprecated, please use \x1b instead")
|
|
204
|
-
current.extend(self._re_escape)
|
|
205
201
|
else:
|
|
206
202
|
current.extend(["\\", t])
|
|
207
203
|
return current
|
|
@@ -477,7 +477,7 @@ def search(
|
|
|
477
477
|
return _re.search(_apply_search_backrefs(pattern, flags), string, flags, *args, **kwargs)
|
|
478
478
|
|
|
479
479
|
|
|
480
|
-
def
|
|
480
|
+
def prefixmatch(
|
|
481
481
|
pattern: AnyStr | Pattern[AnyStr] | Bre[AnyStr],
|
|
482
482
|
string: AnyStr,
|
|
483
483
|
flags: int | _re.RegexFlag = 0,
|
|
@@ -488,6 +488,9 @@ def match(
|
|
|
488
488
|
return _re.match(_apply_search_backrefs(pattern, flags), string, flags=flags, **kwargs)
|
|
489
489
|
|
|
490
490
|
|
|
491
|
+
match = prefixmatch
|
|
492
|
+
|
|
493
|
+
|
|
491
494
|
def fullmatch(
|
|
492
495
|
pattern: AnyStr | Pattern[AnyStr] | Bre[AnyStr],
|
|
493
496
|
string: AnyStr,
|
|
@@ -498,7 +498,7 @@ def expandf(m: Match[AnyStr] | None, repl: ReplaceTemplate[AnyStr] | AnyStr) ->
|
|
|
498
498
|
return _apply_replace_backrefs(m, repl, flags=FORMAT)
|
|
499
499
|
|
|
500
500
|
|
|
501
|
-
def
|
|
501
|
+
def prefixmatch(
|
|
502
502
|
pattern: AnyStr | Pattern[AnyStr] | Bregex[AnyStr],
|
|
503
503
|
string: AnyStr,
|
|
504
504
|
flags: int = 0,
|
|
@@ -513,6 +513,9 @@ def match(
|
|
|
513
513
|
)
|
|
514
514
|
|
|
515
515
|
|
|
516
|
+
match = prefixmatch
|
|
517
|
+
|
|
518
|
+
|
|
516
519
|
def fullmatch(
|
|
517
520
|
pattern: AnyStr | Pattern[AnyStr] | Bregex[AnyStr],
|
|
518
521
|
string: AnyStr,
|