Dropped Python 2 support. Now Python 3 only.

This commit is contained in:
Dan Helfman 2017-07-02 17:18:33 -07:00
parent 1aaf27dfb2
commit e00f74ddf7
6 changed files with 8 additions and 20 deletions

1
NEWS
View file

@ -2,6 +2,7 @@
* #18: Fix for README mention of sample files not included in package. * #18: Fix for README mention of sample files not included in package.
* #22: Sample files for triggering borgmatic from a systemd timer. * #22: Sample files for triggering borgmatic from a systemd timer.
* Dropped Python 2 support. Now Python 3 only.
* Added logo. * Added logo.
1.0.3 1.0.3

View file

@ -59,6 +59,9 @@ To install borgmatic, run the following command to download and install it:
sudo pip install --upgrade borgmatic sudo pip install --upgrade borgmatic
Make sure you're using Python 3, as borgmatic does not support Python 2. (You
may have to use "pip3" instead of "pip".)
Then, download a [sample config Then, download a [sample config
file](https://torsion.org/hg/borgmatic/raw-file/tip/sample/config) and a file](https://torsion.org/hg/borgmatic/raw-file/tip/sample/config) and a
[sample excludes [sample excludes

View file

@ -1,11 +1,5 @@
from collections import OrderedDict, namedtuple from collections import OrderedDict, namedtuple
from configparser import RawConfigParser
try:
# Python 2
from ConfigParser import RawConfigParser
except ImportError:
# Python 3
from configparser import RawConfigParser
Section_format = namedtuple('Section_format', ('name', 'options')) Section_format = namedtuple('Section_format', ('name', 'options'))

View file

@ -3,9 +3,4 @@ import sys
def builtins_mock(): def builtins_mock():
try:
# Python 2
return flexmock(sys.modules['__builtin__'])
except KeyError:
# Python 3
return flexmock(sys.modules['builtins']) return flexmock(sys.modules['builtins'])

View file

@ -1,9 +1,4 @@
try: from io import StringIO
# Python 2
from cStringIO import StringIO
except ImportError:
# Python 3
from io import StringIO
from collections import OrderedDict from collections import OrderedDict
import string import string

View file

@ -1,5 +1,5 @@
[tox] [tox]
envlist=py27,py34 envlist=py34
skipsdist=True skipsdist=True
[testenv] [testenv]