Commit Graph

222 Commits

Author SHA1 Message Date
Serhiy Storchaka 07360df481 Issue #14260: The groupindex attribute of regular expression pattern object
now is non-modifiable mapping.
2015-03-30 01:01:48 +03:00
Serhiy Storchaka 632a77e6a3 Issue #22364: Improved some re error messages using regex for hints. 2015-03-25 21:03:47 +02:00
Serhiy Storchaka 83e802796c Issue #22818: Splitting on a pattern that could match an empty string now
raises a warning.  Patterns that can only match empty strings are now
rejected.
2015-02-03 11:04:19 +02:00
Serhiy Storchaka 4b8f8949b4 Issue #17381: Fixed handling of case-insensitive ranges in regular expressions.
Added new opcode RANGE_IGNORE.
2014-10-31 12:36:56 +02:00
Serhiy Storchaka 5aa47443c6 Issue #22584: Got rid of character tables in _sre.c and use standard macros
Py_TOLOWER, Py_ISSPACE, etc.
2014-10-10 11:10:46 +03:00
Serhiy Storchaka 9baa5b2de2 Issue #22437: Number of capturing groups in regular expression is no longer
limited by 100.
2014-09-29 22:49:23 +03:00
Victor Stinner 706768c687 Issue #22156: Fix some "comparison between signed and unsigned integers"
compiler warnings in the Modules/ subdirectory.
2014-08-16 01:03:39 +02:00
Serhiy Storchaka 429b59ec69 Issue #20998: Fixed re.fullmatch() of repeated single character pattern
with ignore case.  Original patch by Matthew Barnett.
2014-05-14 21:48:17 +03:00
Serhiy Storchaka a537eb45fd Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:36:15 +02:00
Serhiy Storchaka ccdf352370 Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:28:32 +02:00
Larry Hastings 2623c8c23c Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false
positives.  The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Larry Hastings 581ee3618c Issue #20326: Argument Clinic now uses a simple, unique signature to
annotate text signatures in docstrings, resulting in fewer false
positives.  "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.

Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
2014-01-28 05:00:08 -08:00
Larry Hastings c20472640c Issue #20390: Small fixes and improvements for Argument Clinic. 2014-01-25 20:43:29 -08:00
Larry Hastings 5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Larry Hastings df7c22b25b Issue #19723: Missed one conversion to the new Argument Clinic syntax. 2014-01-07 14:25:26 -08:00
Larry Hastings 16c5191ab3 Issue #20144: Argument Clinic now supports simple constants as parameter
default values.  inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
2014-01-07 11:53:01 -08:00
Serhiy Storchaka 32eddc1bbc Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,
which anchor the pattern at both ends of the string to match.

Original patch by Matthew Barnett.
2013-11-23 23:20:30 +02:00
Serhiy Storchaka 5c24d0e504 Issue #13592: Improved the repr for regular expression pattern objects.
Based on patch by Hugo Lopes Tavares.
2013-11-23 22:42:43 +02:00
Victor Stinner f558778f07 Fix compiler warning (especially on Windows 64-bit): don't truncate Py_ssize_t
to int
2013-11-15 23:21:11 +01:00
Serhiy Storchaka efa5a39fa5 Issue #19405: Fixed outdated comments in the _sre module. 2013-10-27 08:04:58 +02:00
Serhiy Storchaka 1985f7b133 Issue #19405: Fixed outdated comments in the _sre module. 2013-10-27 08:07:46 +02:00
Serhiy Storchaka 8444ebbd72 Issue #18685: Extract template part of _sre.c into separated sre_lib.h file. 2013-10-26 11:18:42 +03:00
Serhiy Storchaka 9eabac68a3 Issue #18685: Restore re performance to pre-PEP 393 levels. 2013-10-26 10:45:48 +03:00
Serhiy Storchaka 8b150ecfc9 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:04:37 +03:00
Serhiy Storchaka be80fc9a84 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:02:58 +03:00
Serhiy Storchaka 36af10c1f7 Issue #17087: Improved the repr for regular expression match objects. 2013-10-20 13:13:31 +03:00
Brett Cannon baced5668a Fix a refleak in _sre 2013-10-18 14:03:16 -04:00
Serhiy Storchaka 25324971fb Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
2013-10-16 12:46:28 +03:00
Georg Brandl daa1fa991c Back out accidentally pushed changeset b51218966201. 2013-10-13 09:32:59 +02:00
Georg Brandl 4300019e1a Add re.fullmatch() function and regex.fullmatch() method, which anchor the
pattern at both ends of the string to match.

Patch by Matthew Barnett.
Closes #16203.
2013-10-13 09:18:45 +02:00
Serhiy Storchaka a83a022f9a Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre moduel.
2013-09-05 18:02:31 +03:00
Serhiy Storchaka 134f0de66d Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre moduel.
2013-09-05 18:01:15 +03:00
Victor Stinner 1fa174a418 Get rid of signed/unsigned comparaison in _sre.c
Fix compilation warnings on Windows (Visual C++) like: "_sre.c(3121): warning
C4018: '>' : signed/unsigned mismatch".

_validate_outer() ensures that groups >= 0, so _validate_inner() can cast
groups to size_t.
2013-08-28 02:06:21 +02:00
Serhiy Storchaka 8fa8ee3970 Issue #18701: Remove support of old CPython versions (<3.0) from C code. 2013-08-17 00:48:02 +03:00
Serhiy Storchaka b94f61b6fb Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:22:28 +03:00
Serhiy Storchaka 1f35ae0a3c Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:18:38 +03:00
Serhiy Storchaka 6d80046628 Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module.  Patch by Nickolai Zeldovich.
2013-04-13 21:16:40 +03:00
Serhiy Storchaka 4bb17348f5 Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module.  Patch by Nickolai Zeldovich.
2013-04-13 21:15:47 +03:00
Serhiy Storchaka e924ddb23e Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat.  Patch by Matthew Barnett.
2013-02-16 21:25:40 +02:00
Serhiy Storchaka b0c75a7dec Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat.  Patch by Matthew Barnett.
2013-02-16 21:25:05 +02:00
Serhiy Storchaka fa46816915 Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat.  Patch by Matthew Barnett.
2013-02-16 21:23:53 +02:00
Serhiy Storchaka 165ee9645b Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
2013-02-16 16:55:54 +02:00
Serhiy Storchaka a0eb809995 Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
2013-02-16 16:54:33 +02:00
Serhiy Storchaka 70ca0210e8 Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
2013-02-16 16:47:47 +02:00
Serhiy Storchaka ac1069387e Issue #16688: Fix backreferences did make case-insensitive regex fail on non-ASCII strings.
Patch by Matthew Barnett.
2012-12-29 23:41:08 +02:00
Serhiy Storchaka c1b59d4552 Issue #16688: Fix backreferences did make case-insensitive regex fail on non-ASCII strings.
Patch by Matthew Barnett.
2012-12-29 23:38:48 +02:00
Andrew Svetlov 6d469ebbc8 rename MathcObject to match object in doctrings for re module (#16760) 2012-12-25 18:49:24 +02:00
Andrew Svetlov 41dc9f3cd1 rename MathcObject to match object in doctrings for re module (#16760) 2012-12-25 18:49:08 +02:00
Andrew Svetlov 0b64c1415e rename MathcObject to match object in doctrings for re module (#16760) 2012-12-25 18:48:54 +02:00
Andrew Svetlov 77377574dc Issue #16443: Add docstrings to regular expression match objects.
Patch by Anton Kasyanov.
2012-12-23 20:00:58 +02:00