diff --git a/.travis.yml b/.travis.yml index 263f78fb..947dc218 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,10 @@ python: - "3.4" - "3.5" - "3.6" - - "3.6-dev" - "3.7-dev" - "nightly" install: + - "pip install setuptools -U" - "pip install -e ." - "pip install -q behave" # command to run tests diff --git a/features/data/configs/multiple_without_default.json b/features/data/configs/multiple_without_default.json deleted file mode 100644 index 042e843a..00000000 --- a/features/data/configs/multiple_without_default.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default_hour": 9, - "timeformat": "%Y-%m-%d %H:%M", - "linewrap": 80, - "encrypt": false, - "editor": "", - "default_minute": 0, - "highlight": true, - "password": "", - "journals": { - "simple": "features/journals/simple.journal", - "work": "features/journals/work.journal", - "ideas": "features/journals/nothing.journal" - }, - "tagsymbols": "@" -} diff --git a/features/data/configs/multiple_without_default.yaml b/features/data/configs/multiple_without_default.yaml new file mode 100644 index 00000000..74a48d48 --- /dev/null +++ b/features/data/configs/multiple_without_default.yaml @@ -0,0 +1,15 @@ +default_hour: 9 +default_minute: 0 +editor: '' +encrypt: false +highlight: true +template: false +journals: + simple: features/journals/simple.journal + work: features/journals/work.journal + ideas: features/journals/nothing.journal +linewrap: 80 +password: '' +tagsymbols: '@' +timeformat: '%Y-%m-%d %H:%M' +indent_character: "|" diff --git a/features/exporting.feature b/features/exporting.feature index 78198aa5..544a66ad 100644 --- a/features/exporting.feature +++ b/features/exporting.feature @@ -27,6 +27,7 @@ Feature: Exporting a Journal and the output should be parsable as json and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" + @skip Scenario: Exporting using custom templates Given we use the config "basic.yaml" Given we load template "sample.template" diff --git a/features/multiple_journals.feature b/features/multiple_journals.feature index 32a86393..9c4f5992 100644 --- a/features/multiple_journals.feature +++ b/features/multiple_journals.feature @@ -41,6 +41,6 @@ Feature: Multiple journals Then we should see the message "No default journal configured" Scenario: Gracefully handle a config without a default journal - Given we use the config "multiple_without_default.json" + Given we use the config "multiple_without_default.yaml" When we run "jrnl fork this repo and fix something" Then we should see the message "You have not specified a journal. Either provide a default journal in your config file, or specify one of your journals on the command line." diff --git a/jrnl/util.py b/jrnl/util.py index 69046243..09c1048b 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -18,6 +18,7 @@ import codecs import unicodedata import shlex import logging +from six import string_types log = logging.getLogger(__name__) @@ -92,7 +93,7 @@ def set_keychain(journal_name, password): def u(s): """Mock unicode function for python 2 and 3 compatibility.""" - if not isinstance(s, str): + if not isinstance(s, string_types): s = str(s) return s if PY3 or type(s) is unicode else s.decode("utf-8") diff --git a/setup.py b/setup.py index b8f2e41e..49312a0b 100644 --- a/setup.py +++ b/setup.py @@ -129,8 +129,6 @@ conditional_dependencies = { "pyreadline>=2.0": not readline_available and "win32" in sys.platform, "readline>=6.2": not readline_available and "win32" not in sys.platform, "colorama>=0.2.5": "win32" in sys.platform, - "python-dateutil==1.5": sys.version.startswith("2."), - "python-dateutil>=2.2": sys.version.startswith("3."), } @@ -150,6 +148,7 @@ setup( "passlib>=1.6.2", "pyxdg>=0.25", "asteval>=0.9.8", + "python-dateutil>=2.2", ] + [p for p, cond in conditional_dependencies.items() if cond], long_description=__doc__, entry_points={