regex 2025.9.18__cp310-cp310-musllinux_1_2_s390x.whl → 2025.10.23__cp310-cp310-musllinux_1_2_s390x.whl
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.
Potentially problematic release.
This version of regex might be problematic. Click here for more details.
- regex/__init__.py +3 -3
- regex/{regex.py → _main.py} +4 -4
- regex/_regex.cpython-310-s390x-linux-gnu.so +0 -0
- regex/_regex_core.py +40 -5
- regex/{test_regex.py → tests/test_regex.py} +1 -1
- {regex-2025.9.18.dist-info → regex-2025.10.23.dist-info}/METADATA +2 -2
- regex-2025.10.23.dist-info/RECORD +10 -0
- regex-2025.9.18.dist-info/RECORD +0 -10
- {regex-2025.9.18.dist-info → regex-2025.10.23.dist-info}/WHEEL +0 -0
- {regex-2025.9.18.dist-info → regex-2025.10.23.dist-info}/licenses/LICENSE.txt +0 -0
- {regex-2025.9.18.dist-info → regex-2025.10.23.dist-info}/top_level.txt +0 -0
regex/__init__.py
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
from . import
|
|
3
|
-
__all__ = regex.__all__
|
|
1
|
+
import regex._main
|
|
2
|
+
from regex._main import *
|
|
3
|
+
__all__ = regex._main.__all__
|
regex/{regex.py → _main.py}
RENAMED
|
@@ -241,7 +241,7 @@ __all__ = ["cache_all", "compile", "DEFAULT_VERSION", "escape", "findall",
|
|
|
241
241
|
"VERSION1", "X", "VERBOSE", "W", "WORD", "error", "Regex", "__version__",
|
|
242
242
|
"__doc__", "RegexFlag"]
|
|
243
243
|
|
|
244
|
-
__version__ = "
|
|
244
|
+
__version__ = "2025.10.23"
|
|
245
245
|
|
|
246
246
|
# --------------------------------------------------------------------
|
|
247
247
|
# Public interface.
|
|
@@ -414,8 +414,8 @@ def escape(pattern, special_only=True, literal_spaces=False):
|
|
|
414
414
|
# --------------------------------------------------------------------
|
|
415
415
|
# Internals.
|
|
416
416
|
|
|
417
|
-
|
|
418
|
-
|
|
417
|
+
from regex import _regex_core
|
|
418
|
+
from regex import _regex
|
|
419
419
|
from threading import RLock as _RLock
|
|
420
420
|
from locale import getpreferredencoding as _getpreferredencoding
|
|
421
421
|
from regex._regex_core import *
|
|
@@ -429,7 +429,7 @@ from regex._regex_core import (ALNUM as _ALNUM, Info as _Info, OP as _OP, Source
|
|
|
429
429
|
# Version 0 is the old behaviour, compatible with the original 're' module.
|
|
430
430
|
# Version 1 is the new behaviour, which differs slightly.
|
|
431
431
|
|
|
432
|
-
DEFAULT_VERSION = VERSION0
|
|
432
|
+
DEFAULT_VERSION = RegexFlag.VERSION0
|
|
433
433
|
|
|
434
434
|
_METACHARS = frozenset("()[]{}?*+|^$\\.-#&~")
|
|
435
435
|
|
|
Binary file
|
regex/_regex_core.py
CHANGED
|
@@ -18,7 +18,7 @@ import string
|
|
|
18
18
|
import unicodedata
|
|
19
19
|
from collections import defaultdict
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
from regex import _regex
|
|
22
22
|
|
|
23
23
|
__all__ = ["A", "ASCII", "B", "BESTMATCH", "D", "DEBUG", "E", "ENHANCEMATCH",
|
|
24
24
|
"F", "FULLCASE", "I", "IGNORECASE", "L", "LOCALE", "M", "MULTILINE", "P",
|
|
@@ -121,7 +121,42 @@ class RegexFlag(enum.IntFlag):
|
|
|
121
121
|
|
|
122
122
|
__str__ = object.__str__
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
# Put the flags into the module namespace. Being explicit here helps tools like
|
|
125
|
+
# linters and IDEs understand the code better.
|
|
126
|
+
ASCII = RegexFlag.ASCII
|
|
127
|
+
BESTMATCH = RegexFlag.BESTMATCH
|
|
128
|
+
DEBUG = RegexFlag.DEBUG
|
|
129
|
+
DOTALL = RegexFlag.DOTALL
|
|
130
|
+
ENHANCEMATCH = RegexFlag.ENHANCEMATCH
|
|
131
|
+
FULLCASE = RegexFlag.FULLCASE
|
|
132
|
+
IGNORECASE = RegexFlag.IGNORECASE
|
|
133
|
+
LOCALE = RegexFlag.LOCALE
|
|
134
|
+
MULTILINE = RegexFlag.MULTILINE
|
|
135
|
+
POSIX = RegexFlag.POSIX
|
|
136
|
+
REVERSE = RegexFlag.REVERSE
|
|
137
|
+
TEMPLATE = RegexFlag.TEMPLATE
|
|
138
|
+
UNICODE = RegexFlag.UNICODE
|
|
139
|
+
VERBOSE = RegexFlag.VERBOSE
|
|
140
|
+
VERSION0 = RegexFlag.VERSION0
|
|
141
|
+
VERSION1 = RegexFlag.VERSION1
|
|
142
|
+
WORD = RegexFlag.WORD
|
|
143
|
+
A = RegexFlag.A
|
|
144
|
+
B = RegexFlag.B
|
|
145
|
+
D = RegexFlag.D
|
|
146
|
+
E = RegexFlag.E
|
|
147
|
+
F = RegexFlag.F
|
|
148
|
+
I = RegexFlag.I
|
|
149
|
+
L = RegexFlag.L
|
|
150
|
+
M = RegexFlag.M
|
|
151
|
+
P = RegexFlag.P
|
|
152
|
+
R = RegexFlag.R
|
|
153
|
+
S = RegexFlag.S
|
|
154
|
+
U = RegexFlag.U
|
|
155
|
+
V0 = RegexFlag.V0
|
|
156
|
+
V1 = RegexFlag.V1
|
|
157
|
+
W = RegexFlag.W
|
|
158
|
+
X = RegexFlag.X
|
|
159
|
+
T = RegexFlag.T
|
|
125
160
|
|
|
126
161
|
DEFAULT_VERSION = VERSION1
|
|
127
162
|
|
|
@@ -2488,7 +2523,7 @@ class CallGroup(RegexBase):
|
|
|
2488
2523
|
self._key = self.__class__, self.group
|
|
2489
2524
|
|
|
2490
2525
|
def remove_captures(self):
|
|
2491
|
-
raise error("group reference not allowed", pattern, self.position)
|
|
2526
|
+
raise error("group reference not allowed", self.pattern, self.position)
|
|
2492
2527
|
|
|
2493
2528
|
def _compile(self, reverse, fuzzy):
|
|
2494
2529
|
return [(OP.GROUP_CALL, self.call_ref)]
|
|
@@ -3058,7 +3093,7 @@ class Group(RegexBase):
|
|
|
3058
3093
|
def dump(self, indent, reverse):
|
|
3059
3094
|
group = self.group
|
|
3060
3095
|
if group < 0:
|
|
3061
|
-
group = private_groups[group]
|
|
3096
|
+
group = self.info.private_groups[group]
|
|
3062
3097
|
print("{}GROUP {}".format(INDENT * indent, group))
|
|
3063
3098
|
self.subpattern.dump(indent + 1, reverse)
|
|
3064
3099
|
|
|
@@ -3413,7 +3448,7 @@ class RefGroup(RegexBase):
|
|
|
3413
3448
|
self._key = self.__class__, self.group, self.case_flags
|
|
3414
3449
|
|
|
3415
3450
|
def remove_captures(self):
|
|
3416
|
-
raise error("group reference not allowed", pattern, self.position)
|
|
3451
|
+
raise error("group reference not allowed", self.pattern, self.position)
|
|
3417
3452
|
|
|
3418
3453
|
def _compile(self, reverse, fuzzy):
|
|
3419
3454
|
flags = 0
|
|
@@ -883,7 +883,7 @@ class RegexTests(unittest.TestCase):
|
|
|
883
883
|
def test_empty_array(self):
|
|
884
884
|
# SF buf 1647541.
|
|
885
885
|
import array
|
|
886
|
-
for typecode in '
|
|
886
|
+
for typecode in 'bBhHiIlLfd':
|
|
887
887
|
a = array.array(typecode)
|
|
888
888
|
self.assertEqual(regex.compile(b"bla").match(a), None)
|
|
889
889
|
self.assertEqual(regex.compile(b"").match(a)[1 : ], ())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: regex
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.10.23
|
|
4
4
|
Summary: Alternative regular expression module, to replace re.
|
|
5
5
|
Author-email: Matthew Barnett <regex@mrabarnett.plus.com>
|
|
6
6
|
License-Expression: Apache-2.0 AND CNRI-Python
|
|
@@ -46,7 +46,7 @@ The regex module releases the GIL during matching on instances of the built-in (
|
|
|
46
46
|
Unicode
|
|
47
47
|
-------
|
|
48
48
|
|
|
49
|
-
This module supports Unicode
|
|
49
|
+
This module supports Unicode 17.0.0. Full Unicode case-folding is supported.
|
|
50
50
|
|
|
51
51
|
Flags
|
|
52
52
|
-----
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
regex/__init__.py,sha256=A5k0rm8Ln7HKsfG-8sEWYehek8zCKEe6sQW5QGUAmSU,75
|
|
2
|
+
regex/_main.py,sha256=3rTJ49yYUTmStToXo_h-lf4kJngVlAbZhDEHzTrW3zs,32681
|
|
3
|
+
regex/_regex.cpython-310-s390x-linux-gnu.so,sha256=bZppSCySqzn0cxpkRbB4ZItDFNBk0OiOWXjsx6hwpAw,2137352
|
|
4
|
+
regex/_regex_core.py,sha256=A79HGIRfcI3GtbXHlNFRi4BVqKPn_T0mN-MdFAWeBDI,145525
|
|
5
|
+
regex/tests/test_regex.py,sha256=iE4XOfiEpWrGKDUZISDxlxNi-Y0rX8KPH8yAwpMTLbI,225809
|
|
6
|
+
regex-2025.10.23.dist-info/METADATA,sha256=JBC2XeH-BncXTyZwTV08p08E2cvct97QvhUxjoUWD0k,40468
|
|
7
|
+
regex-2025.10.23.dist-info/WHEEL,sha256=K8pLtUy2famohvb0jCKfihG-L7r678oP0GxFp3WMpZw,111
|
|
8
|
+
regex-2025.10.23.dist-info/top_level.txt,sha256=aQmiDMhNTF26cCK4_7D-qaVvhbxClG0wyCTnEhkzYBs,6
|
|
9
|
+
regex-2025.10.23.dist-info/RECORD,,
|
|
10
|
+
regex-2025.10.23.dist-info/licenses/LICENSE.txt,sha256=v_Ve9M3MjBTOJZ-OirYOJkQYRA1jNfTcE4Jz-9UGFE0,11584
|
regex-2025.9.18.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
regex/__init__.py,sha256=9slNQEb4SCZ9LncNzcQvqmkyxXlcOAF7QwAwigxWjsw,65
|
|
2
|
-
regex/_regex.cpython-310-s390x-linux-gnu.so,sha256=ysN9p2QMSr7iYciTzxuJ6YS-a4jpE1ve31sxQfLBreQ,2132808
|
|
3
|
-
regex/_regex_core.py,sha256=Sc72uTUn02segfjUvAN8fqWhlidiVArL-ODNOzC0vKQ,144661
|
|
4
|
-
regex/regex.py,sha256=UjJthKd24f34PfvGNkSqgnHgtbSmT3mjPhAdZedf_D8,32683
|
|
5
|
-
regex/test_regex.py,sha256=2GH_zmbgL8s2QYTlK5Py5C6IHwMGYDHeZGM1e-_Xe7Y,225810
|
|
6
|
-
regex-2025.9.18.dist-info/METADATA,sha256=ppVSsHk1elKol6eLDEfsSIrvQKptKmwqmvcfEAXoBNI,40467
|
|
7
|
-
regex-2025.9.18.dist-info/WHEEL,sha256=K8pLtUy2famohvb0jCKfihG-L7r678oP0GxFp3WMpZw,111
|
|
8
|
-
regex-2025.9.18.dist-info/top_level.txt,sha256=aQmiDMhNTF26cCK4_7D-qaVvhbxClG0wyCTnEhkzYBs,6
|
|
9
|
-
regex-2025.9.18.dist-info/RECORD,,
|
|
10
|
-
regex-2025.9.18.dist-info/licenses/LICENSE.txt,sha256=v_Ve9M3MjBTOJZ-OirYOJkQYRA1jNfTcE4Jz-9UGFE0,11584
|
|
File without changes
|
|
File without changes
|
|
File without changes
|