Rev 5006: Just delete ApportFeature. in file:///home/vila/src/bzr/bugs/516934-no-apport/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Feb 4 13:45:44 GMT 2010


At file:///home/vila/src/bzr/bugs/516934-no-apport/

------------------------------------------------------------
revno: 5006
revision-id: v.ladeuil+lp at free.fr-20100204134544-cgctxctrblez8nj5
parent: v.ladeuil+lp at free.fr-20100204102029-7xx95sw81z5lsirp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 516934-no-apport
timestamp: Thu 2010-02-04 14:45:44 +0100
message:
  Just delete ApportFeature.
  
  * bzrlib/tests/test_crash.py:
  (TestApportDeprecation): Deleted.
  
  * bzrlib/tests/features.py: 
  Delete ApportFeature, nobody cares enough about it.
  
  * bzrlib/tests/__init__.py:
  (_CompatabilityThunkFeature._ensure): Clarify the intent.
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-02-04 10:20:29 +0000
+++ b/bzrlib/tests/__init__.py	2010-02-04 13:45:44 +0000
@@ -4154,6 +4154,8 @@
             use_msg = ' Use %s.%s instead.' % (self._replacement_module,
                                                self._replacement_name)
             symbol_versioning.warn(depr_msg + use_msg, DeprecationWarning)
+            # Import the new feature and use it as a replacement for the
+            # deprecated one.
             mod = __import__(self._replacement_module, {}, {},
                              [self._replacement_name])
             self._feature = getattr(mod, self._replacement_name)

=== modified file 'bzrlib/tests/features.py'
--- a/bzrlib/tests/features.py	2010-02-04 10:20:29 +0000
+++ b/bzrlib/tests/features.py	2010-02-04 13:45:44 +0000
@@ -20,9 +20,6 @@
 
 
 apport = tests.ModuleAvailableFeature('apport')
-ApportFeature = tests._CompatabilityThunkFeature(
-    deprecated_in((2, 2, 0)),
-    'bzrlib.tests.features', 'ApportFeature', 'apport')
 paramiko = tests.ModuleAvailableFeature('paramiko')
 pycurl = tests.ModuleAvailableFeature('pycurl')
 subunit = tests.ModuleAvailableFeature('subunit')

=== modified file 'bzrlib/tests/test_crash.py'
--- a/bzrlib/tests/test_crash.py	2010-02-04 09:09:37 +0000
+++ b/bzrlib/tests/test_crash.py	2010-02-04 13:45:44 +0000
@@ -33,18 +33,6 @@
 from bzrlib.tests import features
 
 
-class TestApportDeprecation(tests.TestCaseInTempDir):
-
-    _test_needs_features = [features.apport]
-
-    def test_deprecation(self):
-        res = self.callDeprecated(
-            ['bzrlib.tests.features.ApportFeature was deprecated'
-             ' in version 2.2.0. Use bzrlib.tests.features.apport instead.'],
-            features.ApportFeature.available)
-        self.assertEqual(res, features.ApportFeature.available())
-
-
 class TestApportReporting(tests.TestCaseInTempDir):
 
     _test_needs_features = [features.apport]



More information about the bazaar-commits mailing list