Skip to content

Commit 7898bf4

Browse files
authored
Merge pull request #21 from lrossi-dev/drop-p2
Drop Python2 support
2 parents 57fcc00 + 9a4ba8c commit 7898bf4

File tree

6 files changed

+5
-35
lines changed

6 files changed

+5
-35
lines changed

.github/workflows/tox-test.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@ name: Tox tests
33
on: [push, pull_request]
44

55
jobs:
6-
py27:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
- name: Install RPM
11-
run: sudo apt-get install -y rpm libkrb5-dev
12-
- name: Setup Python
13-
uses: actions/setup-python@v2
14-
with:
15-
python-version: 2.7
16-
- name: Install Tox
17-
run: pip install tox
18-
- name: Run Tox
19-
run: tox -e py27
206
static:
217
runs-on: ubuntu-latest
228
steps:

constraints-legacy.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@
132132
autodoc_inherit_docstrings = False
133133
intersphinx_mapping = {
134134
"python": ("https://docs.python.org/3", None),
135-
# "requests": ("https://2.python-requests.org/en/master/", None),
136135
"more-executors": ("https://rohanpm.github.io/more-executors/", None),
137-
# "attrs": ("https://www.attrs.org/en/stable/", None),
138136
"pushsource": ("https://release-engineering.github.io/pushsource/", None),
139137
}

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ def get_requirements():
3434
"Development Status :: 4 - Beta",
3535
"Intended Audience :: Developers",
3636
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
37-
"Programming Language :: Python :: 2",
38-
"Programming Language :: Python :: 2.6",
39-
"Programming Language :: Python :: 2.7",
4037
"Programming Language :: Python :: 3",
4138
"Topic :: Software Development :: Libraries :: Python Modules",
4239
],
4340
install_requires=get_requirements(),
44-
python_requires=">=2.6",
41+
python_requires=">=3.6",
4542
project_urls={
4643
"Documentation": "https://release-engineering.github.io/pushcollector/",
4744
"Changelog": "https://github.com/release-engineering/pushcollector/blob/master/CHANGELOG.md",

src/pushcollector/_impl/proxy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22

3-
import six
43
from more_executors.futures import f_return, f_map
54
import yaml
65
import jsonschema
@@ -16,7 +15,7 @@ def empty_future(value):
1615

1716

1817
def maybe_encode(value):
19-
if isinstance(value, six.text_type):
18+
if isinstance(value, str):
2019
# It's a string => make it bytes
2120
return value.encode("utf-8")
2221
# It's not a string => hopefully it's already bytes

tox.ini

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
[tox]
2-
envlist = py27,py36,static,pidiff,docs,bandit
2+
envlist = py36,py38,static,pidiff,docs,bandit
33

44
[testenv]
55
deps=-rtest-requirements.txt
66
commands=pytest -v {posargs}
77
whitelist_externals=sh
88

9-
[testenv:py27]
10-
deps=
11-
# Note: we need to explicitly list requirements.txt here
12-
# so it's processed at the same time as the constraints file
13-
-rrequirements.txt
14-
-cconstraints-legacy.txt
15-
-rtest-requirements.txt
16-
179
[testenv:static]
1810
deps=
1911
-rtest-requirements.txt
2012
black
2113
pylint==2.5.3
2214
astroid==2.4.2
15+
allowlist_externals=sh
2316
commands=
2417
black --check .
2518
sh -c 'pylint pushcollector; test $(( $? & (1|2|4|32) )) = 0'
@@ -51,4 +44,4 @@ testpaths = tests
5144

5245
[testenv:bandit]
5346
deps = bandit
54-
commands = bandit -r . -ll --exclude './.tox,./misc/ci'
47+
commands = bandit -r . -ll --exclude './.tox,./misc/ci'

0 commit comments

Comments
 (0)