Issue15475
Created on 2012-07-27 19:44 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| itertools_sizeof-3.3.patch | serhiy.storchaka, 2012-07-27 19:44 | Patch for 3.3 | review | |
| itertools_sizeof-3.2.patch | serhiy.storchaka, 2012-07-27 19:45 | Patch for 3.2 | review | |
| itertools_sizeof-2.7.patch | serhiy.storchaka, 2012-07-27 19:46 | Patch for 2.7 | review | |
| itertools_sizeof-3.3-2.patch | serhiy.storchaka, 2012-07-29 16:11 | Patch for 3.3 | review | |
| itertools_sizeof-3.2-2.patch | serhiy.storchaka, 2012-07-29 16:12 | Patch for 3.2 | review | |
| itertools_sizeof-2.7-2.patch | serhiy.storchaka, 2012-07-29 16:12 | Patch for 2.7 | review | |
| Messages (12) | |||
|---|---|---|---|
| msg166603 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-07-27 19:44 | |
Here is a patch that implements correct __sizeof__ for some itertools iterators: product(), combinations(), combinations_with_replacement() and permutations(). |
|||
| msg166780 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-07-29 16:11 | |
Patches updated on Meador's remarks. Tests updated to use new test.support helpers. |
|||
| msg166781 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-07-29 16:13 | |
Sorry, on Martin's remarks. |
|||
| msg167682 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2012-08-08 10:41 | |
The clean-up patch looks much nicer. Thanks. I'm not sure why anyone would really want this functionality for itertools, but I don't see any harm in adding it as long as the other implementations aren't required to follow. Also, it could be viewed as being a new feature, so I'm not sure backports are warranted. Be sure to ask the respective release managers before applying. |
|||
| msg167689 - (view) | Author: Meador Inge (meador.inge) * | Date: 2012-08-08 14:09 | |
On Wed, Aug 8, 2012 at 5:41 AM, Raymond Hettinger <report@bugs.python.org> wrote: > I'm not sure why anyone would really want this functionality for itertools, > but I don't see any harm in adding it as long as the other implementations > aren't required to follow. The general expection is that __sizeof__ is for CPython. We tag the tests with '@cpython_only'. > Also, it could be viewed as being a new feature, so I'm not sure backports > are warranted. So far, we have been applying the __sizeof__ patches to all branches. > Be sure to ask the respective release managers before applying. I will check with Georg for 3.3. Thanks. |
|||
| msg170564 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-09-16 18:35 | |
Are there any objections? |
|||
| msg170574 - (view) | Author: Georg Brandl (georg.brandl) * | Date: 2012-09-16 19:54 | |
Certainly not for 3.3.0. I'm also not sure this counts as a bugfix in any case. |
|||
| msg170577 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-09-16 20:12 | |
Georg, sorry, I don't understood you. You have no objection to the inclusion of this patch in 3.3.0 or you say that this patch should not be in 3.3.0? |
|||
| msg170578 - (view) | Author: Georg Brandl (georg.brandl) * | Date: 2012-09-16 20:15 | |
Ah, sorry, that was unclear. I meant "this is certainly not going into 3.3.0." |
|||
| msg170609 - (view) | Author: Meador Inge (meador.inge) * | Date: 2012-09-17 14:06 | |
Unassigning from myself. I thought I would have more time to review and push this through. |
|||
| msg199359 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2013-10-10 05:13 | |
Serhiy, you can make the decision on whether this goes into 3.4 or gets closed. I don't think any actual user has ever expressed interest in this functionality and it is hard to meaningfully reason about the real memory cost because we don't have a way to include the memory of the referred-to objects. To me, it seems like unnecessary code bloat. |
|||
| msg205707 - (view) | Author: Roundup Robot (python-dev) | Date: 2013-12-09 15:46 | |
New changeset 9bce03920afe by Serhiy Storchaka in branch 'default': Issue #15475: Add __sizeof__ implementations for itertools objects. http://hg.python.org/cpython/rev/9bce03920afe |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:33 | admin | set | github: 59680 |
| 2013-12-09 15:58:05 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2013-12-09 15:46:02 | python-dev | set | nosy:
+ python-dev messages: + msg205707 |
| 2013-10-10 05:13:36 | rhettinger | set | assignee: rhettinger -> serhiy.storchaka messages: + msg199359 |
| 2013-09-20 23:56:11 | rhettinger | set | assignee: serhiy.storchaka -> rhettinger versions: - Python 2.7, Python 3.2, Python 3.3 |
| 2013-09-19 10:49:20 | serhiy.storchaka | unlink | issue19048 superseder |
| 2013-09-19 10:43:16 | serhiy.storchaka | link | issue19048 superseder |
| 2012-12-29 22:23:37 | serhiy.storchaka | set | assignee: serhiy.storchaka |
| 2012-10-04 10:46:17 | jcea | set | nosy:
+ jcea |
| 2012-10-02 16:47:11 | serhiy.storchaka | set | versions: + Python 3.4 |
| 2012-09-17 14:06:48 | meador.inge | set | assignee: meador.inge -> (no value) messages: + msg170609 |
| 2012-09-16 20:15:39 | georg.brandl | set | messages: + msg170578 |
| 2012-09-16 20:12:48 | serhiy.storchaka | set | messages: + msg170577 |
| 2012-09-16 19:54:43 | georg.brandl | set | messages: + msg170574 |
| 2012-09-16 18:35:00 | serhiy.storchaka | set | nosy:
+ georg.brandl messages: + msg170564 |
| 2012-08-29 11:35:01 | aliles | set | nosy:
+ aliles |
| 2012-08-08 14:09:45 | meador.inge | set | assignee: meador.inge messages: + msg167689 |
| 2012-08-08 10:41:32 | rhettinger | set | assignee: rhettinger -> (no value) messages: + msg167682 |
| 2012-08-08 07:59:04 | rhettinger | set | priority: normal -> low assignee: rhettinger |
| 2012-08-05 10:58:09 | serhiy.storchaka | set | keywords:
+ needs review stage: patch review |
| 2012-07-29 16:13:49 | serhiy.storchaka | set | messages: + msg166781 |
| 2012-07-29 16:12:45 | serhiy.storchaka | set | files: + itertools_sizeof-2.7-2.patch |
| 2012-07-29 16:12:15 | serhiy.storchaka | set | files: + itertools_sizeof-3.2-2.patch |
| 2012-07-29 16:11:28 | serhiy.storchaka | set | files:
+ itertools_sizeof-3.3-2.patch messages: + msg166780 |
| 2012-07-29 03:41:03 | meador.inge | set | nosy:
+ meador.inge |
| 2012-07-27 19:46:13 | serhiy.storchaka | set | files: + itertools_sizeof-2.7.patch |
| 2012-07-27 19:45:38 | serhiy.storchaka | set | files: + itertools_sizeof-3.2.patch |
| 2012-07-27 19:44:02 | serhiy.storchaka | create | |