~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/version.py

(jelmer) Use the absolute_import feature everywhere in bzrlib,
 and add a source test to make sure it's used everywhere. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from __future__ import absolute_import
20
20
 
21
21
import os
22
 
import platform
23
22
import sys
24
23
 
25
24
import bzrlib
33
32
 
34
33
 
35
34
def show_version(show_config=True, show_copyright=True, to_file=None):
 
35
    import platform
 
36
 
36
37
    if to_file is None:
37
38
        to_file = sys.stdout
38
39
    to_file.write("Bazaar (bzr) %s\n" % bzrlib.__version__)
65
66
 
66
67
    to_file.write("  Python standard library:" + ' ')
67
68
    to_file.write(os.path.dirname(os.__file__) + '\n')
68
 
    to_file.write("  Platform: %s\n"
69
 
                  % platform.platform(aliased=1).decode('utf-8'))
 
69
    to_file.write("  Platform: %s\n" % platform.platform(aliased=1))
70
70
    to_file.write("  bzrlib: ")
71
71
    if len(bzrlib.__path__) > 1:
72
72
        # print repr, which is a good enough way of making it clear it's