Skip to content

Commit f0a88dc

Browse files
committed
Drop Python 2.7, 3.5 and 3.6 support
1 parent 682deb2 commit f0a88dc

16 files changed

+127
-185
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,30 @@ jobs:
2424
uses: cutenode/action-always-fail@v1
2525
if: steps.wait-for-tests.outputs.conclusion != 'success'
2626

27-
build:
28-
name: Build package
27+
release:
28+
name: Release package
2929
runs-on: ubuntu-latest
3030
needs: [wait]
31-
strategy:
32-
matrix:
33-
python-version: ['2.7', '3.10']
3431

3532
steps:
3633
- name: Checkout code
3734
uses: actions/checkout@v2
3835
with:
3936
fetch-depth: 0
4037

41-
- name: Set up Python ${{ matrix.python-version }}
38+
- name: Set up Python 3.10
4239
uses: actions/setup-python@v2
4340
with:
44-
python-version: ${{ matrix.python-version }}
41+
python-version: 3.10
4542

4643
- name: Cache pip
4744
uses: actions/cache@v2
4845
with:
4946
path: ~/.cache/pip
50-
key: ${{ runner.os }}-python-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
47+
key: ${{ runner.os }}-python-3.10-pip-${{ hashFiles('requirements.txt') }}
5148
restore-keys: |
52-
${{ runner.os }}-python-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
53-
${{ runner.os }}-python-${{ matrix.python-version }}-pip-
49+
${{ runner.os }}-python-3.10-pip-${{ hashFiles('requirements.txt') }}
50+
${{ runner.os }}-python-3.10-pip-
5451
${{ runner.os }}-python
5552
${{ runner.os }}-
5653
@@ -63,39 +60,6 @@ jobs:
6360
- name: Build package
6461
run: python setup.py bdist_wheel sdist
6562

66-
- name: Upload coverage results
67-
uses: actions/upload-artifact@v2
68-
with:
69-
name: dist-${{ matrix.python-version }}
70-
path: dist/*
71-
72-
release:
73-
name: Release package
74-
runs-on: ubuntu-latest
75-
needs: [build]
76-
77-
steps:
78-
- name: Checkout code
79-
uses: actions/checkout@v2
80-
81-
- name: Set up Python 3.10
82-
uses: actions/setup-python@v2
83-
with:
84-
python-version: '3.10'
85-
86-
- name: Upgrade pip
87-
run: python -m pip install --upgrade pip setuptools wheel twine
88-
89-
- name: Download all coverage reports
90-
uses: actions/download-artifact@v2
91-
with:
92-
path: dist_raw
93-
94-
- name: Move coverage reports to the root folder
95-
run: |
96-
mkdir dist
97-
find dist_raw -type f -exec mv '{}' dist \;
98-
9963
- name: Check package
10064
run: twine check dist/*
10165

.github/workflows/test.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ jobs:
4545
- os: windows-latest
4646
mark: important
4747
python-version: '3.10'
48-
# TODO: drop old Python versions in v2.0 release
49-
- os: ubuntu-18.04
50-
mark: important
51-
python-version: '2.7'
52-
- os: ubuntu-18.04
53-
mark: important
54-
python-version: '3.5'
55-
- os: ubuntu-18.04
56-
mark: important
57-
python-version: '3.6'
58-
- os: ubuntu-18.04
59-
mark: important
60-
python-version: pypy-2.7
6148
# run all the tests only on latest python version
6249
- os: ubuntu-latest
6350
mark: all

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ repos:
4848
rev: v2.31.1
4949
hooks:
5050
- id: pyupgrade
51+
args: [--py37-plus]
5152
- repo: https://github.com/psf/black
5253
rev: 22.1.0
5354
hooks:

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"restructuredtext.confPath": "${workspaceFolder}/docs",
3-
"esbonio.sphinx.confDir": "${workspaceFolder}/docs"
3+
"esbonio.sphinx.confDir": "/home/maxim/Repo/setuptools-git-versioning/docs"
44
}

CHANGELOG.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
Changelog
22
==========
33

4-
1.8
4+
2.0
55
----
66

77
.. changelog::
8-
:version: 1.8.2
8+
:version: 2.0.0
9+
10+
.. change::
11+
:tags: general, breaking
12+
13+
Drop Python 2.7, 3.5 and 3.6 support. Minimal supported Python version is now 3.7
14+
15+
.. change::
16+
:tags: core, feature
17+
18+
Do not fail on ``toml`` and ``packaging`` modules import while installing ``setuptools-git-versioning`` from ``tag.gz`` file
919

1020
.. change::
1121
:tags: ci, bug
1222

1323
Fix creating multiple releases for the same tag
1424

25+
1.8
26+
----
27+
1528
.. changelog::
1629
:version: 1.8.1
1730
:released: 10.01.2022

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
sys.path.insert(0, str(Path(__file__).parent.parent.absolute()))
2020
ver = Version(
2121
subprocess.check_output( # nosec
22-
"{python} ../setup.py --version".format(python=sys.executable),
22+
f"{sys.executable} ../setup.py --version",
2323
shell=True,
2424
)
2525
.decode("utf-8")
@@ -65,7 +65,7 @@
6565
# a list of builtin themes.
6666
#
6767
html_theme = "furo"
68-
html_title = "setuptools-git-versioning {version}".format(version=version)
68+
html_title = f"setuptools-git-versioning {version}"
6969

7070
# Add any paths that contain custom static files (such as style sheets) here,
7171
# relative to this directory. They are copied after the builtin static files,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ multi_line_output = 3
44

55
[tool.black]
66
line-length = 120
7-
target-version = ['py27', 'py35', 'py36', 'py37', 'py38', 'py39', 'py310']
7+
target-version = ['py37', 'py38', 'py39', 'py310']
88
include = '\.pyi?$'
99
exclude = '''(\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist)'''
1010

requirements-test.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
build
22
coverage
3-
flake8>=3.8; python_version=="2.7"
4-
flake8>=3.8; python_version>="3.5"
3+
flake8>=3.8
54
pytest
6-
pytest-rerunfailures<9.0; python_version=="2.7"
7-
pytest-rerunfailures; python_version>="3.5"
5+
pytest-rerunfailures
86
wheel

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
packaging
2-
setuptools; python_version>="3.5"
3-
setuptools<45.0; python_version<"3"
2+
setuptools
43
toml>=0.10.2
5-
typing; python_version<"3"

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ def parse_requirements(file_content):
3131
classifiers=[
3232
"Framework :: Setuptools Plugin",
3333
"Intended Audience :: Developers",
34-
"Programming Language :: Python :: 2",
35-
"Programming Language :: Python :: 2.7",
36-
"Programming Language :: Python :: 3",
37-
"Programming Language :: Python :: 3.5",
38-
"Programming Language :: Python :: 3.6",
34+
"Programming Language :: Python :: 3 :: Only",
3935
"Programming Language :: Python :: 3.7",
4036
"Programming Language :: Python :: 3.8",
4137
"Programming Language :: Python :: 3.9",
@@ -50,7 +46,7 @@ def parse_requirements(file_content):
5046
"Coverage": "https://app.codecov.io/gh/dolfinus/setuptools-git-versioning",
5147
"Tracker": "https://github.com/dolfinus/setuptools-git-versioning/issues",
5248
},
53-
python_requires=">=2.7,!=3.1,!=3.2,!=3.3,!=3.4",
49+
python_requires=">=3.7",
5450
py_modules=["setuptools_git_versioning"],
5551
install_requires=requirements,
5652
entry_points={

0 commit comments

Comments
 (0)