[issue16761] Fix int(base=X)

2013-01-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761

[issue16761] Fix int(base=X)

2012-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0266ba8e4c6 by Serhiy Storchaka in branch '2.7': Issue #16761: Raise TypeError when int() or long() called with base argument only. http://hg.python.org/cpython/rev/c0266ba8e4c6 New changeset e4ea38a92c4d by Serhiy Storchaka in branch '3.2':

[issue16761] Fix int(base=X)

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: When this patch is updated because of the commit for issue 16790, in 3.x can the edited test cases be moved to the top of the test class per the following comment (as appropriate)? I will do this in issue16784. In any case I am going to move a large part

[issue16761] Fix int(base=X)

2012-12-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why did you backport this change after being advised not to do it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___

[issue16761] Fix int(base=X)

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I have not noticed your advice before I did commit (it took me a lot of time). Should I now revert my changes to 2.7, 3.2 and 3.3? -- ___ Python tracker rep...@bugs.python.org

[issue16761] Fix int(base=X)

2012-12-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: If PyPy gets away with a different behaviour, there's probably nobody relying on it, so I'd say the backports are safe. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761

[issue16761] Fix int(base=X)

2012-12-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Should I now revert my changes to 2.7, 3.2 and 3.3? Once committed, I would say leave it in as long as you're confident that no currently working code will break as a result. In general, be very conservative about backporting any behavioral change.

[issue16761] Fix int(base=X)

2012-12-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: When this patch is updated because of the commit for issue 16790, in 3.x can the edited test cases be moved to the top of the test class per the following comment (as appropriate)? http://bugs.python.org/issue16790#msg178282 As stated there, this will make

[issue16761] Fix int(base=X)

2012-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___ ___

[issue16761] Fix int(base=X)

2012-12-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think a backport is appropriate for this kind of change. -- nosy: +rhettinger versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761

[issue16761] Fix int(base=X)

2012-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sharing only those tests is not enough. We must revise all tests and extract common code to the separated class. I think this is too large change and unrelated to this issue. I will open a new issue for int tests enhancement and refactoring. --

[issue16761] Fix int(base=X)

2012-12-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: It's enough not to make the problem worse, which is why I suggested it and what I wanted to avoid. If you copy-paste the tests you're adding now, it worsens the problem and makes it that much more tedious to fix later on (and to maintain in the meantime).

[issue16761] Fix int(base=X)

2012-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patches which contains only minimal set of required changes. Other unrelated changes will be done in issue16784. -- Added file: http://bugs.python.org/file28439/int_without_x-2.7_3.patch Added file:

[issue16761] Fix int(base=X)

2012-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let's eat an elephant piece by piece. Only one issue per patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___

[issue16761] Fix int(base=X)

2012-12-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: Yes, it is a better approach. At first glance, the patches look okay to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___

[issue16761] Fix int(base=X)

2012-12-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Having just looked added something to test_int as part of issue16772... There appears to be an explicit test _for_ this strange behavior in there: http://hg.python.org/cpython/file/60f7197f991f/Lib/test/test_int.py#l233 test_base_arg_with_no_x_arg I have

[issue16761] Fix int(base=X)

2012-12-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: See this thread: http://mail.python.org/pipermail/python-dev/2012-December/123283.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___

[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently int() ignores base keyword argument if first string argument omitted. Such usage is no other than bug. The proposed patch raises TypeError in such case. See also discussion at Python-Dev: http://comments.gmane.org/gmane.comp.python.cvs/92290 .

[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +asvetlov, chris.jerdonek, terry.reedy Added file: http://bugs.python.org/file28415/int_without_x-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761

[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In additional some int creation tests backported to old Python versions. -- Added file: http://bugs.python.org/file28416/int_without_x-2.7.patch ___ Python tracker rep...@bugs.python.org

[issue16761] Fix int(base=X)

2012-12-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___ ___

[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patches updated to address Cris's comments on Rietveld (thank you, Cris, for review). In additional new tests added. I think merging test_int and test_long is hard task and should be done in separated issue. Instead I have merged and simplified some test

[issue16761] Fix int(base=X)

2012-12-24 Thread Chris Jerdonek
Chris Jerdonek added the comment: This is good work. Thanks. I think merging test_int and test_long is hard task and should be done in separated issue. I meant share rather than merge. For the tests you're adding, isn't it simply a matter of putting the test cases into a separate mixin