summaryrefslogtreecommitdiff
path: root/dev-python/re-assert/files
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/re-assert/files
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/re-assert/files')
-rw-r--r--dev-python/re-assert/files/re-assert-1.1.0-re-fallback.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-python/re-assert/files/re-assert-1.1.0-re-fallback.patch b/dev-python/re-assert/files/re-assert-1.1.0-re-fallback.patch
new file mode 100644
index 000000000000..b292d48d6e0f
--- /dev/null
+++ b/dev-python/re-assert/files/re-assert-1.1.0-re-fallback.patch
@@ -0,0 +1,42 @@
+diff --git a/re_assert.py b/re_assert.py
+index 840401e..8818da1 100644
+--- a/re_assert.py
++++ b/re_assert.py
+@@ -1,8 +1,13 @@
++import sys
++
+ from typing import Any
+ from typing import Optional
+ from typing import Pattern
+
+-import regex
++if sys.implementation.name == "cpython":
++ import regex
++else:
++ import re as regex
+
+
+ class Matches: # TODO: Generic[AnyStr] (binary pattern support)
+@@ -12,6 +17,9 @@ class Matches: # TODO: Generic[AnyStr] (binary pattern support)
+ self._type = type(pattern)
+
+ def _fail_message(self, fail: str) -> str:
++ if sys.implementation.name != "cpython":
++ return "regex failed to match"
++
+ # binary search to find the longest substring match
+ pos, bound = 0, len(fail)
+ while pos < bound:
+diff --git a/setup.cfg b/setup.cfg
+index 46303ca..74cf999 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -20,7 +20,7 @@ classifiers =
+ [options]
+ py_modules = re_assert
+ install_requires =
+- regex
++ regex; python_implementation=="CPython"
+ python_requires = >=3.6.1
+
+ [bdist_wheel]