1
1
mirror of https://github.com/mrabarnett/mrab-regex.git synced 2025-10-05 20:02:39 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Matthew Barnett
88fee8529b Updated main.yml and pyproject.toml. 2025-07-30 18:09:15 +01:00
mrabarnett
7ebda8c032 Merge pull request #582 from facelessuser/bugfix/setuptools
Fix sdist license failure with setuptools
2025-07-30 17:54:17 +01:00
facelessuser
26d6efc9bf Setup failure scenario
Fix sdist license failure with setuptools
2025-07-30 10:32:22 -06:00
Matthew Barnett
a4a6d9443b Git issue 580: Regression in v2025.7.31: \P{L} no longer matches in simple patterns 2025-07-30 16:41:17 +01:00
6 changed files with 19 additions and 5 deletions

View File

@@ -47,6 +47,7 @@ jobs:
- name: Build source distribution
run: |
python -m pip install -U setuptools
python setup.py sdist --formats=gztar
- name: Upload source distribution

View File

@@ -1,3 +1,11 @@
Version: 2025.7.33
Updated main.yml and pyproject.toml.
Version: 2025.7.32
Git issue 580: Regression in v2025.7.31: \P{L} no longer matches in simple patterns
Version: 2025.7.31
Further updates to main.yml.

View File

@@ -1,16 +1,17 @@
[build-system]
requires = ["setuptools > 61.0"]
requires = ["setuptools > 77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "regex"
version = "2025.7.31"
version = "2025.7.33"
description = "Alternative regular expression module, to replace re."
readme = "README.rst"
authors = [
{name = "Matthew Barnett", email = "regex@mrabarnett.plus.com"},
]
license = {file = "LICENSE.txt"}
license = "Apache-2.0 AND CNRI-Python"
license-files = ["LICENSE.txt"]
classifiers = [
"Development Status :: 5 - Production/Stable",

View File

@@ -336,7 +336,7 @@ def _compile_firstset(info, fs):
"Compiles the firstset for the pattern."
reverse = bool(info.flags & REVERSE)
fs = _check_firstset(info, reverse, fs)
if not fs:
if not fs or isinstance(fs, AnyAll):
return []
# Compile the firstset.

View File

@@ -241,7 +241,7 @@ __all__ = ["cache_all", "compile", "DEFAULT_VERSION", "escape", "findall",
"VERSION1", "X", "VERBOSE", "W", "WORD", "error", "Regex", "__version__",
"__doc__", "RegexFlag"]
__version__ = "2.5.156"
__version__ = "2.5.158"
# --------------------------------------------------------------------
# Public interface.

View File

@@ -4373,6 +4373,10 @@ thing
self.assertEqual(bool(regex.match(r'\d', '\uFF19')), True)
self.assertEqual(bool(regex.match(r'(?a:\d)', '\uFF19')), False)
# Git issue 580: Regression in v2025.7.31: \P{L} no longer matches in simple patterns
self.assertEqual(bool(regex.match(r"\A\P{L}?\p{L}", "hello,")), True)
self.assertEqual(bool(regex.fullmatch(r"\A\P{L}*(?P<w>\p{L}+)\P{L}*\Z", "hello,")), True)
def test_fuzzy_ext(self):
self.assertEqual(bool(regex.fullmatch(r'(?r)(?:a){e<=1:[a-z]}', 'e')),
True)