msg195631 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-08-19 14:10 |
>>> class I(int): ... def __str__(self): ... return 'spam' ... >>> '%i' % (I(42),) Traceback (most recent call last): File "", line 1, in SystemError: Objects/unicodeobject.c:13595: bad argument to internal function This issue is related to and will be fixed when use PyNumber_ToBase() for any int subclass (not only for bool). |
|
|
msg195634 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-08-19 14:36 |
formatlong() should copy the string if Py_REFCNT(str) != 1. |
|
|
msg195778 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-08-21 12:03 |
I think we should just use PyNumber_ToBase() for any int and int subclass. The calling __str__() for special case looks weird. |
|
|
msg195813 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-08-21 18:17 |
I'll get my patch separated and over here when I get back home (on a business trip at the moment). |
|
|
msg196343 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-08-28 02:12 |
Okay, simple fix, patch and tests attached. |
|
|
msg196528 - (view) |
Author: Eli Bendersky (eli.bendersky) *  |
Date: 2013-08-30 12:44 |
lgtm |
|
|
msg196652 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-08-31 17:19 |
New changeset 33727fbb4668 by Ethan Furman in branch 'default': Close #18780: %-formatting now prints value for int subclasses with %d, %i, and %u codes. http://hg.python.org/cpython/rev/33727fbb4668 |
|
|
msg196668 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-08-31 19:49 |
New changeset 833246d42825 by Ethan Furman in branch 'default': Issue #18780: code cleanup. http://hg.python.org/cpython/rev/833246d42825 |
|
|
msg221461 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2014-06-24 14:49 |
Should this patch also go into the 3.3 branch? It only went into 3.4. If yes, how should I go about doing that? |
|
|
msg221501 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-06-24 21:29 |
The 3.3 branch is now only open for security fixes so this issue doesn't appear to warrant backporting there. |
|
|
msg221504 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2014-06-24 22:02 |
Cool, leaving it closed. |
|
|
msg221505 - (view) |
Author: Eli Bendersky (eli.bendersky) *  |
Date: 2014-06-24 22:10 |
On Tue, Jun 24, 2014 at 2:29 PM, Ned Deily <report@bugs.python.org> wrote: > > Ned Deily added the comment: > > The 3.3 branch is now only open for security fixes so this issue doesn't > appear to warrant backporting there. > > ---------- > These questions keep popping up in various places, being asked even by core devs like here. Is there a place where this is described formally? I.e. 3.5 is trunk, 3.4 is bug fixes, 3.3 is security fixes, doc fixes good everywhere, and some info about 2.7? I imagine since this only changes once per 18 months or so, it should not be difficult to maintain and can just be part of the release manager's job. |
|
|
msg221506 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-06-24 22:18 |
It is described in the developer's guide. The current status is summarized here: https://docs.python.org/devguide/devcycle.html#summary |
|
|
msg221507 - (view) |
Author: Eli Bendersky (eli.bendersky) *  |
Date: 2014-06-24 22:21 |
On Tue, Jun 24, 2014 at 3:18 PM, Ned Deily <report@bugs.python.org> wrote: > > Ned Deily added the comment: > > It is described in the developer's guide. The current status is > summarized here: > > https://docs.python.org/devguide/devcycle.html#summary > > Excellent. Thanks Ned. |
|
|