Merge lp:~rockstar/launchpad/recipe-too-new into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11612 | ||||
Proposed branch: | lp:~rockstar/launchpad/recipe-too-new | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
123 lines (+45/-5) 4 files modified
lib/lp/code/browser/sourcepackagerecipe.py (+6/-0) lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+19/-0) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+8/-5) lib/lp/code/tests/helpers.py (+12/-0) |
||||
To merge this branch: | bzr merge lp:~rockstar/launchpad/recipe-too-new | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+36379@code.launchpad.net |
Description of the change
This branch fixes an issue where users try to use a recipe format that we don't yet support. In this case, we have bzr-builder in source code, but Aaron can't land the support until the buildds have the newer bzr-builder.
I talked this over with Aaron, and we decided to monkey patch the actual NEWEST_VERSION in bzr-builder to a recipe format version we're never going to have (in this case, it's also the frequency of my local HAM radio repeater). This way, we won't have erroneous test failures when we actually add support for 0.3 formatted recipes.
While talking this over with Aaron, I found another potential place where this may occur in tests, and fixed that test as well.
The monkey patch needs to use a try/finally block to ensure the new value doesn't leak, or better yet, use a context manager for the purpose.
Other than that, looks fine.