Merge lp:~vila/bzr/794960-wrong-deprecations into lp:bzr/2.3

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 5651
Proposed branch: lp:~vila/bzr/794960-wrong-deprecations
Merge into: lp:bzr/2.3
Diff against target: 58 lines (+4/-15)
3 files modified
bzrlib/tests/__init__.py (+0/-2)
bzrlib/tests/test_selftest.py (+0/-13)
doc/en/release-notes/bzr-2.3.txt (+4/-0)
To merge this branch: bzr merge lp:~vila/bzr/794960-wrong-deprecations
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+64001@code.launchpad.net

Commit message

Remove abusive deprecation decorators

Description of the change

Trivial fix, the backport was too aggressive.

While it's too late for 2.3.3 others may run into it for no good reason.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Care must be taken when merging 2.3 into trunk for *preserving* this code in trunk

Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/__init__.py'
2--- bzrlib/tests/__init__.py 2011-05-13 10:59:20 +0000
3+++ bzrlib/tests/__init__.py 2011-06-09 12:34:31 +0000
4@@ -1450,7 +1450,6 @@
5 else:
6 self.assertEqual(expected_docstring, obj.__doc__)
7
8- @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4)))
9 def failUnlessExists(self, path):
10 return self.assertPathExists(path)
11
12@@ -1463,7 +1462,6 @@
13 self.assertTrue(osutils.lexists(path),
14 path + " does not exist")
15
16- @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4)))
17 def failIfExists(self, path):
18 return self.assertPathDoesNotExist(path)
19
20
21=== modified file 'bzrlib/tests/test_selftest.py'
22--- bzrlib/tests/test_selftest.py 2011-05-13 11:34:44 +0000
23+++ bzrlib/tests/test_selftest.py 2011-06-09 12:34:31 +0000
24@@ -512,19 +512,6 @@
25 self.assertRaises(AssertionError, self.assertEqualStat,
26 os.lstat("foo"), os.lstat("longname"))
27
28- def test_failUnlessExists(self):
29- """Deprecated failUnlessExists and failIfExists"""
30- self.applyDeprecated(
31- deprecated_in((2, 4)),
32- self.failUnlessExists, '.')
33- self.build_tree(['foo/', 'foo/bar'])
34- self.applyDeprecated(
35- deprecated_in((2, 4)),
36- self.failUnlessExists, 'foo/bar')
37- self.applyDeprecated(
38- deprecated_in((2, 4)),
39- self.failIfExists, 'foo/foo')
40-
41 def test_assertPathExists(self):
42 self.assertPathExists('.')
43 self.build_tree(['foo/', 'foo/bar'])
44
45=== modified file 'doc/en/release-notes/bzr-2.3.txt'
46--- doc/en/release-notes/bzr-2.3.txt 2011-05-18 09:04:37 +0000
47+++ doc/en/release-notes/bzr-2.3.txt 2011-06-09 12:34:31 +0000
48@@ -61,6 +61,10 @@
49 suite. This can include new facilities for writing tests, fixes to
50 spurious test failures and changes to the way things should be tested.
51
52+* Remove the deprecation decorators for ``failUnlessExists`` and
53+ ``failIfExists``. The deprecation "will" occur in 2.4, not
54+ before. Providing the wrappers is enough as far as 2.3 is concerned.
55+ (Vincent Ladeuil #794960)
56
57 bzr 2.3.3
58 #########

Subscribers

People subscribed via source and target branches