Rev 5054: Really deprecate commands.shlex_split_unicode. in file:///home/vila/src/bzr/reviews/524181-shlex_split_unicode/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Mar 1 09:08:27 GMT 2010
At file:///home/vila/src/bzr/reviews/524181-shlex_split_unicode/
------------------------------------------------------------
revno: 5054
revision-id: v.ladeuil+lp at free.fr-20100301090827-unqp82b4imjdn312
parent: v.ladeuil+lp at free.fr-20100301090218-pq3ib5y07dx3wbp6
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 524181-shlex_split_unicode
timestamp: Mon 2010-03-01 10:08:27 +0100
message:
Really deprecate commands.shlex_split_unicode.
* test_commands.py:
(TestDeprecations): Ensure we get the deprecation warning.
* commands.py:
(shlex_split_unicode): Add deprecation decorator.
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2010-03-01 09:02:18 +0000
+++ b/bzrlib/commands.py 2010-03-01 09:08:27 +0000
@@ -874,7 +874,7 @@
return ret
- at deprecated_method(deprecated_in((2, 2, 0)))
+ at deprecated_function(deprecated_in((2, 2, 0)))
def shlex_split_unicode(unsplit):
return cmdline.split(unsplit)
=== modified file 'bzrlib/tests/test_commands.py'
--- a/bzrlib/tests/test_commands.py 2010-01-14 13:17:33 +0000
+++ b/bzrlib/tests/test_commands.py 2010-03-01 09:08:27 +0000
@@ -24,6 +24,7 @@
config,
errors,
option,
+ symbol_versioning,
tests,
)
from bzrlib.commands import display_command
@@ -323,3 +324,10 @@
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')
More information about the bazaar-commits
mailing list