[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-06 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected ___ Python tracker ___ ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52256a5861fa by Serhiy Storchaka in branch '2.7': Issue #20283: RE pattern methods now accept the string keyword parameters http://hg.python.org/cpython/rev/52256a5861fa -- ___ Python tracker

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52743dc788e6 by Serhiy Storchaka in branch '3.3': Issue #20283: RE pattern methods now accept the string keyword parameters http://hg.python.org/cpython/rev/52743dc788e6 New changeset f4d7abcf8080 by Serhiy Storchaka in branch 'default': Issue #2028

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a test. -- Added file: http://bugs.python.org/file34290/test_re_keyword_parameters.patch ___ Python tracker ___ __

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: the patch is incomplete; it lacks test cases. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Since there is no consensus on how to resolve this issue, I'm dropping the release-critical status for it; people should now consider whether a future agreed-upon solution could apply to 3.4.1 or just to 3.5. -- priority: release blocker -> normal __

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-04 Thread STINNER Victor
STINNER Victor added the comment: We are close to Python 3.4 final, so what is the status of this issue? I don't see any commit and nothing to cherry-pick in Larry's 3.4.0 repository. -- nosy: +haypo ___ Python tracker

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Why can't you remove the "= NULL" from the Clinic input for "string"? Because this will prohibit the use of "pattern" as keyword argument. -- ___ Python tracker __

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-03 Thread Larry Hastings
Larry Hastings added the comment: Why can't you remove the "= NULL" from the Clinic input for "string"? -- ___ Python tracker ___ ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The disadvantage of sre_deprecate_pattern_keyword-3.4.patch is that it creates false signature for SRE_Pattern.match(). Default value of first argument is exposed as None, but actually this parameter is mandatory and None is not valid value for it. I afraid

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-03-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch sre_deprecate_pattern_keyword-3.4.patch looks good to me. I *think* that Larry has pre-approved it for 3.4. If it is applied, and if people still think that 2.7 and 3.3 need to be changed, the release-critical status should be removed from the issue

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with the show_in_signature hack for 3.4. -- priority: normal -> release blocker Added file: http://bugs.python.org/file34216/sre_deprecate_pattern_keyword-3.4.patch ___ Python tracker

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-02-09 Thread Larry Hastings
Larry Hastings added the comment: "pattern" should be keyword-only, and if used the function should generate a DeprecationWarning. -- ___ Python tracker ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-02-09 Thread Larry Hastings
Larry Hastings added the comment: Use #3. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Larry, so what is your decision? 1. Apply the "hard" patch and then convert Modules/_sre.c to use Argument Clinic (issue20148). 2. Revert converted match() method, apply the "soft" patch, and delay applying of the "hard" patch and then converting to use Arg

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Larry Hastings
Larry Hastings added the comment: Alternatively, we could use this cheap hack: /*[python input] class hidden_object_converter(object_converter): show_in_signature = False [python start generated code]*/ /*[clinic input] module _sre class _sre.SRE_Pattern "PatternObject *" "&Pattern_Type"

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Larry Hastings
Larry Hastings added the comment: You can do it, if I accept the patch for 3.4. There's no point in doing it in two stages. -- ___ Python tracker ___ __

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you want the "soft" approach, then you should revert your changes to _sre.SRE_Pattern.match. -- ___ Python tracker ___ ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Larry Hastings
Larry Hastings added the comment: Georg: you're accepting this patch into 3.3? I'm surprised. I would only want the "soft" approach. But I haven't said "yes" yet. I want to discuss it a little more. (Hey, it's python core dev. Discussing things endlessly is our job.) --

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Georg Brandl
Georg Brandl added the comment: For 3.3 I prefer the "soft" patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file33705/sre_deprecate_pattern_keyword.patch ___ Python tracker ___ ___ Pyt

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The patch did not upload correctly. Oh, sorry. Here is correct patch. I propose to apply "soft" patch (which preserves support for old keyword parameter name) to 2.7 and 3.3, and apply "hard" patch (which just renames keyword parameter name) to 3.4. Or w

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great. Old and new both in at least one release, when possible, is best. I should have thought of asking if that would be possible. In this case, I think the (undocumented) old should disappear in 3.5. Since the mistaken 'pattern' name is not documented now, I

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is patch for 3.3 which adds alternative parameter name. Now both keyword names are allowed, but deprecation warning is emitted if old keyword name is used. >>> import re >>> p = re.compile('') >>> p.match() Traceback (most recent call last): File "",

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-23 Thread Tal Einat
Changes by Tal Einat : -- nosy: +taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: If no one else pipes up here, perhaps ask on pydef about changing C names to match documented names. -- ___ Python tracker ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mrabarnett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually, several other methods also have wrong parameter name, "source" instead of "string". -- stage: needs patch -> patch review Added file: http://bugs.python.org/file33598/sre_pattern_string_keyword.patch ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file33509/sre_pattern_string_keyword.patch ___ Python tracker ___ ___ Pytho

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: How nasty. I agree that this is a code bug. Unfortunately in this case, the C code does keyword matching of arguments and 'corrects' the doc for anyone who tries 'string='. >>> pat.search(string='xabc', pos=1) Traceback (most recent call last): File "", line

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file33509/sre_pattern_string_keyword.patch ___ Python tracker ___ ___ Python-

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file33508/sre_pattern_string_keyword.patch ___ Python tracker ___ ___ Pytho

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file33508/sre_pattern_string_keyword.patch ___ Python tracker ___ ___

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Documented (in docstring and in ReST documentation) signatures of the match, search and (since 3.4) fullmatch methods of regex pattern object are: match(string[, pos[, endpos]]) search(string[, pos[, endpos]]) fullmatch(string[, pos[, endpos]]) However in