Skip to content

Commit 9cb1f8d

Browse files
author
Hugo Osvaldo Barrera
committed
Drop support for Python 3.5 and 3.6
1 parent 56b1fc2 commit 9cb1f8d

30 files changed

+77
-135
lines changed

.travis.yml

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,75 +19,23 @@
1919
"include": [
2020
{
2121
"env": "BUILD=style",
22-
"python": "3.6"
23-
},
24-
{
25-
"env": "BUILD=test REQUIREMENTS=release",
26-
"python": "3.5"
27-
},
28-
{
29-
"dist": "trusty",
30-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
31-
"python": "3.5"
32-
},
33-
{
34-
"dist": "trusty",
35-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
36-
"python": "3.5"
37-
},
38-
{
39-
"env": "BUILD=test REQUIREMENTS=minimal",
40-
"python": "3.5"
41-
},
42-
{
43-
"dist": "trusty",
44-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ",
45-
"python": "3.5"
46-
},
47-
{
48-
"dist": "trusty",
49-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ",
50-
"python": "3.5"
22+
"python": "3.7"
5123
},
5224
{
5325
"env": "BUILD=test REQUIREMENTS=release",
54-
"python": "3.6"
26+
"python": "3.7"
5527
},
5628
{
5729
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
58-
"python": "3.6"
30+
"python": "3.7"
5931
},
6032
{
6133
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
62-
"python": "3.6"
34+
"python": "3.7"
6335
},
6436
{
6537
"env": "BUILD=test-storage DAV_SERVER=fastmail REQUIREMENTS=release ",
6638
"if": "NOT (type IN (pull_request))",
67-
"python": "3.6"
68-
},
69-
{
70-
"env": "BUILD=test REQUIREMENTS=minimal",
71-
"python": "3.6"
72-
},
73-
{
74-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ",
75-
"python": "3.6"
76-
},
77-
{
78-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ",
79-
"python": "3.6"
80-
},
81-
{
82-
"env": "BUILD=test REQUIREMENTS=release",
83-
"python": "3.7"
84-
},
85-
{
86-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
87-
"python": "3.7"
88-
},
89-
{
90-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
9139
"python": "3.7"
9240
},
9341
{
@@ -128,7 +76,7 @@
12876
},
12977
{
13078
"env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest",
131-
"python": "3.6"
79+
"python": "3.7"
13280
}
13381
]
13482
},

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def github_issue_role(name, rawtext, text, lineno, inliner,
6565
if issue_num <= 0:
6666
raise ValueError()
6767
except ValueError:
68-
msg = inliner.reporter.error('Invalid GitHub issue: {}'.format(text),
68+
msg = inliner.reporter.error(f'Invalid GitHub issue: {text}',
6969
line=lineno)
7070
prb = inliner.problematic(rawtext, rawtext, msg)
7171
return [prb], [msg]

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If your distribution doesn't provide a package for vdirsyncer, you still can
4141
use Python's package manager "pip". First, you'll have to check that the
4242
following things are installed:
4343

44-
- Python 3.5+ and pip.
44+
- Python 3.7+ and pip.
4545
- ``libxml`` and ``libxslt``
4646
- ``zlib``
4747
- Linux or OS X. **Windows is not supported**, see :gh:`535`.

scripts/make_travisconf.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import itertools
44
import json
55

6-
python_versions = ("3.5", "3.6", "3.7", "3.8")
7-
latest_python = "3.6"
6+
python_versions = ["3.7", "3.8"]
87

98
cfg = {}
109

@@ -34,7 +33,7 @@
3433
cfg['matrix'] = {'include': matrix, 'fast_finish': True}
3534

3635
matrix.append({
37-
'python': latest_python,
36+
'python': python_versions[0],
3837
'env': 'BUILD=style'
3938
})
4039

@@ -51,7 +50,7 @@
5150
'env': f"BUILD=test REQUIREMENTS={requirements}",
5251
})
5352

54-
if python == latest_python and requirements == "release":
53+
if python == python_versions[0] and requirements == "release":
5554
dav_servers += ("fastmail",)
5655

5756
for dav_server in dav_servers:
@@ -61,8 +60,6 @@
6160
f"DAV_SERVER={dav_server} "
6261
f"REQUIREMENTS={requirements} ")
6362
}
64-
if python == '3.5':
65-
job['dist'] = 'trusty'
6663

6764
build_prs = dav_server not in ("fastmail", "davical", "icloud")
6865
if not build_prs:
@@ -71,7 +68,7 @@
7168
matrix.append(job)
7269

7370
matrix.append({
74-
'python': latest_python,
71+
'python': python_versions[0],
7572
'env': ("BUILD=test "
7673
"ETESYNC_TESTS=true "
7774
"REQUIREMENTS=latest")

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def run(self):
8787
'License :: OSI Approved :: BSD License',
8888
'Operating System :: POSIX',
8989
'Programming Language :: Python :: 3',
90-
'Programming Language :: Python :: 3.5',
91-
'Programming Language :: Python :: 3.6',
9290
'Programming Language :: Python :: 3.7',
9391
'Programming Language :: Python :: 3.8',
9492
'Topic :: Internet',

tests/storage/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def get_server_mixin(server_name):
2121
from . import __name__ as base
22-
x = __import__('{}.servers.{}'.format(base, server_name), fromlist=[''])
22+
x = __import__(f'{base}.servers.{server_name}', fromlist=[''])
2323
return x.ServerMixin
2424

2525

@@ -183,7 +183,7 @@ def test_repr(self, s, get_storage_args):
183183
def test_discover(self, requires_collections, get_storage_args, get_item):
184184
collections = set()
185185
for i in range(1, 5):
186-
collection = 'test{}'.format(i)
186+
collection = f'test{i}'
187187
s = self.storage_class(**get_storage_args(collection=collection))
188188
assert not list(s.list())
189189
s.upload(get_item())

tests/system/cli/test_repair.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def storage(tmpdir, runner):
1919
def test_basic(storage, runner, collection):
2020
if collection is not None:
2121
storage = storage.mkdir(collection)
22-
collection_arg = 'foo/{}'.format(collection)
22+
collection_arg = f'foo/{collection}'
2323
else:
2424
collection_arg = 'foo'
2525

tests/system/cli/test_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def test_partial_sync(tmpdir, runner, partial_sync):
461461
fileext = ".txt"
462462
path = "{base}/bar"
463463
'''.format(
464-
partial_sync=('partial_sync = "{}"\n'.format(partial_sync)
464+
partial_sync=(f'partial_sync = "{partial_sync}"\n'
465465
if partial_sync else ''),
466466
base=str(tmpdir)
467467
)))

tests/unit/cli/test_fetchparams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_key_conflict(monkeypatch, mystrategy):
4747
@given(s=st.text(), t=st.text(min_size=1))
4848
def test_fuzzing(s, t, mystrategy):
4949
config = expand_fetch_params({
50-
'{}.fetch'.format(s): ['mystrategy', t]
50+
f'{s}.fetch': ['mystrategy', t]
5151
})
5252

5353
assert config[s] == t

tests/unit/sync/test_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_conflict_resolution_both_etags_new(winning_storage):
253253
b.update(href_b, item_b, etag_b)
254254
with pytest.raises(SyncConflict):
255255
sync(a, b, status)
256-
sync(a, b, status, conflict_resolution='{} wins'.format(winning_storage))
256+
sync(a, b, status, conflict_resolution=f'{winning_storage} wins')
257257
assert items(a) == items(b) == {
258258
item_a.raw if winning_storage == 'a' else item_b.raw
259259
}
@@ -563,7 +563,7 @@ def newstatus(self):
563563
uid=uid_strategy,
564564
etag=st.text())
565565
def upload(self, storage, uid, etag):
566-
item = Item('UID:{}'.format(uid))
566+
item = Item(f'UID:{uid}')
567567
storage.items[uid] = (etag, item)
568568

569569
@rule(storage=Storage, href=st.text())

0 commit comments

Comments
 (0)