Victor Stinner
7bfb42d5b7
Issue #28858 : Remove _PyObject_CallArg1() macro
...
Replace
_PyObject_CallArg1(func, arg)
with
PyObject_CallFunctionObjArgs(func, arg, NULL)
Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
issue.
2016-12-05 17:04:32 +01:00
Victor Stinner
726a57d45f
Issue #28765 : _sre.compile() now checks the type of groupindex and indexgroup
...
groupindex must a dictionary and indexgroup must be a tuple.
Previously, indexgroup was a list. Use a tuple to reduce the memory usage.
2016-11-22 23:04:39 +01:00
Victor Stinner
bcf4dccfa7
Issue #28727 : Optimize pattern_richcompare() for a==a
...
A pattern is equal to itself.
2016-11-22 15:30:38 +01:00
Victor Stinner
e670b2d5c3
Issue #28727 : Fix typo in pattern_richcompare()
...
Typo catched by Serhiy Storchaka, thanks!
2016-11-22 15:23:00 +01:00
Victor Stinner
b44fb128ae
Implement rich comparison for _sre.SRE_Pattern
...
Issue #28727 : Regular expression patterns, _sre.SRE_Pattern objects created by
re.compile(), become comparable (only x==y and x!=y operators). This change
should fix the issue #18383 : don't duplicate warning filters when the warnings
module is reloaded (thing usually only done in unit tests).
2016-11-21 16:35:08 +01:00
Eric V. Smith
a6d75fdc37
Issue 24454: Removed unused match_getitem_doc.
2016-09-11 10:20:27 -04:00
Eric V. Smith
b5690864ba
Issue 24454: Added whatsnew entry, removed __getitem__ from match_methods. Thanks Serhiy Storchaka.
2016-09-11 09:50:47 -04:00
Eric V. Smith
605bdae078
Issue 24454: Improve the usability of the re match object named group API
2016-09-11 08:55:43 -04:00
Benjamin Peterson
ca47063998
replace Py_(u)intptr_t with the c99 standard types
2016-09-06 13:47:26 -07:00
Victor Stinner
559bb6a713
Rename _PyObject_FastCall() to _PyObject_FastCallDict()
...
Issue #27809 :
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
2016-08-22 22:48:54 +02:00
Victor Stinner
ea5e5990c9
pattern_subx() now uses fast call
...
Issue #27128 .
2016-08-20 01:38:00 +02:00
Benjamin Peterson
0a3ccacec7
merge 3.5 ( #27774 )
2016-08-15 22:05:16 -07:00
Benjamin Peterson
76aa1fb3b1
merge 3.4 ( #27774 )
2016-08-15 22:05:06 -07:00
Benjamin Peterson
10bc0f6edf
merge 3.3 ( #27774 )
2016-08-15 22:03:44 -07:00
Benjamin Peterson
3a27b0857e
do not decref value borrowed from list ( closes #27774 )
2016-08-15 22:01:41 -07:00
Serhiy Storchaka
2954f83999
- Issue #27332 : Fixed the type of the first argument of module-level functions
...
generated by Argument Clinic. Patch by Petr Viktorin.
2016-07-07 18:20:03 +03:00
Serhiy Storchaka
1a2b24f02d
Issue #27332 : Fixed the type of the first argument of module-level functions
...
generated by Argument Clinic. Patch by Petr Viktorin.
2016-07-07 17:35:15 +03:00
Serhiy Storchaka
977b3ac1c1
Issue #27177 : Match objects in the re module now support index-like objects
...
as group indices. Based on patches by Jeroen Demeyer and Xiang Zhang.
2016-06-18 16:48:07 +03:00
Serhiy Storchaka
f01e408c16
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:12:01 +03:00
Serhiy Storchaka
57a01d3a0e
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:40 +03:00
Serhiy Storchaka
ec39756960
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:50:03 +03:00
Serhiy Storchaka
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:45:48 +03:00
Serhiy Storchaka
ef1585eb9a
Issue #25923 : Added more const qualifiers to signatures of static and private functions.
2015-12-25 20:01:53 +02:00
Serhiy Storchaka
2d06e84455
Issue #25923 : Added the const qualifier to static constant arrays.
2015-12-25 19:53:18 +02:00
Serhiy Storchaka
f006940351
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:39:57 +02:00
Serhiy Storchaka
5a57ade58e
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:59 +02:00
Serhiy Storchaka
5bccb29de5
Issue #18684 : Fixed reading out of the buffer in the re module.
2015-07-06 14:23:04 +03:00
Serhiy Storchaka
02eae6b1f2
Issue #18684 : Fixed reading out of the buffer in the re module.
2015-07-06 14:03:01 +03:00
Serhiy Storchaka
03d6ee3823
Issue #18684 : Fixed reading out of the buffer in the re module.
2015-07-06 13:58:33 +03:00
Yury Selivanov
bb215e2300
Merge 3.5 (Issue #19235 )
2015-07-03 01:10:11 -04:00
Yury Selivanov
f488fb422a
Issue #19235 : Add new RecursionError exception. Patch by Georg Brandl.
2015-07-03 01:04:23 -04:00
Serhiy Storchaka
66dc4648fc
Issue #24426 : Fast searching optimization in regular expressions now works
...
for patterns that starts with capturing groups. Fast searching optimization
now can't be disabled at compile time.
2015-06-21 14:06:55 +03:00
Larry Hastings
2d0a69a456
Fix Windows build breakage from checkins on Issues #20148 and #20168 .
2015-05-03 14:49:19 -07:00
Serhiy Storchaka
a860aeaf98
Issue #20148 : Converted the _sre module to Argument Clinic.
2015-05-03 15:54:23 +03:00
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
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
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
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