diff --git a/README.rst b/README.rst index a563ac6..35557eb 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Ydiff Term based tool to view *colored*, *incremental* diff in a version controlled workspace (supports Git, Mercurial, Perforce and Svn so far) or from stdin, with *side by side* (similar to ``diff -y``) and *auto pager* support. Requires -python (>= 2.6.0) and ``less``. +python3 and ``less``. .. image:: https://raw.github.com/ymattw/ydiff/gh-pages/img/default.png :alt: default diff --git a/ydiff.py b/ydiff.py index c92c061..7b7f061 100755 --- a/ydiff.py +++ b/ydiff.py @@ -4,7 +4,7 @@ """ Term based tool to view *colored*, *incremental* diff in a *Git/Mercurial/Svn* workspace or from stdin, with *side by side* and *auto pager* support. Requires -python (>= 2.6.0) and ``less``. +python3 and ``less``. """ import difflib @@ -28,14 +28,8 @@ 'stdin, with side by side and auto pager support') } -if sys.hexversion < 0x02060000: - raise SystemExit('*** Requires python >= 2.6.0') # pragma: no cover - - -try: - unicode -except NameError: - unicode = str +if sys.hexversion < 0x03000000: + raise SystemExit('*** Requires python >= 3.0.0') # pragma: no cover class Color(object): @@ -631,7 +625,7 @@ def check_command_status(arguments): def decode(line): """Decode UTF-8 if necessary.""" - if isinstance(line, unicode): + if isinstance(line, str): return line for encoding in ['utf-8', 'latin1']: