Rev 6030: Remove bzrlib.commands deprecated stuff. in file:///home/vila/src/bzr/cleanup/trace-deprecations/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Jul 15 14:27:20 UTC 2011


At file:///home/vila/src/bzr/cleanup/trace-deprecations/

------------------------------------------------------------
revno: 6030
revision-id: v.ladeuil+lp at free.fr-20110715142720-v3wjh5mfrusp9278
parent: v.ladeuil+lp at free.fr-20110715141510-g6f47dti5a3sog4k
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: trace-deprecations
timestamp: Fri 2011-07-15 16:27:20 +0200
message:
  Remove bzrlib.commands deprecated stuff.
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2011-06-27 15:36:58 +0000
+++ b/bzrlib/commands.py	2011-07-15 14:27:20 +0000
@@ -164,16 +164,6 @@
     return cmd[4:].replace('_','-')
 
 
- at deprecated_function(deprecated_in((2, 2, 0)))
-def _builtin_commands():
-    """Return a dict of {name: cmd_class} for builtin commands.
-
-    :deprecated: Use the builtin_command_registry registry instead
-    """
-    # return dict(name: cmd_class)
-    return dict(builtin_command_registry.items())
-
-
 def _register_builtin_commands():
     if builtin_command_registry.keys():
         # only load once
@@ -442,19 +432,6 @@
         """
         self._operation.cleanup_now()
 
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def _maybe_expand_globs(self, file_list):
-        """Glob expand file_list if the platform does not do that itself.
-
-        Not used anymore, now that the bzr command-line parser globs on
-        Windows.
-
-        :return: A possibly empty list of unicode paths.
-
-        Introduced in bzrlib 0.18.
-        """
-        return file_list
-
     def _usage(self):
         """Return single-line grammar for this command.
 
@@ -723,11 +700,6 @@
                 del self._operation
         self.run = run
 
-    @deprecated_method(deprecated_in((2, 2, 0)))
-    def run_direct(self, *args, **kwargs):
-        """Deprecated thunk from bzrlib 2.1."""
-        return self.run(*args, **kwargs)
-
     def run(self):
         """Actually run the command.
 
@@ -978,7 +950,8 @@
 
 def apply_lsprofiled(filename, the_callable, *args, **kwargs):
     from bzrlib.lsprof import profile
-    ret, stats = profile(exception_to_return_code, the_callable, *args, **kwargs)
+    ret, stats = profile(exception_to_return_code, the_callable,
+                         *args, **kwargs)
     stats.sort()
     if filename is None:
         stats.pprint()
@@ -988,11 +961,6 @@
     return ret
 
 
- at deprecated_function(deprecated_in((2, 2, 0)))
-def shlex_split_unicode(unsplit):
-    return cmdline.split(unsplit)
-
-
 def get_alias(cmd, config=None):
     """Return an expanded alias, or None if no alias exists.
 

=== modified file 'bzrlib/tests/test_commands.py'
--- a/bzrlib/tests/test_commands.py	2011-04-19 03:23:05 +0000
+++ b/bzrlib/tests/test_commands.py	2011-07-15 14:27:20 +0000
@@ -354,11 +354,3 @@
         cmds = list(commands.all_command_names())
         self.assertEqual(['called'], hook_calls)
         self.assertSubset(['foo', 'bar'], cmds)
-
-
-class TestDeprecations(tests.TestCase):
-
-    def test_shlex_split_unicode_deprecation(self):
-        res = self.applyDeprecated(
-                symbol_versioning.deprecated_in((2, 2, 0)),
-                commands.shlex_split_unicode, 'whatever')

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-07-15 14:15:10 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-07-15 14:27:20 +0000
@@ -56,6 +56,10 @@
 .. Changes that may require updates in plugins or other code that uses
    bzrlib.
 
+* Remove ``commands._builtin_commands``, ``commands.shlex_split_unicode``,
+  ``Command._maybe_expand_globs`` and ``Command.run_direct`` deprecated in
+  2.10 and 2.2.0 and one corresponding test. (Vincent Ladeuil)
+
 * Remove ``trace.info``, ``trace.error`` and ``trace.show_log_error``
   deprecated in 2.1.0. (Vincent Ladeuil)
 



More information about the bazaar-commits mailing list