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

Sandro Tosi morph at moszumanska.debian.org
Mon Dec 25 04:36:14 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 e28600720c71f81a32ce83543dde5d4ac29fd2e4
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Dec 24 22:28:58 2017 -0500

    Import python-regex_0.1.20171212.orig.tar.gz
---
 PKG-INFO                              |  210 +-
 README                                |    2 +-
 docs/Features.html                    | 2361 ++++----
 docs/Features.rst                     |  201 +-
 docs/UnicodeProperties.txt            |   29 +-
 {Python2 => regex_2}/_regex.c         |  967 +++-
 {Python3 => regex_2}/_regex.h         |    2 +-
 {Python2 => regex_2}/_regex_core.py   |   23 +-
 {Python2 => regex_2}/_regex_unicode.c | 9884 +++++++++++++++++----------------
 {Python2 => regex_2}/_regex_unicode.h |   36 +-
 {Python2 => regex_2}/regex.py         |   22 +-
 {Python2 => regex_2}/test_regex.py    |  299 +-
 {Python3 => regex_3}/_regex.c         |  930 +++-
 {Python2 => regex_3}/_regex.h         |    2 +-
 {Python3 => regex_3}/_regex_core.py   |   23 +-
 {Python3 => regex_3}/_regex_unicode.c | 9884 +++++++++++++++++----------------
 {Python3 => regex_3}/_regex_unicode.h |   36 +-
 {Python3 => regex_3}/regex.py         |   22 +-
 {Python3 => regex_3}/test_regex.py    |  454 +-
 setup.py                              |    8 +-
 tools/build_regex_unicode.py          | 4240 +++++++-------
 21 files changed, 15861 insertions(+), 13774 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index db1dac0..613462c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: regex
-Version: 2017.01.17
+Version: 2017.12.12
 Summary: Alternative regular expression module, to replace re.
 Home-page: https://bitbucket.org/mrabarnett/mrab-regex
 Author: Matthew Barnett
@@ -9,20 +9,25 @@ License: Python Software Foundation License
 Description: Introduction
         ------------
         
-        This new regex implementation is intended eventually to replace Python's current re module implementation.
+        This regex implementation is backwards-compatible with the standard 're' module, but offers additional functionality.
         
-        For testing and comparison with the current 're' module the new implementation is in the form of a module called 'regex'.
+        Note
+        ----
+        
+        The re module's behaviour with zero-width matches changed in Python 3.7, and this module will follow that behaviour when compiled for Python 3.7.
         
         Old vs new behaviour
         --------------------
         
-        This module has 2 behaviours:
+        In order to be compatible with the re module, this module has 2 behaviours:
+        
+        * **Version 0** behaviour (old behaviour, compatible with the re module):
         
-        * **Version 0** behaviour (old behaviour, compatible with the current re module):
+          Please note that the re module's behaviour may change over time, and I'll endeavour to match that behaviour in version 0.
         
           * Indicated by the ``VERSION0`` or ``V0`` flag, or ``(?V0)`` in the pattern.
         
-          * Zero-width matches are handled like in the re module:
+          * Zero-width matches are not handled correctly in the re module before Python 3.7. The behaviour in those earlier versions is:
         
             * ``.split`` won't split a string at a zero-width match.
         
@@ -34,15 +39,11 @@ Description: Introduction
         
           * Case-insensitive matches in Unicode use simple case-folding by default.
         
-        * **Version 1** behaviour (new behaviour, different from the current re module):
+        * **Version 1** behaviour (new behaviour, possibly different from the re module):
         
           * Indicated by the ``VERSION1`` or ``V1`` flag, or ``(?V1)`` in the pattern.
         
-          * Zero-width matches are handled like in Perl and PCRE:
-        
-            * ``.split`` will split a string at a zero-width match.
-        
-            * ``.sub`` will handle zero-width matches correctly.
+          * Zero-width matches are handled correctly.
         
           * Inline flags apply to the end of the group or pattern, and they can be turned off.
         
@@ -50,7 +51,7 @@ Description: Introduction
         
           * Case-insensitive matches in Unicode use full case-folding by default.
         
-        If no version is specified, the regex module will default to ``regex.DEFAULT_VERSION``. In the short term this will be ``VERSION0``, but in the longer term it will be ``VERSION1``.
+        If no version is specified, the regex module will default to ``regex.DEFAULT_VERSION``.
         
         Case-insensitive matches in Unicode
         -----------------------------------
@@ -139,7 +140,7 @@ Description: Introduction
         Unicode
         -------
         
-        This module supports Unicode 9.0.
+        This module supports Unicode 10.0.
         
         Full Unicode case-folding is supported.
         
@@ -148,9 +149,9 @@ Description: Introduction
         
         The issue numbers relate to the Python bug tracker, except where listed as "Hg issue".
         
-        * Fixed support for pickling compiled regexes (Hg issue 195)
+        * Fixed support for pickling compiled regexes (`Hg issue 195 <https://bitbucket.org/mrabarnett/mrab-regex/issues/195>`_)
         
-        * Added support for lookaround in conditional pattern (Hg issue 163)
+        * Added support for lookaround in conditional pattern (`Hg issue 163 <https://bitbucket.org/mrabarnett/mrab-regex/issues/163>`_)
         
           The test of a conditional pattern can now be a lookaround.
         
@@ -176,7 +177,7 @@ Description: Introduction
         
           In the first example, the lookaround matched, but the remainder of the first branch failed to match, and so the second branch was attempted, whereas in the second example, the lookaround matched, and the first branch failed to match, but the second branch was **not** attempted.
         
-        * Added POSIX matching (leftmost longest) (Hg issue 150)
+        * Added POSIX matching (leftmost longest) (`Hg issue 150 <https://bitbucket.org/mrabarnett/mrab-regex/issues/150>`_)
         
           The POSIX standard for regex is to return the leftmost longest match. This can be turned on using the ``POSIX`` flag (``(?p)``).
         
@@ -197,7 +198,7 @@ Description: Introduction
         
           Note that it will take longer to find matches because when it finds a match at a certain position, it won't return that immediately, but will keep looking to see if there's another longer match there.
         
-        * Added ``(?(DEFINE)...)`` (Hg issue 152)
+        * Added ``(?(DEFINE)...)`` (`Hg issue 152 <https://bitbucket.org/mrabarnett/mrab-regex/issues/152>`_)
         
           If there's no group called "DEFINE", then ... will be ignored, but any group definitions within it will be available.
         
@@ -208,7 +209,7 @@ Description: Introduction
             >>> regex.search(r'(?(DEFINE)(?P<quant>\d+)(?P<item>\w+))(?&quant) (?&item)', '5 elephants')
             <regex.Match object; span=(0, 11), match='5 elephants'>
         
-        * Added ``(*PRUNE)``, ``(*SKIP)`` and ``(*FAIL)`` (Hg issue 153)
+        * Added ``(*PRUNE)``, ``(*SKIP)`` and ``(*FAIL)`` (`Hg issue 153 <https://bitbucket.org/mrabarnett/mrab-regex/issues/153>`_)
         
           ``(*PRUNE)`` discards the backtracking info up to that point. When used in an atomic group or a lookaround, it won't affect the enclosing pattern.
         
@@ -216,7 +217,7 @@ Description: Introduction
         
           ``(*FAIL)`` causes immediate backtracking. ``(*F)`` is a permitted abbreviation.
         
-        * Added ``\K`` (Hg issue 151)
+        * Added ``\K`` (`Hg issue 151 <https://bitbucket.org/mrabarnett/mrab-regex/issues/151>`_)
         
           Keeps the part of the entire match after the position where ``\K`` occurred; the part before it is discarded.
         
@@ -238,7 +239,7 @@ Description: Introduction
             >>> m[1]
             'bcdef'
         
-        * Added capture subscripting for ``expandf`` and ``subf``/``subfn`` (Hg issue 133) **(Python 2.6 and above)**
+        * Added capture subscripting for ``expandf`` and ``subf``/``subfn`` (`Hg issue 133 <https://bitbucket.org/mrabarnett/mrab-regex/issues/133>`_)
         
           You can now use subscripting to get the captures of a repeated capture group.
         
@@ -270,7 +271,7 @@ Description: Introduction
         
           The ``LOCALE`` flag is intended for legacy code and has limited support. You're still recommended to use Unicode instead.
         
-        * Added partial matches (Hg issue 102)
+        * Added partial matches (`Hg issue 102 <https://bitbucket.org/mrabarnett/mrab-regex/issues/102>`_)
         
           A partial match is one that matches up to the end of string, but that string has been truncated and you want to know whether a complete match could be possible if the string had not been truncated.
         
@@ -322,29 +323,31 @@ Description: Introduction
             >>> pattern.match('1233', partial=True).partial
             False
         
-        * ``*`` operator not working correctly with sub() (Hg issue 106)
+        * ``*`` operator not working correctly with sub() (`Hg issue 106 <https://bitbucket.org/mrabarnett/mrab-regex/issues/106>`_)
         
           Sometimes it's not clear how zero-width matches should be handled. For example, should ``.*`` match 0 characters directly after matching >0 characters?
         
-          Most regex implementations follow the lead of Perl (PCRE), but the re module sometimes doesn't. The Perl behaviour appears to be the most common (and the re module is sometimes definitely wrong), so in version 1 the regex module follows the Perl behaviour, whereas in version 0 it follows the legacy re behaviour.
-        
           Examples:
         
           .. sourcecode:: python
         
-            >>> # Version 0 behaviour (like re)
-            >>> regex.sub('(?V0).*', 'x', 'test')
+            # Python 3.7 and later
+            >>> regex.sub('.*', 'x', 'test')
             'x'
-            >>> regex.sub('(?V0).*?', '|', 'test')
-            '|t|e|s|t|'
+            >>> regex.sub('.*?', '|', 'test')
+            '|||||'
         
-            >>> # Version 1 behaviour (like Perl)
+            # Python 3.6 and earlier
+            >>> regex.sub('(?V0).*', 'x', 'test')
+            'x'
             >>> regex.sub('(?V1).*', 'x', 'test')
             'xx'
+            >>> regex.sub('(?V0).*?', '|', 'test')
+            '|t|e|s|t|'
             >>> regex.sub('(?V1).*?', '|', 'test')
             '|||||||||'
         
-        * re.group() should never return a bytearray (issue #18468)
+        * re.group() should never return a bytearray (`issue #18468 <https://bugs.python.org/issue18468>`_)
         
           For compatibility with the re module, the regex module returns all matching bytestrings as ``bytes``, starting from Python 3.4.
         
@@ -352,15 +355,13 @@ Description: Introduction
         
           .. sourcecode:: python
         
-            >>> # Python 3.4 and later
             >>> regex.match(b'.', bytearray(b'a')).group()
+            # Python 3.4 and later
             b'a'
-        
-            >>> # Python 3.1-3.3
-            >>> regex.match(b'.', bytearray(b'a')).group()
+            # Python 3.3 and earlier
             bytearray(b'a')
         
-        * Added ``capturesdict`` (Hg issue 86)
+        * Added ``capturesdict`` (`Hg issue 86 <https://bitbucket.org/mrabarnett/mrab-regex/issues/86>`_)
         
           ``capturesdict`` is a combination of ``groupdict`` and ``captures``:
         
@@ -384,7 +385,7 @@ Description: Introduction
             >>> m.capturesdict()
             {'word': ['one', 'two', 'three'], 'digits': ['1', '2', '3']}
         
-        * Allow duplicate names of groups (Hg issue 87)
+        * Allow duplicate names of groups (`Hg issue 87 <https://bitbucket.org/mrabarnett/mrab-regex/issues/87>`_)
         
           Group names can now be duplicated.
         
@@ -434,7 +435,7 @@ Description: Introduction
             >>> m.captures("item")
             ['first', '']
         
-        * Added ``fullmatch`` (issue #16203)
+        * Added ``fullmatch`` (`issue #16203 <https://bugs.python.org/issue16203>`_)
         
           ``fullmatch`` behaves like ``match``, except that it must match all of the string.
         
@@ -456,7 +457,7 @@ Description: Introduction
             >>> regex.fullmatch(r"a.*?", "abcd").group(0)
             'abcd'
         
-        * Added ``subf`` and ``subfn`` **(Python 2.6 and above)**
+        * Added ``subf`` and ``subfn``
         
           ``subf`` and ``subfn`` are alternatives to ``sub`` and ``subn`` respectively. When passed a replacement string, they treat it as a format string.
         
@@ -469,7 +470,7 @@ Description: Introduction
             >>> regex.subf(r"(?P<word1>\w+) (?P<word2>\w+)", "{word2} {word1}", "foo bar")
             'bar foo'
         
-        * Added ``expandf`` to match object **(Python 2.6 and above)**
+        * Added ``expandf`` to match object
         
           ``expandf`` is an alternative to ``expand``. When passed a replacement string, it treats it as a format string.
         
@@ -504,11 +505,11 @@ Description: Introduction
             >>> print(m.string)
             None
         
-        * Characters in a group name (issue #14462)
+        * Characters in a group name (`issue #14462 <https://bugs.python.org/issue14462>`_)
         
           A group name can now contain the same characters as an identifier. These are different in Python 2 and Python 3.
         
-        * Recursive patterns (Hg issue 27)
+        * Recursive patterns (`Hg issue 27 <https://bitbucket.org/mrabarnett/mrab-regex/issues/27>`_)
         
           Recursive and repeated patterns are supported.
         
@@ -537,7 +538,7 @@ Description: Introduction
         
           The alternative forms ``(?P>name)`` and ``(?P&name)`` are also supported.
         
-        * repr(regex) doesn't include actual regex (issue #13592)
+        * repr(regex) doesn't include actual regex (`issue #13592 <https://bugs.python.org/issue13592>`_)
         
           The repr of a compiled regex is now in the form of a eval-able string. For example:
         
@@ -551,7 +552,7 @@ Description: Introduction
         
           The regex module has Regex as an alias for the 'compile' function.
         
-        * Improve the repr for regular expression match objects (issue #17087)
+        * Improve the repr for regular expression match objects (`issue #17087 <https://bugs.python.org/issue17087>`_)
         
           The repr of a match object is now a more useful form. For example:
         
@@ -560,7 +561,7 @@ Description: Introduction
             >>> regex.search(r"\d+", "abc012def")
             <regex.Match object; span=(3, 6), match='012'>
         
-        * Python lib re cannot handle Unicode properly due to narrow/wide bug (issue #12729)
+        * Python lib re cannot handle Unicode properly due to narrow/wide bug (`issue #12729 <https://bugs.python.org/issue12729>`_)
         
           The source code of the regex module has been updated to support PEP 393 ("Flexible String Representation"), which is new in Python 3.3.
         
@@ -579,7 +580,7 @@ Description: Introduction
         
           In version 0 behaviour, it uses simple case-folding for backward compatibility with the re module.
         
-        * Approximate "fuzzy" matching (Hg issue 12, Hg issue 41, Hg issue 109)
+        * Approximate "fuzzy" matching (`Hg issue 12 <https://bitbucket.org/mrabarnett/mrab-regex/issues/12>`_, `Hg issue 41 <https://bitbucket.org/mrabarnett/mrab-regex/issues/41>`_, `Hg issue 109 <https://bitbucket.org/mrabarnett/mrab-regex/issues/109>`_)
         
           Regex usually attempts an exact match, but sometimes an approximate, or "fuzzy", match is needed, for those cases where the text being searched may contain errors in the form of inserted, deleted or substituted characters.
         
@@ -673,7 +674,45 @@ Description: Introduction
             (0, 0, 0)
             >>> # 0 substitutions, 0 insertions, 0 deletions.
         
-        * Named lists (Hg issue 11)
+          The match object also has an attribute ``fuzzy_changes`` which gives a tuple of the positions of the substitutions, insertions and deletions.
+        
+          .. sourcecode:: python
+        
+            >>> m = regex.search('(fuu){i<=2,d<=2,e<=5}', 'anaconda foo bar')
+            >>> m
+            <regex.Match object; span=(7, 10), match='a f', fuzzy_counts=(0, 2, 2)>
+            >>> m.fuzzy_changes
+            ([], [7, 8], [10, 11])
+        
+          What this means is that if the matched part of the string had been:
+        
+          .. sourcecode:: python
+        
+            'anacondfuuoo bar'
+        
+          it would've been an exact match.
+        
+          However, there were insertions at positions 7 and 8:
+        
+          .. sourcecode:: python
+        
+            'anaconda fuuoo bar'
+                    ^^
+        
+          and deletions at positions 10 and 11:
+        
+          .. sourcecode:: python
+        
+            'anaconda f~~oo bar'
+                       ^^
+        
+          So the actual string was:
+        
+          .. sourcecode:: python
+        
+            'anaconda foo bar'
+        
+        * Named lists (`Hg issue 11 <https://bitbucket.org/mrabarnett/mrab-regex/issues/11>`_)
         
           ``\L<name>``
         
@@ -699,7 +738,10 @@ Description: Introduction
           .. sourcecode:: python
         
             >>> print(p.named_lists)
-            {'options': frozenset({'second', 'fifth', 'fourth', 'third', 'first'})}
+            # Python 3
+            {'options': frozenset({'fifth', 'first', 'fourth', 'second', 'third'})}
+            # Python 2
+            {'options': frozenset(['fifth', 'fourth', 'second', 'third', 'first'])}
         
         * Start and end of word
         
@@ -749,7 +791,7 @@ Description: Introduction
         
           * ``[\p{ASCII}&&\p{Letter}]`` # Set containing all characters which are ASCII and letter
         
-        * regex.escape (issue #2650)
+        * regex.escape (`issue #2650 <https://bugs.python.org/issue2650>`_)
         
           regex.escape has an additional keyword parameter ``special_only``. When True, only 'special' regex characters, such as '?', are escaped.
         
@@ -758,11 +800,28 @@ Description: Introduction
           .. sourcecode:: python
         
             >>> regex.escape("foo!?")
+            'foo!\\?'
+            >>> regex.escape("foo!?", special_only=False)
             'foo\\!\\?'
             >>> regex.escape("foo!?", special_only=True)
             'foo!\\?'
         
-        * Repeated captures (issue #7132)
+        * regex.escape (`Hg issue 249 <https://bitbucket.org/mrabarnett/mrab-regex/issues/249>`_)
+        
+          regex.escape has an additional keyword parameter ``literal_spaces``. When True, spaces are not escaped.
+        
+          Examples:
+        
+          .. sourcecode:: python
+        
+            >>> regex.escape("foo bar!?")
+            'foo\\ bar!\\?'
+            >>> regex.escape("foo bar!?", literal_spaces=False)
+            'foo\\ bar!\\?'
+            >>> regex.escape("foo bar!?", literal_spaces=True)
+            'foo bar!\\?'
+        
+        * Repeated captures (`issue #7132 <https://bugs.python.org/issue7132>`_)
         
           A match object has additional methods which return information on all the successful matches of a repeated capture group. These methods are:
         
@@ -804,7 +863,7 @@ Description: Introduction
             >>> m.spans(1)
             [(0, 3), (3, 6), (6, 9)]
         
-        * Atomic grouping (issue #433030)
+        * Atomic grouping (`issue #433030 <https://bugs.python.org/issue433030>`_)
         
           ``(?>...)``
         
@@ -816,13 +875,13 @@ Description: Introduction
         
           The subpattern is matched up to 'max' times. If the following pattern subsequently fails, then all of the repeated subpatterns will fail as a whole. For example, ``(?:...)++`` is equivalent to ``(?>(?:...)+)``.
         
-        * Scoped flags (issue #433028)
+        * Scoped flags (`issue #433028 <https://bugs.python.org/issue433028>`_)
         
           ``(?flags-flags:...)``
         
           The flags will apply only to the subpattern. Flags can be turned on or off.
         
-        * Inline flags (issue #433024, issue #433027)
+        * Inline flags (`issue #433024 <https://bugs.python.org/issue433024>`_, `issue #433027 <https://bugs.python.org/issue433027>`_)
         
           ``(?flags-flags)``
         
@@ -830,15 +889,15 @@ Description: Introduction
         
           Version 1 behaviour: the flags apply to the end of the group or pattern, and they can be turned on or off.
         
-        * Repeated repeats (issue #2537)
+        * Repeated repeats (`issue #2537 <https://bugs.python.org/issue2537>`_)
         
           A regex like ``((x|y+)*)*`` will be accepted and will work correctly, but should complete more quickly.
         
-        * Definition of 'word' character (issue #1693050)
+        * Definition of 'word' character (`issue #1693050 <https://bugs.python.org/issue1693050>`_)
         
           The definition of a 'word' character has been expanded for Unicode. It now conforms to the Unicode specification at ``http://www.unicode.org/reports/tr29/``. This applies to ``\w``, ``\W``, ``\b`` and ``\B``.
         
-        * Groups in lookahead and lookbehind (issue #814253)
+        * Groups in lookahead and lookbehind (`issue #814253 <https://bugs.python.org/issue814253>`_)
         
           Groups and group references are permitted in both lookahead and lookbehind.
         
@@ -846,19 +905,19 @@ Description: Introduction
         
           A lookbehind can match a variable-length string.
         
-        * Correct handling of charset with ignore case flag (issue #3511)
+        * Correct handling of charset with ignore case flag (`issue #3511 <https://bugs.python.org/issue3511>`_)
         
           Ranges within charsets are handled correctly when the ignore-case flag is turned on.
         
-        * Unmatched group in replacement (issue #1519638)
+        * Unmatched group in replacement (`issue #1519638 <https://bugs.python.org/issue1519638>`_)
         
           An unmatched group is treated as an empty string in a replacement template.
         
-        * 'Pathological' patterns (issue #1566086, issue #1662581, issue #1448325, issue #1721518, issue #1297193)
+        * 'Pathological' patterns (`issue #1566086 <https://bugs.python.org/issue1566086>`_, `issue #1662581 <https://bugs.python.org/issue1662581>`_, `issue #1448325 <https://bugs.python.org/issue1448325>`_, `issue #1721518 <https://bugs.python.org/issue1721518>`_, `issue #1297193 <https://bugs.python.org/issue1297193>`_)
         
           'Pathological' patterns should complete more quickly.
         
-        * Flags argument for regex.split, regex.sub and regex.subn (issue #3482)
+        * Flags argument for regex.split, regex.sub and regex.subn (`issue #3482 <https://bugs.python.org/issue3482>`_)
         
           ``regex.split``, ``regex.sub`` and ``regex.subn`` support a 'flags' argument.
         
@@ -870,23 +929,23 @@ Description: Introduction
         
           ``regex.findall`` and ``regex.finditer`` support an 'overlapped' flag which permits overlapped matches.
         
-        * Unicode escapes (issue #3665)
+        * Unicode escapes (`issue #3665 <https://bugs.python.org/issue3665>`_)
         
           The Unicode escapes ``\uxxxx`` and ``\Uxxxxxxxx`` are supported.
         
-        * Large patterns (issue #1160)
+        * Large patterns (`issue #1160 <https://bugs.python.org/issue1160>`_)
         
           Patterns can be much larger.
         
-        * Zero-width match with regex.finditer (issue #1647489)
+        * Zero-width match with regex.finditer (`issue #1647489 <https://bugs.python.org/issue1647489>`_)
         
           ``regex.finditer`` behaves correctly when it splits at a zero-width match.
         
-        * Zero-width split with regex.split (issue #3262)
+        * Zero-width split with regex.split (`issue #3262 <https://bugs.python.org/issue3262>`_)
         
-          Version 0 behaviour: a string won't be split at a zero-width match.
+          Version 0 behaviour: same as re module (no split before Python 3.7).
         
-          Version 1 behaviour: a string will be split at a zero-width match.
+          Version 1 behaviour: a string can be split at a zero-width match.
         
         * Splititer
         
@@ -899,15 +958,15 @@ Description: Introduction
           .. sourcecode:: python
         
             >>> m = regex.search(r"(?P<before>.*?)(?P<num>\d+)(?P<after>.*)", "pqr123stu")
-            >>> print m["before"]
+            >>> print(m["before"])
             pqr
-            >>> print m["num"]
+            >>> print(m["num"])
             123
-            >>> print m["after"]
+            >>> print(m["after"])
             stu
-            >>> print len(m)
+            >>> print(len(m))
             4
-            >>> print m[:]
+            >>> print(m[:])
             ('pqr123stu', 'pqr', '123', 'stu')
         
         * Named groups
@@ -1038,26 +1097,25 @@ Description: Introduction
         
           The ``WORD`` flag changes the definition of a 'word boundary' to that of a default Unicode word boundary. This applies to ``\b`` and ``\B``.
         
-        * SRE engine do not release the GIL (issue #1366311)
+        * SRE engine do not release the GIL (`issue #1366311 <https://bugs.python.org/issue1366311>`_)
         
           The regex module can release the GIL during matching (see the above section on multithreading).
         
           Iterators can be safely shared across threads.
-
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: Python Software Foundation License
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.1
-Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: Scientific/Engineering :: Information Analysis
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Text Processing
diff --git a/README b/README
index f83fd1f..ab6996c 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 regex is an alternative to the re package in the Python standard library. It is
 intended to act as a drop in replacement, and one day to replace re. regex is
-supported on Python v2.5 to v2.7 and v3.1 to v3.6.
+supported on Python v2.6 to v2.7 and v3.3 to v3.7.
 
 For a full list of features see Python2/Features.rst or Python3/Features.rst.
 
diff --git a/docs/Features.html b/docs/Features.html
index 2ed811e..5f51b23 100644
--- a/docs/Features.html
+++ b/docs/Features.html
@@ -1,1145 +1,1216 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
-<title></title>
-<style type="text/css">
-
-/*
-:Author: David Goodger (goodger at python.org)
-:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
-  border: 0 }
-
-table.borderless td, table.borderless th {
-  /* Override padding for "table.docutils td" with "! important".
-     The right padding separates the table cells. */
-  padding: 0 0.5em 0 0 ! important }
-
-.first {
-  /* Override more specific margin styles with "! important". */
-  margin-top: 0 ! important }
-
-.last, .with-subtitle {
-  margin-bottom: 0 ! important }
-
-.hidden {
-  display: none }
-
-a.toc-backref {
-  text-decoration: none ;
-  color: black }
-
-blockquote.epigraph {
-  margin: 2em 5em ; }
-
-dl.docutils dd {
-  margin-bottom: 0.5em }
-
-object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
-  overflow: hidden;
-}
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
-  font-weight: bold }
-*/
-
-div.abstract {
-  margin: 2em 5em }
-
-div.abstract p.topic-title {
-  font-weight: bold ;
-  text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
-  margin: 2em ;
-  border: medium outset ;
-  padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
-  font-weight: bold ;
-  font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title, .code .error {
-  color: red ;
-  font-weight: bold ;
-  font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
-   compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
-  margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
-  margin-top: 0.5em }
-*/
-
-div.dedication {
-  margin: 2em 5em ;
-  text-align: center ;
-  font-style: italic }
-
-div.dedication p.topic-title {
-  font-weight: bold ;
-  font-style: normal }
-
-div.figure {
-  margin-left: 2em ;
-  margin-right: 2em }
-
-div.footer, div.header {
-  clear: both;
-  font-size: smaller }
-
-div.line-block {
-  display: block ;
-  margin-top: 1em ;
-  margin-bottom: 1em }
-
-div.line-block div.line-block {
-  margin-top: 0 ;
-  margin-bottom: 0 ;
-  margin-left: 1.5em }
-
-div.sidebar {
-  margin: 0 0 0.5em 1em ;
-  border: medium outset ;
-  padding: 1em ;
-  background-color: #ffffee ;
-  width: 40% ;
-  float: right ;
-  clear: right }
-
-div.sidebar p.rubric {
-  font-family: sans-serif ;
-  font-size: medium }
-
-div.system-messages {
-  margin: 5em }
-
-div.system-messages h1 {
-  color: red }
-
-div.system-message {
-  border: medium outset ;
-  padding: 1em }
-
-div.system-message p.system-message-title {
-  color: red ;
-  font-weight: bold }
-
-div.topic {
-  margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
-  margin-top: 0.4em }
-
-h1.title {
-  text-align: center }
-
-h2.subtitle {
-  text-align: center }
-
-hr.docutils {
-  width: 75% }
-
-img.align-left, .figure.align-left, object.align-left {
-  clear: left ;
-  float: left ;
-  margin-right: 1em }
-
-img.align-right, .figure.align-right, object.align-right {
-  clear: right ;
-  float: right ;
-  margin-left: 1em }
-
-img.align-center, .figure.align-center, object.align-center {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.align-left {
-  text-align: left }
-
-.align-center {
-  clear: both ;
-  text-align: center }
-
-.align-right {
-  text-align: right }
-
-/* reset inner alignment in figures */
-div.align-right {
-  text-align: inherit }
-
-/* div.align-center * { */
-/*   text-align: left } */
-
-ol.simple, ul.simple {
-  margin-bottom: 1em }
-
-ol.arabic {
-  list-style: decimal }
-
-ol.loweralpha {
-  list-style: lower-alpha }
-
-ol.upperalpha {
-  list-style: upper-alpha }
-
-ol.lowerroman {
-  list-style: lower-roman }
-
-ol.upperroman {
-  list-style: upper-roman }
-
-p.attribution {
-  text-align: right ;
-  margin-left: 50% }
-
-p.caption {
-  font-style: italic }
-
-p.credits {
-  font-style: italic ;
-  font-size: smaller }
-
-p.label {
-  white-space: nowrap }
-
-p.rubric {
-  font-weight: bold ;
-  font-size: larger ;
-  color: maroon ;
-  text-align: center }
-
-p.sidebar-title {
-  font-family: sans-serif ;
-  font-weight: bold ;
-  font-size: larger }
-
-p.sidebar-subtitle {
-  font-family: sans-serif ;
-  font-weight: bold }
-
-p.topic-title {
-  font-weight: bold }
-
-pre.address {
-  margin-bottom: 0 ;
-  margin-top: 0 ;
-  font: inherit }
-
-pre.literal-block, pre.doctest-block, pre.math, pre.code {
-  margin-left: 2em ;
-  margin-right: 2em }
-
-pre.code .ln { color: grey; } /* line numbers */
-pre.code, code { background-color: #eeeeee }
-pre.code .comment, code .comment { color: #5C6576 }
-pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
-pre.code .literal.string, code .literal.string { color: #0C5404 }
-pre.code .name.builtin, code .name.builtin { color: #352B84 }
-pre.code .deleted, code .deleted { background-color: #DEB0A1}
-pre.code .inserted, code .inserted { background-color: #A3D289}
-
-span.classifier {
-  font-family: sans-serif ;
-  font-style: oblique }
-
-span.classifier-delimiter {
-  font-family: sans-serif ;
-  font-weight: bold }
-
-span.interpreted {
-  font-family: sans-serif }
-
-span.option {
-  white-space: nowrap }
-
-span.pre {
-  white-space: pre }
-
-span.problematic {
-  color: red }
-
-span.section-subtitle {
-  /* font-size relative to parent (h1..h6 element) */
-  font-size: 80% }
-
-table.citation {
-  border-left: solid 1px gray;
-  margin-left: 1px }
-
-table.docinfo {
-  margin: 2em 4em }
-
-table.docutils {
-  margin-top: 0.5em ;
-  margin-bottom: 0.5em }
-
-table.footnote {
-  border-left: solid 1px black;
-  margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
-  padding-left: 0.5em ;
-  padding-right: 0.5em ;
-  vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
-  font-weight: bold ;
-  text-align: left ;
-  white-space: nowrap ;
-  padding-left: 0 }
-
-/* "booktabs" style (no vertical lines) */
-table.docutils.booktabs {
-  border: 0px;
-  border-top: 2px solid;
-  border-bottom: 2px solid;
-  border-collapse: collapse;
-}
-table.docutils.booktabs * {
-  border: 0px;
-}
-table.docutils.booktabs th {
-  border-bottom: thin solid;
-  text-align: left;
-}
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
-  font-size: 100% }
-
-ul.auto-toc {
-  list-style-type: none }
-
-</style>
-</head>
-<body>
-<div class="document">
-
-
-<div class="section" id="introduction">
-<h1>Introduction</h1>
-<p>This new regex implementation is intended eventually to replace Python's current re module implementation.</p>
-<p>For testing and comparison with the current 're' module the new implementation is in the form of a module called 'regex'.</p>
-</div>
-<div class="section" id="old-vs-new-behaviour">
-<h1>Old vs new behaviour</h1>
-<p>This module has 2 behaviours:</p>
-<ul class="simple">
-<li><strong>Version 0</strong> behaviour (old behaviour, compatible with the current re module):<ul>
-<li>Indicated by the <tt class="docutils literal">VERSION0</tt> or <tt class="docutils literal">V0</tt> flag, or <tt class="docutils literal"><span class="pre">(?V0)</span></tt> in the pattern.</li>
-<li>Zero-width matches are handled like in the re module:<ul>
-<li><tt class="docutils literal">.split</tt> won't split a string at a zero-width match.</li>
-<li><tt class="docutils literal">.sub</tt> will advance by one character after a zero-width match.</li>
-</ul>
-</li>
-<li>Inline flags apply to the entire pattern, and they can't be turned off.</li>
-<li>Only simple sets are supported.</li>
-<li>Case-insensitive matches in Unicode use simple case-folding by default.</li>
-</ul>
-</li>
-<li><strong>Version 1</strong> behaviour (new behaviour, different from the current re module):<ul>
-<li>Indicated by the <tt class="docutils literal">VERSION1</tt> or <tt class="docutils literal">V1</tt> flag, or <tt class="docutils literal"><span class="pre">(?V1)</span></tt> in the pattern.</li>
-<li>Zero-width matches are handled like in Perl and PCRE:<ul>
-<li><tt class="docutils literal">.split</tt> will split a string at a zero-width match.</li>
-<li><tt class="docutils literal">.sub</tt> will handle zero-width matches correctly.</li>
-</ul>
-</li>
-<li>Inline flags apply to the end of the group or pattern, and they can be turned off.</li>
-<li>Nested sets and set operations are supported.</li>
-<li>Case-insensitive matches in Unicode use full case-folding by default.</li>
-</ul>
-</li>
-</ul>
-<p>If no version is specified, the regex module will default to <tt class="docutils literal">regex.DEFAULT_VERSION</tt>. In the short term this will be <tt class="docutils literal">VERSION0</tt>, but in the longer term it will be <tt class="docutils literal">VERSION1</tt>.</p>
-</div>
-<div class="section" id="case-insensitive-matches-in-unicode">
-<h1>Case-insensitive matches in Unicode</h1>
-<p>The regex module supports both simple and full case-folding for case-insensitive matches in Unicode. Use of full case-folding can be turned on using the <tt class="docutils literal">FULLCASE</tt> or <tt class="docutils literal">F</tt> flag, or <tt class="docutils literal"><span class="pre">(?f)</span></tt> in the pattern. Please note that this flag affects how the <tt class="docutils literal">IGNORECASE</tt> flag works; the <tt class="docutils literal">FULLCASE</tt> flag itself does n [...]
-<p>In the version 0 behaviour, the flag is off by default.</p>
-<p>In the version 1 behaviour, the flag is on by default.</p>
-</div>
-<div class="section" id="nested-sets-and-set-operations">
-<h1>Nested sets and set operations</h1>
-<p>It's not possible to support both simple sets, as used in the re module, and nested sets at the same time because of a difference in the meaning of an unescaped <tt class="docutils literal">"["</tt> in a set.</p>
-<p>For example, the pattern <tt class="docutils literal"><span class="pre">[[a-z]--[aeiou]]</span></tt> is treated in the version 0 behaviour (simple sets, compatible with the re module) as:</p>
-<ul class="simple">
-<li>Set containing "[" and the letters "a" to "z"</li>
-<li>Literal "--"</li>
-<li>Set containing letters "a", "e", "i", "o", "u"</li>
-</ul>
-<p>but in the version 1 behaviour (nested sets, enhanced behaviour) as:</p>
-<ul class="simple">
-<li>Set which is:<ul>
-<li>Set containing the letters "a" to "z"</li>
-</ul>
-</li>
-<li>but excluding:<ul>
-<li>Set containing the letters "a", "e", "i", "o", "u"</li>
-</ul>
-</li>
-</ul>
-<p>Version 0 behaviour: only simple sets are supported.</p>
-<p>Version 1 behaviour: nested sets and set operations are supported.</p>
-</div>
-<div class="section" id="flags">
-<h1>Flags</h1>
-<p>There are 2 kinds of flag: scoped and global. Scoped flags can apply to only part of a pattern and can be turned on or off; global flags apply to the entire pattern and can only be turned on.</p>
-<p>The scoped flags are: <tt class="docutils literal">FULLCASE</tt>, <tt class="docutils literal">IGNORECASE</tt>, <tt class="docutils literal">MULTILINE</tt>, <tt class="docutils literal">DOTALL</tt>, <tt class="docutils literal">VERBOSE</tt>, <tt class="docutils literal">WORD</tt>.</p>
-<p>The global flags are: <tt class="docutils literal">ASCII</tt>, <tt class="docutils literal">BESTMATCH</tt>, <tt class="docutils literal">ENHANCEMATCH</tt>, <tt class="docutils literal">LOCALE</tt>, <tt class="docutils literal">POSIX</tt>, <tt class="docutils literal">REVERSE</tt>, <tt class="docutils literal">UNICODE</tt>, <tt class="docutils literal">VERSION0</tt>, <tt class="docutils literal">VERSION1</tt>.</p>
-<p>If neither the <tt class="docutils literal">ASCII</tt>, <tt class="docutils literal">LOCALE</tt> nor <tt class="docutils literal">UNICODE</tt> flag is specified, it will default to <tt class="docutils literal">UNICODE</tt> if the regex pattern is a Unicode string and <tt class="docutils literal">ASCII</tt> if it's a bytestring.</p>
-<p>The <tt class="docutils literal">ENHANCEMATCH</tt> flag makes fuzzy matching attempt to improve the fit of the next match that it finds.</p>
... 36673 lines suppressed ...

-- 
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