Miss Islington (bot)
39441fce02
bpo-32338: OrderedDict import is no longer needed in re. (GH-4891)
...
(cherry picked from commit b931bd0a2f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2018-03-10 23:01:58 -08:00
Serhiy Storchaka
05cb728d68
bpo-30349: Raise FutureWarning for nested sets and set operations ( #1553 )
...
in regular expressions.
2017-11-16 12:38:26 +02:00
INADA Naoki
c1c47c166b
bpo-31671: re: Convert RegexFlag to int before compile (GH-3862)
...
sre_compile does bit test (e.g. `flags & SRE_FLAG_IGNORECASE`) in loop.
`IntFlag.__and__` and `IntFlag.__new__` made it slower.
So this commit convert it to normal int before passing flags to `sre_compile()`.
2017-10-05 17:19:26 +09:00
Serhiy Storchaka
0b5e61ddca
bpo-30397: Add re.Pattern and re.Match. ( #1646 )
2017-10-04 20:09:49 +03:00
Barry Warsaw
db50ba7c72
Trivial readability improvement ( #3791 )
2017-09-27 11:12:30 -04:00
Serhiy Storchaka
114454e9f6
bpo-28293: Don't completely dump the regex cache when full. ( #3768 )
2017-09-26 19:47:36 +03:00
Serhiy Storchaka
898ff03e1e
bpo-30215: Make re.compile() locale agnostic. ( #1361 )
...
Compiled regular expression objects with the re.LOCALE flag no longer
depend on the locale at compile time. Only the locale at matching
time affects the result of matching.
2017-05-05 08:53:40 +03:00
Serhiy Storchaka
5908300e4b
bpo-29995: re.escape() now escapes only special characters. ( #1007 )
2017-04-13 21:06:43 +03:00
Victor Stinner
fb6a6596b5
Issue #28637 : Reapply changeset 223731925d06
...
"issue28082: use IntFlag for re constants" by Ethan Furman.
The re module is not more used in the site module and so adding "import enum"
to re.py doesn't impact python_startup benchmark anymore.
2016-11-14 12:35:55 +01:00
Victor Stinner
1ec1cd161b
Issue #28637 : Revert issue #28082 , don't import enum in re
...
Importing the enum module in the re module slows down Python startup by 34%
when Python is run from a virtual environment, or more generally when the re
module is imported at startup but not the enum module.
2016-11-08 00:42:46 +01:00
Raymond Hettinger
5820f3a381
Issue #28193 : Use lru_cache in the re module.
2016-09-18 20:17:21 -07:00
Ethan Furman
722898065c
issue28082: better name for Flag
2016-09-11 14:54:27 -07:00
Ethan Furman
f93395bc51
issue28082: use IntFlag for re constants
2016-09-11 13:30:08 -07:00
Serhiy Storchaka
be9a4e5c85
Issue #433028 : Added support of modifier spans in regular expressions.
2016-09-10 00:57:55 +03:00
Serhiy Storchaka
ccd047ea4b
Removed unused imports.
2016-04-25 00:12:32 +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
4eea62fd2e
Issues #814253 , #9179 : Group references and conditional group references now
...
work in lookbehind assertions in regular expressions.
2015-02-21 10:07:35 +02:00
Benjamin Peterson
16e802f4ae
merge 3.4 ( #9179 )
2014-11-30 11:51:16 -05:00
Benjamin Peterson
66323415c7
backout 9fcf4008b626 ( #9179 ) for further consideration
2014-11-30 11:49:00 -05:00
Serhiy Storchaka
ab14088141
Minor code clean up and improvements in the re module.
2014-11-11 21:13:28 +02:00
Serhiy Storchaka
6276b32799
Issues #814253 , #9179 : Group references and conditional group references now
...
work in lookbehind assertions in regular expressions.
2014-11-07 21:45:17 +02:00
Serhiy Storchaka
84df7fe6a2
Issues #814253 , #9179 : Group references and conditional group references now
...
work in lookbehind assertions in regular expressions.
2014-11-07 21:43:57 +02:00
Serhiy Storchaka
3bf7a6c1da
Fixed compile error in issue #22410 . The _locale module is optional.
2014-10-31 01:37:03 +02:00
Serhiy Storchaka
cf7b1cadd1
Fixed compile error in issue #22410 . The _locale module is optional.
2014-10-31 01:34:45 +02:00
Serhiy Storchaka
7cc0a1f7cb
Issue #22410 : Module level functions in the re module now cache compiled
...
locale-dependent regular expressions taking into account the locale.
2014-10-31 00:56:45 +02:00