Merge lp:~spiv/bzr/pretty-decorator-vs-string-identity-718569 into lp:bzr
Proposed by
Andrew Bennetts
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5664 |
Proposed branch: | lp:~spiv/bzr/pretty-decorator-vs-string-identity-718569 |
Merge into: | lp:bzr |
Diff against target: |
153 lines (+47/-9) 3 files modified
bzrlib/decorators.py (+22/-8) bzrlib/tests/test_decorators.py (+21/-1) doc/en/release-notes/bzr-2.4.txt (+4/-0) |
To merge this branch: | bzr merge lp:~spiv/bzr/pretty-decorator-vs-string-identity-718569 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Approve | ||
Review via email: mp+49614@code.launchpad.net |
Commit message
Preserve identity of default values in the pretty decorators. (#718569)
Description of the change
This fixes bug 718569. Instead of relying on the repr() of default parameter values preserving the semantics of those values (which isn't the case of at least symbol_
All the existing tests for prettiness of the "pretty" decorators pass, so presumably this doesn't uglify them too much :) Correctness trumps prettiness anyway. I added new tests to catch this problem.
To post a comment you must log in.
Sounds reasonable and tested. A bit scary in retrospect, nice catch !