~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/symbol_versioning.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-27 01:54:40 UTC
  • mto: (1711.2.26 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: john@arbash-meinel.com-20060527015440-1a10495d8e56ed5f
deprecating appendpath, it does exactly what pathjoin does

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
           'DEPRECATED_PARAMETER',
26
26
           'deprecated_passed',
27
27
           'warn', 'set_warning_method', 'zero_seven',
28
 
           'zero_eight',
 
28
           'zero_eight', 'zero_nine'
29
29
           ]
30
30
 
31
31
from warnings import warn
34
34
DEPRECATED_PARAMETER = "A deprecated parameter marker."
35
35
zero_seven = "%s was deprecated in version 0.7."
36
36
zero_eight = "%s was deprecated in version 0.8."
 
37
zero_nine = "%s was deprecated in version 0.9."
37
38
 
38
39
 
39
40
def set_warning_method(method):
113
114
 
114
115
def _decorate_docstring(callable, deprecation_version, label,
115
116
                        decorated_callable):
116
 
    docstring_lines = callable.__doc__.split('\n')
 
117
    if callable.__doc__:
 
118
        docstring_lines = callable.__doc__.split('\n')
 
119
    else:
 
120
        docstring_lines = []
117
121
    if len(docstring_lines) == 0:
118
122
        decorated_callable.__doc__ = deprecation_version % ("This " + label)
119
123
    elif len(docstring_lines) == 1: