[issue27539] negative Fraction ** negative int not normalized

2016-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, all. Closing as fixed. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7eea5b87f5fa by Mark Dickinson in branch '3.5': Issue #27539: Fix unnormalised Fraction.__pow__ result for negative exponent and base. Thanks Vedran Čačić. https://hg.python.org/cpython/rev/7eea5b87f5fa New changeset 902e82f71880 by Mark Dickinson

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka stage: -> commit review ___ Python tracker ___

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Mark Dickinson
Mark Dickinson added the comment: > How/when does this appear in 3.6 line? After allowing a couple of days for review, I'll commit the issue_27539_fix patch to the 3.5 branch, then immediately merge it to the 3.6 "default" branch. So that fix should appear in the upcoming 3.6 beta1.

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Mark Dickinson
Mark Dickinson added the comment: > Do I report a new issue and refer to this one? Sure, that would work. A patch that included the change and a test that checks that `Fraction(3, 4, True)` raises TypeError would be good, too. -- ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Vedran Čačić
Vedran Čačić added the comment: > it's independent of the fix, and should probably be a 3.6-only change. Fair enough. Two questions: How/when does this appear in 3.6 line? I guess there is a standard timeline of how bugfixes are "forwardported", but I don't know what it is. How do I make the

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (against the 3.5 tip). I've dropped the keyword-only `_normalize` change; I have no objections to that change, but it's independent of the fix, and should probably be a 3.6-only change. -- Added file:

[issue27539] negative Fraction ** negative int not normalized

2016-08-21 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___

[issue27539] negative Fraction ** negative int not normalized

2016-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: > _Please_, can this go in before 15th? Note that this is a bugfix, not a new feature, so it can still go in after the 15th. -- ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tests for fractions are in Lib/test/test_fractions.py. In necessary, post the new code in a message. -- ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Vedran Čačić
Vedran Čačić added the comment: The .diff format of patch for fractions.py is at http://bugs.python.org/file43786/TwCVpiFp.diff The line numbers in it are the newest I could get (from https://hg.python.org/cpython/file/default/Lib/fractions.py). I would also add the test I was talking about

[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Vedran: The migration to git and GitHub is in progress. The devguide is being moved today. CPython itself should be done by the end of the year, but after 3.6.0 is released in Sept. I am on Windows and yes, setting up on Windows can be a nuisance. Learning

[issue27539] negative Fraction ** negative int not normalized

2016-07-18 Thread Vedran Čačić
Vedran Čačić added the comment: If it is of any help, here is the patch I wrote online: http://www.mergely.com/TwCVpiFp/ (also in attachment). I also took the liberty of properly isolating the _normalize argument by requiring it to be keyword-only (starting its name with underscore doesn't

[issue27539] negative Fraction ** negative int not normalized

2016-07-18 Thread Vedran Čačić
Vedran Čačić added the comment: Unfortunately, until now I was just a happy user of Python. I suppose some day I would have to give something back, and now is as good a day as any:-), but I have studied https://docs.python.org/devguide/ for a while and it seems really scary. It means I have

[issue27539] negative Fraction ** negative int not normalized

2016-07-18 Thread Mark Dickinson
Mark Dickinson added the comment: Oops, that's an embarrassing bug. Branching depending on the sign sounds fine to me. There's no point worrying about supporting strange Fraction-like things without a concrete idea of exactly which such things we want to support. Are you interested in

[issue27539] negative Fraction ** negative int not normalized

2016-07-17 Thread SilentGhost
Changes by SilentGhost : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___

[issue27539] negative Fraction ** negative int not normalized

2016-07-17 Thread Vedran Čačić
New submission from Vedran Čačić: I already wrote http://bugs.python.org/msg270548, but can't seem to reopen the issue, so I think the best thing is to report the bug separately. So, in issue http://bugs.python.org/issue21136, performance enhancement