Skip to content

Commit 68ff37e

Browse files
author
Hugo Barrera
authored
Merge pull request #830 from pimutils/next
Keep moving forward
2 parents 5eef4b1 + 14deb20 commit 68ff37e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+286
-303
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ repos:
1414
hooks:
1515
- id: flake8
1616
additional_dependencies: [flake8-import-order, flake8-bugbear]
17+
- repo: https://github.com/asottile/reorder_python_imports
18+
rev: v2.3.0
19+
hooks:
20+
- id: reorder-python-imports
1721
- repo: local
1822
hooks:
1923
- id: update-travis

.travis.yml

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,74 +19,22 @@
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"
59-
},
60-
{
61-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
62-
"python": "3.6"
63-
},
64-
{
65-
"env": "BUILD=test-storage DAV_SERVER=fastmail REQUIREMENTS=release ",
66-
"python": "3.6"
67-
},
68-
{
69-
"env": "BUILD=test REQUIREMENTS=minimal",
70-
"python": "3.6"
71-
},
72-
{
73-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ",
74-
"python": "3.6"
75-
},
76-
{
77-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ",
78-
"python": "3.6"
79-
},
80-
{
81-
"env": "BUILD=test REQUIREMENTS=release",
8230
"python": "3.7"
8331
},
8432
{
85-
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
33+
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
8634
"python": "3.7"
8735
},
8836
{
89-
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
37+
"env": "BUILD=test-storage DAV_SERVER=fastmail REQUIREMENTS=release ",
9038
"python": "3.7"
9139
},
9240
{
@@ -127,7 +75,7 @@
12775
},
12876
{
12977
"env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest",
130-
"python": "3.6"
78+
"python": "3.7"
13179
}
13280
]
13381
},

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ PYTEST_ARGS =
3030

3131
TEST_EXTRA_PACKAGES =
3232

33-
ifeq ($(COVERAGE), true)
34-
TEST_EXTRA_PACKAGES += pytest-cov
35-
PYTEST_ARGS += --cov-config .coveragerc --cov vdirsyncer
36-
endif
37-
3833
ifeq ($(ETESYNC_TESTS), true)
3934
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/[email protected]
4035
TEST_EXTRA_PACKAGES += django djangorestframework==3.8.2 wsgi_intercept drf-nested-routers
@@ -106,9 +101,6 @@ docs:
106101
linkcheck:
107102
sphinx-build -W -b linkcheck ./docs/ ./docs/_build/linkcheck/
108103

109-
release:
110-
python setup.py sdist bdist_wheel upload
111-
112104
release-deb:
113105
sh scripts/release-deb.sh debian jessie
114106
sh scripts/release-deb.sh debian stretch

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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/usr/bin/env python
2-
32
import itertools
43
import json
54

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

97
cfg = {}
108

@@ -34,7 +32,7 @@
3432
cfg['matrix'] = {'include': matrix, 'fast_finish': True}
3533

3634
matrix.append({
37-
'python': latest_python,
35+
'python': python_versions[0],
3836
'env': 'BUILD=style'
3937
})
4038

@@ -51,7 +49,7 @@
5149
'env': f"BUILD=test REQUIREMENTS={requirements}",
5250
})
5351

54-
if python == latest_python and requirements == "release":
52+
if python == python_versions[0] and requirements == "release":
5553
dav_servers += ("fastmail",)
5654

5755
for dav_server in dav_servers:
@@ -61,16 +59,14 @@
6159
f"DAV_SERVER={dav_server} "
6260
f"REQUIREMENTS={requirements} ")
6361
}
64-
if python == '3.5':
65-
job['dist'] = 'trusty'
6662

6763
if dav_server in ("davical", "icloud"):
6864
job['if'] = 'NOT (type IN (pull_request))'
6965

7066
matrix.append(job)
7167

7268
matrix.append({
73-
'python': latest_python,
69+
'python': python_versions[0],
7470
'env': ("BUILD=test "
7571
"ETESYNC_TESTS=true "
7672
"REQUIREMENTS=latest")

setup.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ universal = 1
33

44
[tool:pytest]
55
norecursedirs = tests/storage/servers/*
6-
addopts = --tb=short
6+
addopts =
7+
--tb=short
8+
--cov-config .coveragerc
9+
--cov=vdirsyncer
10+
--cov-report=term-missing
11+
--no-cov-on-fail
712

813
[flake8]
914
# E731: Use a def instead of lambda expr

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
Please refer to https://vdirsyncer.pimutils.org/en/stable/packaging.html for
55
how to package vdirsyncer.
66
'''
7-
8-
9-
from setuptools import Command, find_packages, setup
7+
from setuptools import Command
8+
from setuptools import find_packages
9+
from setuptools import setup
1010

1111

1212
requirements = [
1313
# https://github.com/mitsuhiko/click/issues/200
14-
'click>=5.0,<6.0',
14+
'click>=5.0',
1515
'click-log>=0.3.0, <0.4.0',
1616

1717
# https://github.com/pimutils/vdirsyncer/issues/478
@@ -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',

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
hypothesis>=5.0.0
22
pytest
3+
pytest-cov
34
pytest-localserver
45
pytest-subtesthack

tests/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
'''
22
Test suite for vdirsyncer.
33
'''
4-
54
import hypothesis.strategies as st
5+
import urllib3.exceptions
66

77
from vdirsyncer.vobject import normalize_item
88

9-
import urllib3
10-
import urllib3.exceptions
11-
129
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
1310

1411

0 commit comments

Comments
 (0)