[Python-modules-commits] [python-regex] 01/05: Import python-regex_0.1.20161227.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Thu Jan 5 19:37:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository python-regex.

commit f5171bde777458d756dfb7392e2c3da9292eaeec
Author: Sandro Tosi <morph at debian.org>
Date:   Thu Jan 5 14:29:10 2017 -0500

    Import python-regex_0.1.20161227.orig.tar.gz
---
 PKG-INFO              | 2 +-
 Python2/_regex.c      | 6 ++++++
 Python2/regex.py      | 2 +-
 Python2/test_regex.py | 4 ++++
 Python3/_regex.c      | 6 ++++++
 Python3/regex.py      | 2 +-
 Python3/test_regex.py | 4 ++++
 setup.py              | 2 +-
 8 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index e61af1a..774bcd5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: regex
-Version: 2016.11.21
+Version: 2016.12.27
 Summary: Alternative regular expression module, to replace re.
 Home-page: https://bitbucket.org/mrabarnett/mrab-regex
 Author: Matthew Barnett
diff --git a/Python2/_regex.c b/Python2/_regex.c
index 17c08e2..bd77820 100644
--- a/Python2/_regex.c
+++ b/Python2/_regex.c
@@ -10932,6 +10932,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -10976,6 +10977,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &end_pos, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11019,6 +11021,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &end_pos, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11062,6 +11065,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11106,6 +11110,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11150,6 +11155,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
diff --git a/Python2/regex.py b/Python2/regex.py
index a868ea2..b34a14c 100644
--- a/Python2/regex.py
+++ b/Python2/regex.py
@@ -239,7 +239,7 @@ __all__ = ["compile", "escape", "findall", "finditer", "fullmatch", "match",
   "U", "UNICODE", "V0", "VERSION0", "V1", "VERSION1", "X", "VERBOSE", "W",
   "WORD", "error", "Regex"]
 
-__version__ = "2.4.112"
+__version__ = "2.4.113"
 
 # --------------------------------------------------------------------
 # Public interface.
diff --git a/Python2/test_regex.py b/Python2/test_regex.py
index 5d7321f..982eed7 100644
--- a/Python2/test_regex.py
+++ b/Python2/test_regex.py
@@ -3713,6 +3713,10 @@ thing
         self.assertEqual(regex.search('(^123$){s,i,d}', 'xxxxxxxx123',
           regex.BESTMATCH).fuzzy_counts, (0, 8, 0))
 
+        # Hg issue 227: Incorrect behavior for ? operator with UNICODE + IGNORECASE
+        self.assertEqual(regex.search(r'a?yz', 'xxxxyz', flags=regex.FULLCASE |
+          regex.IGNORECASE).span(), (4, 6))
+
     def test_subscripted_captures(self):
         self.assertEqual(regex.match(r'(?P<x>.)+',
           'abc').expandf('{0} {0[0]} {0[-1]}'), 'abc abc abc')
diff --git a/Python3/_regex.c b/Python3/_regex.c
index 5080e6e..ad468b6 100644
--- a/Python3/_regex.c
+++ b/Python3/_regex.c
@@ -10961,6 +10961,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11005,6 +11006,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &end_pos, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11048,6 +11050,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &end_pos, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11091,6 +11094,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11135,6 +11139,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
@@ -11179,6 +11184,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
               state->text_pos, limit, &is_partial);
         else {
             found_pos = state->req_pos;
+            end_pos = state->req_end;
             is_partial = FALSE;
         }
 
diff --git a/Python3/regex.py b/Python3/regex.py
index d809c9a..221e684 100644
--- a/Python3/regex.py
+++ b/Python3/regex.py
@@ -239,7 +239,7 @@ __all__ = ["compile", "escape", "findall", "finditer", "fullmatch", "match",
   "U", "UNICODE", "V0", "VERSION0", "V1", "VERSION1", "X", "VERBOSE", "W",
   "WORD", "error", "Regex"]
 
-__version__ = "2.4.112"
+__version__ = "2.4.113"
 
 # --------------------------------------------------------------------
 # Public interface.
diff --git a/Python3/test_regex.py b/Python3/test_regex.py
index 36a4f93..35590d4 100644
--- a/Python3/test_regex.py
+++ b/Python3/test_regex.py
@@ -3817,6 +3817,10 @@ thing
         self.assertEqual(regex.search('(^123$){s,i,d}', 'xxxxxxxx123',
           regex.BESTMATCH).fuzzy_counts, (0, 8, 0))
 
+        # Hg issue 227: Incorrect behavior for ? operator with UNICODE + IGNORECASE
+        self.assertEqual(regex.search(r'a?yz', 'xxxxyz', flags=regex.FULLCASE |
+          regex.IGNORECASE).span(), (4, 6))
+
     def test_subscripted_captures(self):
         self.assertEqual(regex.match(r'(?P<x>.)+',
           'abc').expandf('{0} {0[0]} {0[-1]}'), 'abc abc abc')
diff --git a/setup.py b/setup.py
index 7ab366a..60ede83 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ DOCS_DIR = os.path.join(BASE_DIR, 'docs')
 
 setup(
     name='regex',
-    version='2016.11.21',
+    version='2016.12.27',
     description='Alternative regular expression module, to replace re.',
     long_description=open(os.path.join(DOCS_DIR, 'Features.rst')).read(),
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-regex.git



More information about the Python-modules-commits mailing list