diff --git a/CHANGELOG.md b/CHANGELOG.md index b70f3659..43c02af8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.7 (December 22, 2013) +* __1.7.7__ Cleaned up imporrts * __1.7.6__ Python 3 port for slugify * __1.7.5__ Colorama is only needed on windows. Smaller fixes * __1.7.3__ Touches temporary files before opening them to allow more external editors. diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 0fa9eada..aa34139f 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -1,10 +1,9 @@ #!/usr/bin/env python # encoding: utf-8 -try: from . import Entry -except (SystemError, ValueError): import Entry -try: from . import util -except (SystemError, ValueError): import util +from __future__ import absolute_import +from . import Entry +from . import util import codecs import os try: import parsedatetime.parsedatetime_consts as pdt diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 1e54f31b..12d92e04 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -5,9 +5,10 @@ """ jrnl is a simple journal application for your command line. """ +from __future__ import absolute_import __title__ = 'jrnl' -__version__ = '1.7.6' +__version__ = '1.7.7' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' diff --git a/jrnl/cli.py b/jrnl/cli.py index 20e39f9a..d6156822 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -7,17 +7,12 @@ license: MIT, see LICENSE for more details. """ -try: - from . import Journal - from . import util - from . import exporters - from . import install - from . import __version__ -except (SystemError, ValueError): - import Journal - import util - import exporters - import install +from __future__ import absolute_import +from . import Journal +from . import util +from . import exporters +from . import install +from . import __version__ import jrnl import os import argparse diff --git a/jrnl/exporters.py b/jrnl/exporters.py index 4362dfae..b8463e03 100644 --- a/jrnl/exporters.py +++ b/jrnl/exporters.py @@ -1,12 +1,10 @@ #!/usr/bin/env python # encoding: utf-8 +from __future__ import absolute_import import os -import string -try: import simplejson as json -except ImportError: import json -try: from .util import u, slugify -except (SystemError, ValueError): from util import u, slugify +import json +from .util import u, slugify def get_tags_count(journal): diff --git a/jrnl/install.py b/jrnl/install.py index 3240a206..fa78ca0c 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,14 +1,13 @@ #!/usr/bin/env python # encoding: utf-8 +from __future__ import absolute_import import readline import glob import getpass -try: import simplejson as json -except ImportError: import json +import json import os -try: from . import util -except (SystemError, ValueError): import util +from . import util def module_exists(module_name): diff --git a/jrnl/util.py b/jrnl/util.py index ae45cbb9..72d00ca3 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -6,8 +6,7 @@ from tzlocal import get_localzone import getpass as gp import keyring import pytz -try: import simplejson as json -except ImportError: import json +import json if "win32" in sys.platform: import colorama colorama.init()