Merge lp:~jelmer/brz/remaining-test into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/remaining-test
Merge into: lp:brz
Diff against target: 51 lines (+10/-13)
2 files modified
breezy/symbol_versioning.py (+9/-12)
python3.passing (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/remaining-test
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+354803@code.launchpad.net

Commit message

Fix remaining deprecated function name test.

Description of the change

Fix remaining deprecated function name test.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

This is still more complex that it needs to be for how it's used, but fixed counts as fixed for now. :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/symbol_versioning.py'
2--- breezy/symbol_versioning.py 2018-09-02 21:15:23 +0000
3+++ breezy/symbol_versioning.py 2018-09-12 20:34:43 +0000
4@@ -76,19 +76,16 @@
5 have a single %s operator in it. a_callable will be turned into a nice
6 python symbol and then substituted into deprecation_version.
7 """
8- if PY3:
9- func = getattr(a_callable, '__func__', a_callable)
10- symbol ='%s.%s' % (a_callable.__module__,
11- a_callable.__qualname__)
12+ if getattr(a_callable, '__self__', None) is not None:
13+ symbol = "%s.%s.%s" % (a_callable.__self__.__class__.__module__,
14+ a_callable.__self__.__class__.__name__,
15+ a_callable.__name__)
16+ elif getattr(a_callable, '__qualname__', None) is not None and not '<' in a_callable.__qualname__:
17+ symbol = "%s.%s" % (a_callable.__module__,
18+ a_callable.__qualname__)
19 else:
20- if getattr(a_callable, '__self__', None) is None:
21- symbol = "%s.%s" % (a_callable.__module__,
22- a_callable.__name__)
23- else:
24- symbol = "%s.%s.%s" % (a_callable.__self__.__class__.__module__,
25- a_callable.__self__.__class__.__name__,
26- a_callable.__name__
27- )
28+ symbol = "%s.%s" % (a_callable.__module__,
29+ a_callable.__name__)
30 return deprecation_version % symbol
31
32
33
34=== modified file 'python3.passing'
35--- python3.passing 2018-09-11 07:31:44 +0000
36+++ python3.passing 2018-09-12 20:34:43 +0000
37@@ -1,6 +1,5 @@
38 # This is the list of tests that are known to pass with Python3.
39 # "make check-nodocs3" verifies that these pass.
40-breezy.git.tests.test_workingtree.GitWorkingTreeTests.test_is_ignored_directory
41 breezy.git.tests.test_blackbox.ShallowTests.test_log_shallow
42 breezy.git.tests.test_blackbox.ShallowTests.test_version_info_custom_without_revno
43 breezy.git.tests.test_blackbox.ShallowTests.test_version_info_custom_with_revno
44@@ -29012,6 +29011,7 @@
45 breezy.tests.test_selftest.TestConvenienceMakers.test_make_tree_for_local_vfs_backed_transport
46 breezy.tests.test_selftest.TestCounterHooks.test_no_hook
47 breezy.tests.test_selftest.TestCounterHooks.test_run_hook_once
48+breezy.tests.test_selftest.TestDeprecations.test_applyDeprecated_not_deprecated
49 breezy.tests.test_selftest.TestDeprecations.test_callDeprecated
50 breezy.tests.test_selftest.TestDocTestSuiteIsolation.test_deleted_variable
51 breezy.tests.test_selftest.TestDocTestSuiteIsolation.test_injected_variable

Subscribers

People subscribed via source and target branches