OrderedContainerItemRenamer assumes too much
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Medium
|
Marius Gedminas | ||
zope.copypastemove |
Fix Committed
|
Medium
|
Justin Alan Ryan |
Bug Description
Imagine that you have an ordered container with a custom name chooser.
OrderedContaine
OrderedContaine
I would like to fix this bug, but it raises an API question. Is IContainerItemR
Options:
1. renameItem should raise an error if the name chooser overrode newName to something else
2. renameItem should cope with override new names and return the real new name
3. renameItem should cope with override new names, but keep the old API (no return value) for backwards-
I prefer option (2).
Related branches
- Tres Seaver: Pending requested
-
Diff: 143 lines (+68/-4)3 files modifiedsetup.py (+1/-0)
src/zope/copypastemove/__init__.py (+8/-4)
src/zope/copypastemove/tests/test_rename.py (+59/-0)
Changed in zope.copypastemove: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in zope3: | |
status: | Confirmed → Won't Fix |
Changed in zope.copypastemove: | |
assignee: | nobody → Marius Gedminas (mgedmin) |
tags: | added: bugday20100424 |
Changed in zope.copypastemove: | |
assignee: | Marius Gedminas (mgedmin) → Justin Ryan (justizin) |
tags: | added: bugday |
Changed in zope.copypastemove: | |
status: | Confirmed → Fix Committed |
Supporters added: mgedmin; removed: chrism
Uploaded: fix-ordered- container- item-renamer. diff
I'm attaching a patch that implements option 3 (because it seemed to be the safest one).